aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ip6_flowlabel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index 98fdcc6f51b1..e7fb7106550f 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -457,8 +457,10 @@ static int mem_check(struct sock *sk)
457 if (room > FL_MAX_SIZE - FL_MAX_PER_SOCK) 457 if (room > FL_MAX_SIZE - FL_MAX_PER_SOCK)
458 return 0; 458 return 0;
459 459
460 rcu_read_lock_bh();
460 for_each_sk_fl_rcu(np, sfl) 461 for_each_sk_fl_rcu(np, sfl)
461 count++; 462 count++;
463 rcu_read_unlock_bh();
462 464
463 if (room <= 0 || 465 if (room <= 0 ||
464 ((count >= FL_MAX_PER_SOCK || 466 ((count >= FL_MAX_PER_SOCK ||