Re: [PATCH 2.6.17-rc3] Fix capi reload by unregistering the correct major
From: Stefan Schweizer
Date: Tue May 09 2006 - 13:12:38 EST
Andrew Morton wrote:
> Stefan Schweizer <genstef@xxxxxxxxxx> wrote:
>> --- drivers/isdn/capi/capi.c.orig 2006-04-29 18:40:25.000000000 +0200
>> +++ drivers/isdn/capi/capi.c 2006-04-29 18:27:22.000000000 +0200
>> @@ -1499,7 +1499,6 @@
>> printk(KERN_ERR "capi20: unable to get major %d\n", capi_major);
>> return major_ret;
>> }
>> - capi_major = major_ret;
>> capi_class = class_create(THIS_MODULE, "capi");
>> if (IS_ERR(capi_class)) {
>> unregister_chrdev(capi_major, "capi20");
>>
>>
>>
>
> What does "unload and retry" mean?
>
> An `rmmod capi;modprobe capi' will reset the major to 68, so you must mean
> something else. What?
I mean exactly rmmod capi; modprobe capi. The problem is, that on unload
time, the capi_major has been set to major_ret, which is 0 if a major
number is given. Of course it does not unregister 68 then. Consequently
when trying to load it a second time after unloading it fails, because it
has not freed the major 68.
Regards,
Stefan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/