netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Slaby <jirislaby@gmail.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, jgarzik@pobox.com,
	netdev@vger.kernel.org, alan@redhat.com
Subject: Re: [patch, -rc5-mm1] lock validator: remove softirq.c WARN_ON
Date: Tue, 30 May 2006 20:00:24 +0400	[thread overview]
Message-ID: <20060530160024.GA8987@ms2.inr.ac.ru> (raw)
In-Reply-To: <20060530115545.GA7025@elte.hu>

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

  reply	other threads:[~2006-05-30 16:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060530022925.8a67b613.akpm@osdl.org>
2006-05-30 11:02 ` BUG: warning at ... (netlink) [Was: 2.6.17-rc5-mm1] Jiri Slaby
2006-05-30 11:55   ` [patch, -rc5-mm1] lock validator: remove softirq.c WARN_ON Ingo Molnar
2006-05-30 16:00     ` Alexey Kuznetsov [this message]
2006-05-30 16:05       ` Arjan van de Ven
2006-05-30 16:15         ` Alexey Kuznetsov
2006-05-30 15:59 ` 2.6.17-rc5-mm1 Michal Piotrowski
2006-05-30 16:08   ` 2.6.17-rc5-mm1 Arjan van de Ven
2006-05-30 18:51     ` 2.6.17-rc5-mm1 Michal Piotrowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060530160024.GA8987@ms2.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --cc=akpm@osdl.org \
    --cc=alan@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).