kcm: Call strp_stop before strp_done in kcm_attach
authorTom Herbert <tom@quantonium.net>
Wed, 14 Feb 2018 17:22:42 +0000 (09:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 May 2018 08:08:40 +0000 (10:08 +0200)
commit383250363daf01eb7aa3728c09ef8a4f6d8a3252
treeaf81f6a1113d591412e1d90a0bba67e8df8f05f9
parent1899f679355d34d18447e76fa76eae16299fddda
kcm: Call strp_stop before strp_done in kcm_attach

commit dff8baa261174de689a44572d0ea182d7aa70598 upstream.

In kcm_attach strp_done is called when sk_user_data is already
set to fail the attach. strp_done needs the strp to be stopped and
warns if it isn't. Call strp_stop in this case to eliminate the
warning message.

Reported-by: syzbot+88dfb55e4c8b770d86e3@syzkaller.appspotmail.com
Fixes: e5571240236c5652f ("kcm: Check if sk_user_data already set in kcm_attach"
Signed-off-by: Tom Herbert <tom@quantonium.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/kcm/kcmsock.c