public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Sven Van Asbroeck <thesven73@gmail.com>,
	Kees Cook <keescook@chromium.org>, Tejun Heo <tj@kernel.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Sebastian Reichel <sre@kernel.org>
Subject: Re: [RFC v1 0/3] Address potential user-after-free on module unload
Date: Fri, 8 Feb 2019 07:51:27 +0100	[thread overview]
Message-ID: <20190208065127.GA27770@kroah.com> (raw)
In-Reply-To: <CAKdAkRQbCj59_Cw2RqpyDEU2zzn4ajOjXF44NE2LJ7QB8-DLtw@mail.gmail.com>

On Wed, Feb 06, 2019 at 09:30:29AM -0800, Dmitry Torokhov wrote:
> On Wed, Feb 6, 2019 at 8:47 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Tue, Feb 05, 2019 at 02:12:31PM -0500, Sven Van Asbroeck wrote:
> > > On Tue, Feb 5, 2019 at 1:43 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > >
> > > >
> > > > It really should happen when the device is removed (if it is a driver
> > > > that binds to a device.)
> > >
> > > Absolutely. That's why I'm advocating adding a devm_init_work(),
> > > which will take care of this automatically.
> > >
> > > But it's of course not universally applicable. Not all drivers use devm.
> >
> > Ick, no, watch out for devm() calls.  Odds are this is _NOT_ what you
> > want to do for a device.  Remember when devm calls get freed (hint, not
> > at driver unbind/unload, but at device structure removal.
> 
> 
> ??? We unwind devm on probe() failure and after remove() is called.
> The device can live on.

{sigh} you are right, I don't know what I was thinking.  Then why were
the DRM developers so upset that they didn't see this happening
recently?  Anyway, all should be fine here, nevermind...

thanks,

greg k-h

  parent reply	other threads:[~2019-02-08  6:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 22:09 [RFC v1 0/3] Address potential user-after-free on module unload Sven Van Asbroeck
2019-02-04 22:09 ` [RFC v1 1/3] workqueue: Add resource-managed version of INIT_[DELAYED_]WORK() Sven Van Asbroeck
2019-02-08 17:06   ` Tejun Heo
2019-02-08 18:15     ` Sven Van Asbroeck
2019-02-04 22:09 ` [RFC v1 2/3] max17042_battery: fix potential user-after-free on module unload Sven Van Asbroeck
2019-02-05  8:27   ` Dmitry Torokhov
2019-02-05 14:27     ` Sven Van Asbroeck
2019-02-05 17:21       ` Sebastian Reichel
2019-02-04 22:09 ` [RFC v1 3/3] cap11xx: " Sven Van Asbroeck
2019-02-05  8:18   ` Dmitry Torokhov
2019-02-05  8:34     ` Dmitry Torokhov
2019-02-05 21:24     ` Jacek Anaszewski
2019-02-05 21:43       ` Dmitry Torokhov
2019-02-05 22:03         ` Sven Van Asbroeck
2019-02-05 14:57 ` [RFC v1 0/3] Address " Kees Cook
2019-02-05 15:22   ` Sven Van Asbroeck
2019-02-05 18:43     ` Greg KH
2019-02-05 19:12       ` Sven Van Asbroeck
2019-02-06 16:46         ` Greg KH
2019-02-06 17:30           ` Dmitry Torokhov
2019-02-06 17:49             ` Sven Van Asbroeck
2019-02-08  6:51             ` Greg KH [this message]
2019-02-05 18:42   ` Greg KH
2019-02-07 21:49   ` Sven Van Asbroeck
2019-02-07 22:20     ` Dmitry Torokhov
2019-02-07 22:27       ` Sven Van Asbroeck
2019-02-07 22:32       ` Sven Van Asbroeck
2019-02-07 22:48         ` Dmitry Torokhov
2019-02-08  4:30         ` Miguel Ojeda
2019-02-10 18:05           ` Sven Van Asbroeck
2019-02-14  1:11             ` Miguel Ojeda
2019-02-14 15:23               ` Sven Van Asbroeck
     [not found]     ` <CAGngYiXcogd69n-MvBD1n5ZJpBzqCau8UOfLMgXEXLnAev=srw@mail.gmail.com>
     [not found]       ` <alpine.DEB.2.21.1902080745480.4201@hadrien>
2019-02-14 17:52         ` Fwd: " Sven Van Asbroeck

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=20190208065127.GA27770@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sre@kernel.org \
    --cc=thesven73@gmail.com \
    --cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox