* [PATCH net-next] kcm: Call strp_stop before strp_done in kcm_attach
@ 2018-02-14 17:22 Tom Herbert
2018-02-14 20:38 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Tom Herbert @ 2018-02-14 17:22 UTC (permalink / raw)
To: davem; +Cc: netdev, Tom Herbert
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>
---
net/kcm/kcmsock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index f297d53a11aa..435594648dac 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -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;
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] kcm: Call strp_stop before strp_done in kcm_attach
2018-02-14 17:22 [PATCH net-next] kcm: Call strp_stop before strp_done in kcm_attach Tom Herbert
@ 2018-02-14 20:38 ` David Miller
2018-02-14 22:41 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2018-02-14 20:38 UTC (permalink / raw)
To: tom; +Cc: netdev
From: Tom Herbert <tom@quantonium.net>
Date: Wed, 14 Feb 2018 09:22:42 -0800
> 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>
Applied, thanks Tom.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] kcm: Call strp_stop before strp_done in kcm_attach
2018-02-14 20:38 ` David Miller
@ 2018-02-14 22:41 ` Eric Dumazet
0 siblings, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2018-02-14 22:41 UTC (permalink / raw)
To: David Miller, tom; +Cc: netdev
On Wed, 2018-02-14 at 15:38 -0500, David Miller wrote:
> From: Tom Herbert <tom@quantonium.net>
> Date: Wed, 14 Feb 2018 09:22:42 -0800
>
> > 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>
>
> Applied, thanks Tom.
If bug was add added in e5571240236c5652f then this patch should have
targeted net tree.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-14 22:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14 17:22 [PATCH net-next] kcm: Call strp_stop before strp_done in kcm_attach Tom Herbert
2018-02-14 20:38 ` David Miller
2018-02-14 22:41 ` Eric Dumazet
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.