android_kernel_oneplus_msm8998/include
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
..
acpi
asm-generic asm-generic: Fix local variable shadow in __set_fixmap_offset 2019-04-03 06:23:23 +02:00
clocksource
crypto crypto: vmac - separate tfm and request context 2018-08-17 20:56:45 +02:00
drm drm: Add DP PSR2 sink enable bit 2018-08-06 16:24:39 +02:00
dt-bindings ARM: dts: Fix omap3 off mode pull defines 2017-11-21 09:21:19 +01:00
keys KEYS: user: Align the payload buffer 2019-03-23 08:44:17 +01:00
kvm
linux USB: core: Fix bug caused by duplicate interface PM usage counter 2019-05-16 19:45:00 +02:00
math-emu
media media: v4l: event: Prevent freeing event subscriptions while accessed 2018-10-10 08:52:10 +02:00
memory
misc
net ipv6: fix a potential deadlock in do_ipv6_setsockopt() 2019-05-16 19:45:05 +02:00
pcmcia
ras
rdma IB/core: Make testing MR flags for writability a static inline function 2018-08-15 17:42:06 +02:00
rxrpc
scsi scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state 2018-11-10 07:41:37 -08:00
soc memory: tegra: Apply interrupts mask per SoC 2018-08-06 16:24:38 +02:00
sound ALSA: compress: Fix stop handling on compressed capture streams 2019-02-20 10:13:16 +01:00
target target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2018-01-17 09:35:31 +01:00
trace ext4: force inode writes when nfsd calls commit_metadata() 2019-01-13 10:05:30 +01:00
uapi uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define 2019-02-20 10:13:24 +01:00
video udlfb: set optimal write delay 2018-09-09 20:04:36 +02:00
xen fix xen_swiotlb_dma_mmap prototype 2017-10-05 09:41:48 +02:00
Kbuild