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

Alexey Kuznetsov
2006-05-30T16:01:01Z

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