Re: [patch, -rc5-mm1] lock validator: remove softirq.c WARN_ON

From: Alexey Kuznetsov
Date: Tue May 30 2006 - 12:00:09 EST


Hello!

> ok, that WARN_ON is over-eager. Fix is below:

Nevertheless, I cannot figure out what's happening here.

This local_bh_disable() is called right after schedule().
No way irqs can be disabled there. What is wrong?


static void netlink_table_grab(void)
{
write_lock_bh(&nl_table_lock);

if (atomic_read(&nl_table_users)) {
DECLARE_WAITQUEUE(wait, current);

add_wait_queue_exclusive(&nl_table_wait, &wait);
for(;;) {
set_current_state(TASK_UNINTERRUPTIBLE);
if (atomic_read(&nl_table_users) == 0)
break;
write_unlock_bh(&nl_table_lock);
schedule();
write_lock_bh(&nl_table_lock);
}

__set_current_state(TASK_RUNNING);
remove_wait_queue(&nl_table_wait, &wait);
}
}


Alexey
-
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/