Re: 2.6.12-rc1-mm2

Laurent Riffard
2005-03-25T18:01:32Z

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

Le 25.03.2005 02:00, Patrick Mochel a écrit :
> On Thu, 24 Mar 2005, Andrew Morton wrote:
>
>
>>Laurent Riffard <laurent.riffard@free.fr> wrote:
>>
>>> hello,
>>>
>>> Same kinds of problem here. It depends on the removed module. I
>>> mean: "rmmod loop" or "rmmod pcspkr" works. But "rmmod
>>> snd_ens1371" or "rmmod ohci1394" hangs.
>>>
>>> Sysrq-T when rmmoding snd_ens1371 :
>
> <snip>
>
>> It looks like we're getting stuck in the wait_for_completion() in
>> the new klist_remove().
>
> D'oh! It's getting hung while waiting to remove the current node from
> the list (which it can't remove because it's being used). The patch
> below should fix it.
>
> Pat
>
>
> ===== drivers/base/dd.c 1.3 vs edited =====
> --- 1.3/drivers/base/dd.c 2005-03-21 12:25:04 -08:00
> +++ edited/drivers/base/dd.c 2005-03-24 16:55:21 -08:00
> @@ -177,7 +177,7 @@
>
> sysfs_remove_link(&drv->kobj, kobject_name(&dev->kobj));
> sysfs_remove_link(&dev->kobj, "driver");
> - klist_remove(&dev->knode_driver);
> + klist_del(&dev->knode_driver);
>
> down(&dev->sem);
> device_detach_shutdown(dev);

Ok, I can confirm this patch solved the problem.

Thanks for your help.
--
laurent

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]