[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <550C2DA0.6050809@cogentembedded.com>
Date: Fri, 20 Mar 2015 17:24:32 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
netdev@...r.kernel.org
CC: hannes@...essinduktion.org
Subject: Re: [PATCH net-next] ipv6: invert join/leave anycast rtnl/socket
locking order
Hello.
On 3/20/2015 4:20 PM, Marcelo Ricardo Leitner wrote:
> 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 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@...el.com>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
> ---
> net/ipv6/anycast.c | 9 ++++-----
> net/ipv6/ipv6_sockglue.c | 2 ++
> 2 files changed, 6 insertions(+), 5 deletions(-)
> diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
> index baf2742d1ec47ee1b9cf62d087afb8b7d7195921..a1db95e863ffdd1aa1cb5112da11ccdef9e945fd 100644
> --- a/net/ipv6/anycast.c
> +++ b/net/ipv6/anycast.c
[...]
> @@ -155,7 +156,6 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
> prev_pac = pac;
> }
> if (!pac) {
> - rtnl_unlock();
> return -ENOENT;
> }
Get rid of {} please, as they're not needed anymore.
[...]
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists