linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: David Herrmann <dh.herrmann@googlemail.com>
Cc: Greg KH <gregkh@suse.de>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Input: Remove unsafe device module references
Date: Tue, 1 Nov 2011 11:18:21 -0700	[thread overview]
Message-ID: <20111101181820.GC15216@core.coreip.homeip.net> (raw)
In-Reply-To: <CANq1E4T6urGVLC7xEa_4D=sCGYD0zsiVbH9u_E6O_xwuhR2Z4g@mail.gmail.com>

On Tue, Nov 01, 2011 at 07:09:27PM +0100, David Herrmann wrote:
> On Tue, Nov 1, 2011 at 7:00 PM, Greg KH <gregkh@suse.de> wrote:
> > On Tue, Nov 01, 2011 at 06:52:11PM +0100, David Herrmann wrote:
> >> My solution: Some parent subsystem of us must take and release this
> >> module-refcnt instead of us, so this bug doesn't occur.
> >
> > Yes, that is the ultimate solution for something like this.
> >
> > But, in reality, we don't care about module unloading races as there are
> > plenty of other issues involved there where things can go bad, so we
> > just try the best we can :)
> 
> Ah, I am kind of relieved that I got this right. I almost started
> thinking I am insane.. ;)
> 
> So your answer is that this is so unlikely that it won't be fixed? I
> am fine with that, even though I wonder why stuff like "struct
> file_operations" include "owner" fields to protect callbacks but
> "struct device_type" does *not* include any protection of it's
> "release" callback.

I think adding owner to device_type might not be a bad idea at all...

Thanks.

-- 
Dmitry

  reply	other threads:[~2011-11-01 18:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 15:41 [RFC] Input: Remove unsafe device module references David Herrmann
2011-11-01 17:01 ` Greg KH
2011-11-01 17:52   ` Dmitry Torokhov
2011-11-01 17:58     ` Greg KH
2011-11-01 17:52   ` David Herrmann
2011-11-01 18:00     ` Greg KH
2011-11-01 18:09       ` David Herrmann
2011-11-01 18:18         ` Dmitry Torokhov [this message]
2011-11-02 13:45           ` David Herrmann
2011-11-02 14:43             ` Greg KH
2011-11-01 18:05     ` Dmitry Torokhov
2011-11-01 18:16       ` David Herrmann

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=20111101181820.GC15216@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=dh.herrmann@googlemail.com \
    --cc=gregkh@suse.de \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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 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).