lkml.org 
[lkml]   [2000]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectProblem with notifier_lock in notifier_chain_unregister with 2.4. 0-test5
Date
I am trying create a patch for the 3ware driver to have it notify the cards
firmware
of a pending shutdown using register_reboot_notifier() and
unregister_reboot_notifier().

The problem is that under SMP, the system gets partially hung in
notifier_chain_unregister()
in kernel/sys.c in this area:

int notifier_chain_unregister(struct notifier_block **nl, struct
notifier_block *n)
{
write_lock (&notifier_lock); ----> The system gets stuck
right here and never gets this lock
while ((*nl)!=NULL)
{
if ((*nl)==n)
{
*nl=n->next;
write_unlock(&notifier_lock);
return 0;
}
nl=&(*nl)->next);
}
write_unlock(&notifier_lock);
return -ENOENT;
}

It is probably worth noting that the 2.2.X kernels don't have this lock
scheme, and removing it fixes the
problem. Is this lock scheme correct in 2.4.0 ?

--
Adam Radford
Software Engineer
3ware, Inc.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.037 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site