projects
/
platform
/
kernel
/
linux-arm64.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e267cb9
)
ipv6: protect for_each_sk_fl_rcu in mem_check with rcu_read_lock_bh
author
Hannes Frederic Sowa
<hannes@stressinduktion.org>
Fri, 8 Nov 2013 18:26:21 +0000
(19:26 +0100)
committer
David S. Miller
<davem@davemloft.net>
Mon, 11 Nov 2013 06:25:28 +0000
(
01:25
-0500)
Fixes a suspicious rcu derference warning.
Cc: Florent Fourcot <florent.fourcot@enst-bretagne.fr>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_flowlabel.c
patch
|
blob
|
history
diff --git
a/net/ipv6/ip6_flowlabel.c
b/net/ipv6/ip6_flowlabel.c
index
98fdcc6
..
e7fb710
100644
(file)
--- a/
net/ipv6/ip6_flowlabel.c
+++ b/
net/ipv6/ip6_flowlabel.c
@@
-457,8
+457,10
@@
static int mem_check(struct sock *sk)
if (room > FL_MAX_SIZE - FL_MAX_PER_SOCK)
return 0;
+ rcu_read_lock_bh();
for_each_sk_fl_rcu(np, sfl)
count++;
+ rcu_read_unlock_bh();
if (room <= 0 ||
((count >= FL_MAX_PER_SOCK ||