login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
November
»
19
Re: [PATCH] softirq: Fix warnings triggered by netconsole
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Ingo Molnar
Subject:
Re: [PATCH] softirq: Fix warnings triggered by netconsole
Date: Wednesday, November 19, 2008 - 2:32 am
* Jarek Poplawski <jarkao2@gmail.com> wrote:
quoted text
> Consider netconsole case as special in local_bh_enable()/_disable(). > This patch skips in_irq() and irqs_disabled() warnings for NETPOLL > configs when it's safe wrt. do_softirq(). > > Reported-by: Ferenc Wagner <wferi@niif.hu> > Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> > --- > [apply on top of my first softirq patch in this thread] > > diff -Nurp a/kernel/softirq.c b/kernel/softirq.c > --- a/kernel/softirq.c 2008-11-19 07:33:23.000000000 +0000 > +++ b/kernel/softirq.c 2008-11-19 07:26:28.000000000 +0000 > @@ -76,7 +76,12 @@ static void __local_bh_disable(unsigned > { > unsigned long flags; > > +#ifdef CONFIG_NETPOLL > + if (!softirq_count()) > + WARN_ON_ONCE(in_irq()); > +#else > WARN_ON_ONCE(in_irq()); > +#endif > > raw_local_irq_save(flags); > add_preempt_count(SOFTIRQ_OFFSET); > @@ -138,7 +143,16 @@ static inline void _local_bh_enable_ip(u > #ifdef CONFIG_TRACE_IRQFLAGS > unsigned long flags; > #endif > +#ifdef CONFIG_NETPOLL > + /* > + * Special-case - netconsole runs network code with all interrupts > + * disabled. Warn only if it can be really dangerous: > + */ > + if (softirq_count() == SOFTIRQ_OFFSET) > + WARN_ON_ONCE(in_irq() || irqs_disabled()); > +#else > WARN_ON_ONCE(in_irq() || irqs_disabled()); > +#endif > #ifdef CONFIG_TRACE_IRQFLAGS > local_irq_save(flags); > #endif
this is a very ugly patch, not really acceptable. printk methods should not be doing softirq processing - period. Ingo --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] softirq: Fix warnings triggered by netconsole
, Jarek Poplawski
, (Wed Nov 19, 1:41 am)
Re: [PATCH] softirq: Fix warnings triggered by netconsole
, Ingo Molnar
, (Wed Nov 19, 2:32 am)
Re: [PATCH] softirq: Fix warnings triggered by netconsole
, Jarek Poplawski
, (Wed Nov 19, 4:07 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Trent Waddington
Re: Gaming Interface
Takashi Iwai
Re: [PATCH] usb: usbmixer error path fix
Pekka Enberg
Re: latest -git: suspend: unable to handle kernel paging request (was Re: no_conso...
Dan Carpenter
Re: [patch] dma-debug: off by one issue
Jeremy Fitzhardinge
Re: [patch 1/6] Re-enable VDSO by default with PARAVIRT
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Christian Stimming
git-gui: Fix broken revert confirmation.
Junio C Hamano
Re: git-svnimport
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
linux-netdev
:
Nick Piggin
Re: Kernel WARNING: at net/core/dev.c:1330 __netif_schedule+0x2c/0x98()
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
openbsd-misc
:
Christophe Rioux
Implementation example of snmp
Ryan McBride
Re: Packets Per Second Limit?
Nick Holland
Re: booting openbsd on eee without cd-rom
Marco Peereboom
Re: Singularity OS
Otto Moerbeek
Re: Solved: cron - setusercontext failed for root
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
bnx2x: Fan failure mechanism on additional design
Linux Kernel Mailing List
cpumask: make irq_set_affinity() take a const struct cpumask
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
Colocation donated by:
Syndicate