From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
To: David Brownell <david-b@pacbell.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] prevent gpio chip drivers from unloading while used
Date: Sat, 9 Feb 2008 12:41:45 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0802091240160.4147@axis700.grange> (raw)
In-Reply-To: <200802081714.18795.david-b@pacbell.net>
On Fri, 8 Feb 2008, David Brownell wrote:
> > Yes, that's what I'm saying. I had a GPIO in use and rmmod-ed pca953x. It
> > did produce an error message
> >
> > pca953x 0-0041: gpiochip_remove() failed, -16
> >
> > , but rmmod completed.
>
> Doesn't that seem buglike to you?
>
> Oh, right -- the module exit code will ignore that status, it doesn't
> even have a way to report failures any more. Crap.
>
> So it looks like we have no choice but to do this. Can you make sure
> all the rmmod-capable gpio_chip drivers support this? Ignore the SOC
> support, that never supports rmmod -- just the stuff in drivers/gpio.
As long as you find these two patches acceptable, I'll cook up an
incremental patch to fix those.
> > AFAIU, the only 2 ways currently to prevent rmmod
> > from completing, are: increment module use-count, then the respective
> > module_exit() function is not called at all and rmmod fails with -EBUSY.
> > Or block in rmmod until the resource becomes free. None of these has
> > happened. BTW, I think, there's the same problem with i2c adapter drivers.
>
> Right. In fact, every time you'd expect driver removal errors to
> cause module removal to fail. Maybe this is part of that whole
> "should we even *support* rmmod" discussion, which I tuned out.
We don't want to start another one here, do we?:-)
Thanks
Guennadi
---
Guennadi Liakhovetski
prev parent reply other threads:[~2008-02-09 11:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 11:10 Guennadi Liakhovetski
2008-02-09 0:01 ` David Brownell
2008-02-09 0:45 ` Guennadi Liakhovetski
2008-02-09 1:14 ` David Brownell
2008-02-09 11:41 ` Guennadi Liakhovetski [this message]
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=Pine.LNX.4.64.0802091240160.4147@axis700.grange \
--to=g.liakhovetski@pengutronix.de \
--cc=david-b@pacbell.net \
--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
all inboxes | Powered by JetHome®