Re: [PATCH] raw1394 : Fix hang on unload

From: J.A. Magallon
Date: Tue Feb 08 2005 - 09:27:03 EST



On 2005.02.07, hugang@xxxxxxxxxxxx wrote:
> On Sun, Feb 06, 2005 at 02:41:15PM -0500, Parag Warudkar wrote:
> > I was seeing rmmod getting stuck consistently in D state while removing
> > raw1394. Looking at raw1394.c:cleanup_raw1394 - the order of doing
> > things seemed incorrect to me after comparing other places in raw1394.c
> > which do the same thing but with a different order.
> >
> > bash R running task 0 4319 3884 3900
> > (NOTLB)
> > rmmod D 0000008428792a16 0 4490 3900
> > (NOTLB)
> > ffff81001cff9dd8 0000000000000082 0000000000000000 0000000100000000
> > 0000007400000000 ffff8100211c9070 000000000000097b
> > ffff81002c8a2800
> > ffffffff80397c97 ffff81002b6f9360
> > Call Trace:<ffffffff80379d25>{__down+421}
> > <ffffffff80133510>{default_wake_function+0}
> > <ffffffff8037cd8c>{__down_failed+53}
> > <ffffffff801c0e40>{generic_delete_inode+0}
> > <ffffffff8029e540>{.text.lock.driver+5}
> > <ffffffff885a8260>{:raw1394:cleanup_raw1394+16}
> > <ffffffff8015eb31>{sys_delete_module+497}
> > <ffffffff8021a692>{__up_write+514}
> > <ffffffff80183efb>{sys_munmap+107} <ffffffff8010ecda>{system_call
> > +126}
> >
> > Attached patch fixes the rmmod raw1394 hang. Tested.
>
> I think sbp2 also need do this, attached patch will fix sbp2 rmmod
> hang, But not tested.
>

It happens the same for me with eth1394. Reversing the order of those
calls allows unloading of the module; as they are now, rmmod just hangs
forever...

I looked also at other 1394 drivers and all have the calls in 'bad' order.
Sure this ordering has to be reversed or it is correct and is triggering
other hidden bug ?

TIA

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-jam8 (gcc 3.4.3 (Mandrakelinux 10.2 3.4.3-3mdk)) #1

Attachment: pgp00000.pgp
Description: PGP signature