kcm: lock lower socket in kcm_attach
authorTom Herbert <tom@quantonium.net>
Tue, 13 Mar 2018 19:01:43 +0000 (12:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Mar 2018 15:12:16 +0000 (11:12 -0400)
commit2cc683e88c0c993ac3721d9b702cb0630abe2879
tree5fc199bed7dada28faa68ad075e5118937d48ecf
parente693be293f16fe446c3a1b72f8bbc0a5101ca5ea
kcm: lock lower socket in kcm_attach

Need to lock lower socket in order to provide mutual exclusion
with kcm_unattach.

v2: Add Reported-by for syzbot

Fixes: ab7ac4eb9832e32a09f4e804 ("kcm: Kernel Connection Multiplexor module")
Reported-by: syzbot+ea75c0ffcd353d32515f064aaebefc5279e6161e@syzkaller.appspotmail.com
Signed-off-by: Tom Herbert <tom@quantonium.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/kcm/kcmsock.c