From: Paul Bolle <pebolle@tiscali.nl>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: windfarm: decrement client count when unregistering
Date: Fri, 07 Aug 2015 01:09:49 +0200 [thread overview]
Message-ID: <1438902589.26981.14.camel@tiscali.nl> (raw)
In-Reply-To: <1438899707.25241.29.camel@tiscali.nl>
On vr, 2015-08-07 at 00:21 +0200, Paul Bolle wrote:
> On wo, 2015-08-05 at 14:16 +1000, Michael Ellerman wrote:
> > I also get an oops when removing windfarm_lm75_sensor, so I suspect there are
> > gremlins in the module ref counting for windfarm.
>
> (This I haven't (yet) looked into.)
And that might be, sort of, related. Because oops is probably triggered
by the, it seems, rather straightforward chain of events triggered by
unloading an I2C module. (So windfarm_lm75_sensor refcount must be
zero.) Which gets interesting at:
wf_lm75_remove()
wf_unregister_sensor(&wf_lm75_sensor->sens)
wf_put_sensor(&wf_lm75_sensor->sens)
module_put(wf_lm75_sensor->sens->ops->owner /* THIS_MODULE */)
And in windfarm_lm75_sensor we trigger this issue because in the
.probe() function there appears to be no corresponding call to
try_module_get() preventing unloading the module, as we saw in windfarm_
smu_sensors.
So module refcounting looks broken for both these modules in opposite
ways. Gremlins indeed.
Good luck!
Paul Bolle
next prev parent reply other threads:[~2015-08-06 23:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 12:08 [PATCH] " Paul Bolle
2015-08-05 4:16 ` Michael Ellerman
2015-08-06 22:21 ` Paul Bolle
2015-08-06 23:09 ` Paul Bolle [this message]
2015-08-10 9:27 ` Michael Ellerman
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=1438902589.26981.14.camel@tiscali.nl \
--to=pebolle@tiscali.nl \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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®