Files
kernel_google_wahoo/include/net
WANG Cong faf4586056 ipv6: fix a potential deadlock in do_ipv6_setsockopt()
commit 8651be8f14a12d24f203f283601d9b0418c389ff upstream.

Baozeng reported this deadlock case:

       CPU0                    CPU1
       ----                    ----
  lock([  165.136033] sk_lock-AF_INET6);
                               lock([  165.136033] rtnl_mutex);
                               lock([  165.136033] sk_lock-AF_INET6);
  lock([  165.136033] rtnl_mutex);

Similar to commit 87e9f03159
("ipv4: fix a potential deadlock in mcast getsockopt() path")
this is due to we still have a case, ipv6_sock_mc_close(),
where we acquire sk_lock before rtnl_lock. Close this deadlock
with the similar solution, that is always acquire rtnl lock first.

Fixes: baf606d9c9 ("ipv4,ipv6: grab rtnl before locking the socket")
Reported-by: Baozeng Ding <sploving1@gmail.com>
Tested-by: Baozeng Ding <sploving1@gmail.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Zubin Mithra <zsm@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-16 19:45:05 +02:00
..
2018-09-29 03:08:51 -07:00
2019-03-23 08:44:34 +01:00
2014-09-18 10:54:36 +02:00
2019-02-23 09:05:14 +01:00
2018-10-20 09:52:36 +02:00
2015-03-06 21:50:02 -05:00
2015-09-17 17:18:37 -07:00
2018-02-25 11:03:34 +01:00
2017-06-07 12:05:59 +02:00
2014-09-30 01:02:26 -04:00
2019-03-23 08:44:23 +01:00
2019-03-23 08:44:23 +01:00
2019-02-08 11:25:31 +01:00
2015-10-08 04:27:03 -07:00
2015-10-23 06:26:42 -07:00
2018-05-16 10:06:50 +02:00
2018-02-25 11:03:40 +01:00
2015-03-12 22:58:12 -04:00
2015-10-26 22:24:22 -07:00