From: Hu Gang This is an untested fix for sbp2 based on Parag Warudkar's recently-merged fix for raw1394. 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:{__down+421} > {default_wake_function+0} > {__down_failed+53} > {generic_delete_inode+0} > {.text.lock.driver+5} > {:raw1394:cleanup_raw1394+16} > {sys_delete_module+497} > {__up_write+514} > {sys_munmap+107} {system_call > +126} > > Attached patch fixes the rmmod raw1394 hang. Signed-off-by: Andrew Morton --- 25-akpm/drivers/ieee1394/sbp2.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/ieee1394/sbp2.c~sbp2-fix-hang-on-unload drivers/ieee1394/sbp2.c --- 25/drivers/ieee1394/sbp2.c~sbp2-fix-hang-on-unload Wed Feb 9 13:53:00 2005 +++ 25-akpm/drivers/ieee1394/sbp2.c Wed Feb 9 13:53:00 2005 @@ -2851,9 +2851,9 @@ static void __exit sbp2_module_exit(void { SBP2_DEBUG("sbp2_module_exit"); - hpsb_unregister_protocol(&sbp2_driver); - hpsb_unregister_highlevel(&sbp2_highlevel); + + hpsb_unregister_protocol(&sbp2_driver); } module_init(sbp2_module_init); _