lkml.org 
[lkml]   [2007]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: pktcdvd oops
From
Hello,

have not tested it yet, but i quess, the code mentioned by Peter
is in pkt_new_dev() that is called by pkt_setup_dev():

/* This is safe, since we have a reference from open(). */
__module_get(THIS_MODULE);


So, now, there must be checks in every sysfs operation in the module code,
to ensure that the module is still loaded?

BTW: the bug report says:

Steps to reproduce:

modprobe pktcdvd
echo 22:0 >/sys/class/pktcdvd/add

Is there any module unload??? Why is the module not available after the modprobe, but the sysfs entries, generated by the module? Confused ;)

-Thomas


Am 06.11.2007, 10:06 Uhr, schrieb Tejun Heo <htejun@gmail.com>:

> [Greg cc'd]
>
> Peter Osterlund wrote:
>> On Mon, 5 Nov 2007, Jens Axboe wrote:
>>
>>> Hi Peter,
>>>
>>> You don't seem to have a bugzilla account, so could not reassign to you.
>>> See http://bugzilla.kernel.org/show_bug.cgi?id=9294
>>
>> Problem is repeatable on my computer. It dies in __module_get() on this
>> line:
>>
>> BUG_ON(module_refcount(module) == 0);
>>
>> I think this is because commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15,
>> which states: "Note that with this change, userland holding a sysfs node
>> does not prevent the backing module from being unloaded."
>>
>> Unfortunately, I don't know how this sysfs stuff is supposed to work,
>> and therefore don't know how to fix the problem.
>
> Does this fix the problem?
>


-
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/

\
 
 \ /
  Last update: 2007-11-06 22:11    [W:0.054 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site