[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] kobject_put vs module unload
- From: Kay Sievers <kay sievers vrfy org>
- To: Mikulas Patocka <mpatocka redhat com>
- Cc: dm-devel redhat com, Greg KH <gregkh suse de>, linux-kernel vger kernel org
- Subject: Re: [dm-devel] kobject_put vs module unload
- Date: Sat, 8 Jan 2011 18:23:16 +0100
On Sat, Jan 8, 2011 at 14:19, Mikulas Patocka <mpatocka redhat com> wrote:
> On Fri, 7 Jan 2011, Greg KH wrote:
>> > 4) the reference obtained at point 1) is dropped, kobject reference count
>> > reaches zero and the release callback is called. But that callback points
>> > to an unloaded module and causes a crash.
>> >
>> > How is it solved? Am I missing something?
>>
>> You have the code that creates and frees the object, to not be in the
>> module that could have been unloaded. It's really just that simple.
>
> If the whole device mapper subsystem can be a module, where can I put the
> code?
>
> I think a similar bug exists in md, it can also be unloaded as a module
> and it has "release" method in its module code.
If you still have data structures hanging around, these structures are
supposed to take a reference on the module -- and you can not unload
the module as long as this is the case.
Kay
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]