#include #include #include #include #include #include #ifndef MCL_ONFAULT #define MCL_ONFAULT (MCL_FUTURE << 1) #endif static int test_limit(void) { int ret = 1; struct rlimit lims; void *map; if (getrlimit(RLIMIT_MEMLOCK, &lims)) { perror("getrlimit"); return ret; } if (mlockall(MCL_ONFAULT | MCL_FUTURE)) { perror("mlockall"); return ret; } map = mmap(NULL, 2 * lims.rlim_max, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, 0, 0); if (map != MAP_FAILED) printf("mmap should have failed, but didn't\n"); else { ret = 0; munmap(map, 2 * lims.rlim_max); } munlockall(); return ret; } int main(int argc, char **argv) { int ret = 0; ret += test_limit(); return ret; } main'>index : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2017-01-29 21:00:48 -0800
committerOlof Johansson <olof@lixom.net>2017-01-29 21:00:48 -0800
commit0a019a28e0ca0af7dc2691d1a9527960b07ad2bb (patch)
tree5ee1db9aacacd6af6701fb290e8a294ef3cc2bf2 /net/ipv4/tcp_timer.c
parentec026b5020688a8bde5fae9a69ae3c59b66ba3ae (diff)
parent8413299cb3933dade6186bbee8363f190032107e (diff)
Merge tag 'sti-dt-for-v4.10-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into fixes
STi DT fix: Since v4.10-rc1, xhci is complaining in loop with : [ 801.953836] usb usb6-port1: Cannot enable. Maybe the USB cable is bad? [ 801.960455] xhci-hcd xhci-hcd.0.auto: Cannot set link state. [ 801.966611] usb usb6-port1: cannot disable (err = -32) set property "snps,dis_u3_susphy_quirk" in DT fix it. * tag 'sti-dt-for-v4.10-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STiH407-family: set snps,dis_u3_susphy_quirk Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'net/ipv4/tcp_timer.c')