From: Greg KH <gregkh@linuxfoundation.org>
To: yangerkun <yangerkun@huawei.com>
Cc: stable@vger.kernel.org, davem@davemloft.net,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 4.4-stable] slip: stop double free sl->dev in slip_open
Date: Thu, 27 Feb 2020 13:49:11 +0100 [thread overview]
Message-ID: <20200227124911.GA1007215@kroah.com> (raw)
In-Reply-To: <4e89e339-e161-fd8e-85e0-e59cdcc9688f@huawei.com>
On Mon, Feb 24, 2020 at 11:06:48AM +0800, yangerkun wrote:
> cc David and netdev mail list too.
>
> On 2020/2/22 17:46, yangerkun wrote:
> > After commit e4c157955483 ("slip: Fix use-after-free Read in slip_open"),
> > we will double free sl->dev since sl_free_netdev will free sl->dev too.
> > It's fine for mainline since sl_free_netdev in mainline won't free
> > sl->dev.
> >
> > Signed-off-by: yangerkun <yangerkun@huawei.com>
> > ---
> > drivers/net/slip/slip.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
> > index ef6b25ec75a1..7fe9183fad0e 100644
> > --- a/drivers/net/slip/slip.c
> > +++ b/drivers/net/slip/slip.c
> > @@ -861,7 +861,6 @@ err_free_chan:
> > tty->disc_data = NULL;
> > clear_bit(SLF_INUSE, &sl->flags);
> > sl_free_netdev(sl->dev);
> > - free_netdev(sl->dev);
> > err_exit:
> > rtnl_unlock();
> >
>
What commit causes this only to be needed on the 4.4-stable tree? Can
you please list it in the commit log so that we know this?
And this is only for 4.4.y, not 4.9.y or anything else? Why?
thanks,
greg k-h
next prev parent reply other threads:[~2020-02-27 12:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-22 9:46 [PATCH 4.4-stable] slip: stop double free sl->dev in slip_open yangerkun
2020-02-24 3:06 ` yangerkun
2020-02-27 12:49 ` Greg KH [this message]
2020-02-27 14:20 ` yangerkun
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=20200227124911.GA1007215@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yangerkun@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).