mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-01 06:46:35 +01:00
kcm: Call strp_stop before strp_done in kcm_attach
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: [email protected]
Fixes: e557124023 ("kcm: Check if sk_user_data already set in kcm_attach"
Signed-off-by: Tom Herbert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
0e47079b6c
commit
dff8baa261
1 file changed
+1
@@ -1417,6 +1417,7 @@ static int kcm_attach(struct socket *sock, struct socket *csock,
|
||||
*/
|
||||
if (csk->sk_user_data) {
|
||||
write_unlock_bh(&csk->sk_callback_lock);
|
||||
strp_stop(&psock->strp);
|
||||
strp_done(&psock->strp);
|
||||
kmem_cache_free(kcm_psockp, psock);
|
||||
return -EALREADY;
|
||||
|
||||
Reference in new issue
Block a user