]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: move sock lock in smc_ioctl()
authorUrsula Braun <ubraun@linux.ibm.com>
Wed, 8 Aug 2018 12:13:21 +0000 (14:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Aug 2018 02:14:22 +0000 (19:14 -0700)
commita4f1d53f10c4473841df235a3bf5f99cf9444a2c
tree3edc813b7168552a1ca9afad1f04b698a65f371e
parenta26fa29609800c82ad2d84849d5f6ecfcaafcbd6
net/smc: move sock lock in smc_ioctl()

When an SMC socket is connecting it is decided whether fallback to
TCP is needed. To avoid races between connect and ioctl move the
sock lock before the use_fallback check.

Reported-by: syzbot+5b2cece1a8ecb2ca77d8@syzkaller.appspotmail.com
Reported-by: syzbot+19557374321ca3710990@syzkaller.appspotmail.com
Fixes: 8e7bb6387171 ("net/smc: take sock lock in smc_ioctl()")
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/af_smc.c