aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-10-14 16:01:20 -0400
committerDavid S. Miller <davem@davemloft.net>2018-10-14 16:01:20 -0400
commit028c99fa912b4ad2174793da97694a9c4b2cd305 (patch)
tree43d8bcccc596a098f490c6e244fd0350750d7886 /tools
parentbab5c80b211035739997ebd361a679fa85b39465 (diff)
parentcee271678d0e3177a25d0fcb2fa5e051d48e4262 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says: ==================== pull-request: bpf 2018-10-14 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix xsk map update and delete operation to not call synchronize_net() but to piggy back on SOCK_RCU_FREE for sockets instead as we are not allowed to sleep under RCU, from Björn. 2) Do not change RLIMIT_MEMLOCK in reuseport_bpf selftest if the process already has unlimited RLIMIT_MEMLOCK, from Eric. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/net/reuseport_bpf.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/testing/selftests/net/reuseport_bpf.c b/tools/testing/selftests/net/reuseport_bpf.c
index cad14cd0ea92..b5277106df1f 100644
--- a/tools/testing/selftests/net/reuseport_bpf.c
+++ b/tools/testing/selftests/net/reuseport_bpf.c
@@ -437,14 +437,19 @@ void enable_fastopen(void)
437 } 437 }
438} 438}
439 439
440static struct rlimit rlim_old, rlim_new; 440static struct rlimit rlim_old;
441 441
442static __attribute__((constructor)) void main_ctor(void) 442static __attribute__((constructor)) void main_ctor(void)
443{ 443{
444 getrlimit(RLIMIT_MEMLOCK, &rlim_old); 444 getrlimit(RLIMIT_MEMLOCK, &rlim_old);
445 rlim_new.rlim_cur = rlim_old.rlim_cur + (1UL << 20); 445
446 rlim_new.rlim_max = rlim_old.rlim_max + (1UL << 20); 446 if (rlim_old.rlim_cur != RLIM_INFINITY) {
447 setrlimit(RLIMIT_MEMLOCK, &rlim_new); 447 struct rlimit rlim_new;
448
449 rlim_new.rlim_cur = rlim_old.rlim_cur + (1UL << 20);
450 rlim_new.rlim_max = rlim_old.rlim_max + (1UL << 20);
451 setrlimit(RLIMIT_MEMLOCK, &rlim_new);
452 }
448} 453}
449 454
450static __attribute__((destructor)) void main_dtor(void) 455static __attribute__((destructor)) void main_dtor(void)