]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: flowlabel: fl6_sock_lookup() must use atomic_inc_not_zero
authorEric Dumazet <edumazet@google.com>
Thu, 6 Jun 2019 21:32:34 +0000 (14:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 9 Jun 2019 20:07:14 +0000 (13:07 -0700)
commit1f26fbb2041c822c06d909203e1a541683cc4a11
treeb3123d60841736cf01855d36332b3f0410a3129b
parentc0f5b410d80bd2712b7ce3192492f345c96d4b0d
ipv6: flowlabel: fl6_sock_lookup() must use atomic_inc_not_zero

Before taking a refcount, make sure the object is not already
scheduled for deletion.

Same fix is needed in ipv6_flowlabel_opt()

Fixes: 2dfe21a415ee ("ipv6 flowlabel: Convert np->ipv6_fl_list to RCU.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_flowlabel.c