From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: dccp@vger.kernel.org
Subject: Re: net/dccp: dccp_create_openreq_child freed held lock
Date: Wed, 01 Mar 2017 15:40:11 +0000 [thread overview]
Message-ID: <20170301154011.GF15145@kernel.org> (raw)
In-Reply-To: <CACT4Y+ZOAWRzJH3=xJ1z5bFVCM2-smuVSykziQPhSgkv1k3FBQ@mail.gmail.com>
Em Wed, Mar 01, 2017 at 12:35:10PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Mar 01, 2017 at 10:38:54AM +0100, Dmitry Vyukov escreveu:
> > Hello,
> >
> > I've got the following report while running syzkaller fuzzer on
> > 86292b33d4b79ee03e2f43ea0381ef85f077c760:
> >
> >
> > It seems that dccp_create_openreq_child needs to unlock the sock if
> > dccp_feat_activate_values fails.
>
> Yeah, can you please use the patch below, that mimics the error paths in
> sk_clone_new(), from where I think even the comment about it being a raw
Argh, s/sk_clone_new()/sk_clone_lock()/g
- Arnaldo
> copy came, but the bh_unlock_sock() didn't?
>
> - Arnaldo
>
> diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
> index 53eddf99e4f6..d20d948a98ed 100644
> --- a/net/dccp/minisocks.c
> +++ b/net/dccp/minisocks.c
> @@ -122,6 +122,7 @@ struct sock *dccp_create_openreq_child(const struct sock *sk,
> /* It is still raw copy of parent, so invalidate
> * destructor and make plain sk_free() */
> newsk->sk_destruct = NULL;
> + bh_unlock_sock(newsk);
> sk_free(newsk);
> return NULL;
> }
WARNING: multiple messages have this Message-ID (diff)
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
Gerrit Renker <gerrit@erg.abdn.ac.uk>,
David Miller <davem@davemloft.net>,
dccp@vger.kernel.org, netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
syzkaller <syzkaller@googlegroups.com>
Subject: Re: net/dccp: dccp_create_openreq_child freed held lock
Date: Wed, 1 Mar 2017 12:40:11 -0300 [thread overview]
Message-ID: <20170301154011.GF15145@kernel.org> (raw)
In-Reply-To: <20170301153510.GE15145@kernel.org>
Em Wed, Mar 01, 2017 at 12:35:10PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Mar 01, 2017 at 10:38:54AM +0100, Dmitry Vyukov escreveu:
> > Hello,
> >
> > I've got the following report while running syzkaller fuzzer on
> > 86292b33d4b79ee03e2f43ea0381ef85f077c760:
> >
> >
> > It seems that dccp_create_openreq_child needs to unlock the sock if
> > dccp_feat_activate_values fails.
>
> Yeah, can you please use the patch below, that mimics the error paths in
> sk_clone_new(), from where I think even the comment about it being a raw
Argh, s/sk_clone_new()/sk_clone_lock()/g
- Arnaldo
> copy came, but the bh_unlock_sock() didn't?
>
> - Arnaldo
>
> diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
> index 53eddf99e4f6..d20d948a98ed 100644
> --- a/net/dccp/minisocks.c
> +++ b/net/dccp/minisocks.c
> @@ -122,6 +122,7 @@ struct sock *dccp_create_openreq_child(const struct sock *sk,
> /* It is still raw copy of parent, so invalidate
> * destructor and make plain sk_free() */
> newsk->sk_destruct = NULL;
> + bh_unlock_sock(newsk);
> sk_free(newsk);
> return NULL;
> }
next prev parent reply other threads:[~2017-03-01 15:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-01 9:38 net/dccp: dccp_create_openreq_child freed held lock Dmitry Vyukov
2017-03-01 9:38 ` Dmitry Vyukov
2017-03-01 15:35 ` Arnaldo Carvalho de Melo
2017-03-01 15:35 ` Arnaldo Carvalho de Melo
2017-03-01 15:40 ` Arnaldo Carvalho de Melo [this message]
2017-03-01 15:40 ` Arnaldo Carvalho de Melo
2017-03-02 10:11 ` Dmitry Vyukov
2017-03-02 10:11 ` Dmitry Vyukov
2017-05-04 13:36 ` Andrey Konovalov
2017-05-04 13:36 ` Andrey Konovalov
2017-05-04 13:53 ` David Miller
2017-05-04 13:53 ` David Miller
2017-05-04 13:54 ` Andrey Konovalov
2017-05-04 13:54 ` Andrey Konovalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170301154011.GF15145@kernel.org \
--to=acme@kernel.org \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.