netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, David Miller <davem@davemloft.net>,
	Ferenc Wagner <wferi@niif.hu>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] softirq: Use local_irq_save() in local_bh_enable()
Date: Mon, 17 Nov 2008 15:18:28 +0100	[thread overview]
Message-ID: <1226931509.3902.16.camel@johannes.berg> (raw)
In-Reply-To: <20081117133548.GC6345@ff.dom.local> (sfid-20081117_143601_411488_D8071C4B)

[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]

On Mon, 2008-11-17 at 13:35 +0000, Jarek Poplawski wrote:
> This report: http://marc.info/?l=linux-netdev&m=122599341430090&w=2
> shows local_bh_enable() is used in the wrong context (irqs disabled).
> It happens when a usual network receive path is called by netconsole,
> which simply turns off irqs around this all. Probably this is wrong,
> but it worked like this long time, and it's not trivial to fix this.

Unfortunately my brain lacks the magic to decrypt x86 stack traces, so
I'm unable to read much from that report other than that it hit the
WARN_ON. That looks more like the TX path to me? Anyway, my patch made
that trigger for everybody rather than just on NOPREEMPT/UP (or
something like that) and made the code easier to understand by removing
the flags that are pointless anyway if the API is used correctly.

You can find discussion around the patch at
http://lkml.org/lkml/2008/6/17/259

> Anyway, a commit 0f476b6d91a1395bda6464e653ce66ea9bea7167 "softirq:
> remove irqs_disabled warning from local_bh_enable" can break things
> after changing from local_irq_save() to local_irq_disable(). Before
> this commit there was only a warning, now a lockup is possible, so
> it could be treated as a regression. This patch reverts the change
> in irqs.

Do we have evidence of this actually hitting often? This is the first
report of anything going wrong that I've seen ever since a single one
right after this commit went into testing five months ago.

IFF we want to add this back (and I'm not in favour) then please add a
big comment that this is only to accomodate broken users.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2008-11-17 14:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 17:40 two warns on slowpath Ferenc Wagner
2008-11-17 13:35 ` [PATCH] softirq: Use local_irq_save() in local_bh_enable() Jarek Poplawski
2008-11-17 14:18   ` Johannes Berg [this message]
2008-11-18  7:49     ` Jarek Poplawski
2008-11-17 16:16   ` Ingo Molnar
2008-11-18  7:38     ` Jarek Poplawski
2008-11-19  8:41 ` [PATCH] netconsole: Disable softirqs in write_msg() Jarek Poplawski
2008-11-19  9:30   ` Ingo Molnar
2008-11-19  9:42     ` David Miller
2008-11-19 10:14       ` Ingo Molnar
2008-11-19 10:17         ` David Miller
2008-11-19 10:21           ` Ingo Molnar
2008-11-19 10:22             ` David Miller
2008-11-19 10:10   ` David Miller
2008-11-19  8:41 ` [PATCH] softirq: Fix warnings triggered by netconsole Jarek Poplawski
2008-11-19  9:32   ` Ingo Molnar
2008-11-19 11:07     ` Jarek Poplawski

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=1226931509.3902.16.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=davem@davemloft.net \
    --cc=jarkao2@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=wferi@niif.hu \
    /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).