Skip to content

Commit dff8baa

Browse files
Tom Herbertdavem330
authored andcommitted
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: e557124 ("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]>
1 parent 0e47079 commit dff8baa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/kcm/kcmsock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,7 @@ static int kcm_attach(struct socket *sock, struct socket *csock,
14171417
*/
14181418
if (csk->sk_user_data) {
14191419
write_unlock_bh(&csk->sk_callback_lock);
1420+
strp_stop(&psock->strp);
14201421
strp_done(&psock->strp);
14211422
kmem_cache_free(kcm_psockp, psock);
14221423
return -EALREADY;

0 commit comments

Comments
 (0)