linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Muchun Song <smuchun@gmail.com>, Greg KH <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Prateek Sood <prsood@codeaurora.org>,
	Mukesh Ojha <mojha@codeaurora.org>,
	gkohli@codeaurora.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	zhaowuyun@wingtech.com
Subject: Re: [PATCH v4] driver core: Fix use-after-free and double free on glue directory
Date: Wed, 26 Jun 2019 08:56:00 +1000	[thread overview]
Message-ID: <ef566c4c2881c70d673e8a76c47084c2a024cd5e.camel@kernel.crashing.org> (raw)
In-Reply-To: <CAPSr9jExG2C6U0D2TN-PUxgi9waD5QkSR-icxNPP1w9nJx3GUQ@mail.gmail.com>

On Tue, 2019-06-25 at 23:06 +0800, Muchun Song wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> 于2019年6月19日周三
> 上午5:51写道:
> > 
> > On Tue, 2019-06-18 at 18:13 +0200, Greg KH wrote:
> > > 
> > > Again, I am totally confused and do not see a patch in an email
> > > that
> > > I
> > > can apply...
> > > 
> > > Someone needs to get people to agree here...
> > 
> > I think he was hoping you would chose which solution you prefered
> > here
> 
> Yeah, right, I am hoping you would chose which solution you prefered
> here.
> Thanks.
> 
> > :-) His original or the one I suggested instead. I don't think
> > there's
> > anybody else with understanding of sysfs guts around to form an
> > opinion.
> > 

Muchun, I don't think Greg still has the previous emails. He deals with
too much to keep track of old stuff.

Can you send both patches tagged as [OPT1] and [OPT2] along with a
comment in one go so Greg can see both and decide ?

I think looking at the refcount is fragile, I might be wrong, but I
think it mostly paper over the root of the problem which is the fact
that the lock isn't taken accross both operations, thus exposing the
race. But I'm happy if Greg prefers your approach as long as it's
fixed.

Cheers,
Ben.


  reply	other threads:[~2019-06-25 22:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 14:23 [PATCH v4] driver core: Fix use-after-free and double free on glue directory Muchun Song
2019-05-24 19:04 ` Greg KH
2019-05-25 12:15   ` Muchun Song
2019-06-18 13:40     ` Muchun Song
2019-06-18 14:11       ` Benjamin Herrenschmidt
2019-06-18 15:28       ` Greg KH
2019-06-18 16:09         ` Muchun Song
2019-06-18 16:13           ` Greg KH
2019-06-18 21:51             ` Benjamin Herrenschmidt
2019-06-25 15:06               ` Muchun Song
2019-06-25 22:56                 ` Benjamin Herrenschmidt [this message]
2019-06-26  0:55                   ` Greg KH

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=ef566c4c2881c70d673e8a76c47084c2a024cd5e.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=gkohli@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mojha@codeaurora.org \
    --cc=prsood@codeaurora.org \
    --cc=rafael@kernel.org \
    --cc=smuchun@gmail.com \
    --cc=zhaowuyun@wingtech.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).