diff options
author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2015-03-20 11:37:17 -0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-20 13:32:38 -0400 |
commit | c4a6853d8fb2b122686bc6a7c472956e87090f4e (patch) | |
tree | 21c8e63f1db8c82c8e5266374a82cc89fff1c270 /net/ipv6/ipv6_sockglue.c | |
parent | 149d7549c22045bc777a377720809b108639f9e9 (diff) | |
download | linux-stable-c4a6853d8fb2b122686bc6a7c472956e87090f4e.tar.gz linux-stable-c4a6853d8fb2b122686bc6a7c472956e87090f4e.tar.bz2 linux-stable-c4a6853d8fb2b122686bc6a7c472956e87090f4e.zip |
ipv6: invert join/leave anycast rtnl/socket locking order
Commit baf606d9c9b1 ("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: baf606d9c9b1 ("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>
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index cc5883791bac..9b2cb1444230 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -122,6 +122,8 @@ static bool setsockopt_needs_rtnl(int optname) switch (optname) { case IPV6_ADD_MEMBERSHIP: case IPV6_DROP_MEMBERSHIP: + case IPV6_JOIN_ANYCAST: + case IPV6_LEAVE_ANYCAST: case MCAST_JOIN_GROUP: case MCAST_LEAVE_GROUP: case MCAST_JOIN_SOURCE_GROUP: |