]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: invert join/leave anycast rtnl/socket locking order
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Fri, 20 Mar 2015 14:37:17 +0000 (11:37 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Mar 2015 17:32:38 +0000 (13:32 -0400)
commitb03fb2b847450be0e8d52d2b5d82d327bc1980f5
tree21c8e63f1db8c82c8e5266374a82cc89fff1c270
parent4c59f4cf9365effd1d9fa67f787608038c1b5ee5
ipv6: invert join/leave anycast rtnl/socket locking order

Commit 2ed51ebd23be ("ipv4,ipv6: grab rtnl before locking the socket")
missed to update two setsockopt options, IPV6_JOIN_ANYCAST and
IPV6_LEAVE_ANYCAST, causing a lock inverstion regarding to the updated ones.

As ipv6_sock_ac_join and ipv6_sock_ac_leave are only called from
do_ipv6_setsockopt, we are good to just move the rtnl lock upper.

Fixes: 2ed51ebd23be ("ipv4,ipv6: grab rtnl before locking the socket")
Reported-by: Ying Huang <ying.huang@intel.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/anycast.c
net/ipv6/ipv6_sockglue.c