Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1202158

Re: windfarm: decrement client count when unregistering

From Paul Bolle <pebolle@tiscali.nl>
Newsgroups linux.kernel
Subject Re: windfarm: decrement client count when unregistering
Date 2015-08-07 01:20 +0200
Message-ID <pUCC6-6KD-7@gated-at.bofh.it> (permalink)
References <pTYlk-6ZG-7@gated-at.bofh.it> <pUBPH-5As-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: windfarm: decrement client count when unregistering Michael Ellerman <mpe@ellerman.id.au> - 2015-08-05 06:20 +0200
  Re: windfarm: decrement client count when unregistering Paul Bolle <pebolle@tiscali.nl> - 2015-08-07 00:30 +0200
    Re: windfarm: decrement client count when unregistering Paul Bolle <pebolle@tiscali.nl> - 2015-08-07 01:20 +0200

csiph-web