lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 19 Nov 2008 11:14:41 +0100 From: Ingo Molnar <mingo@...e.hu> To: David Miller <davem@...emloft.net> Cc: jarkao2@...il.com, jeff@...zik.org, johannes@...solutions.net, wferi@...f.hu, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] netconsole: Disable softirqs in write_msg() * David Miller <davem@...emloft.net> wrote: > From: Ingo Molnar <mingo@...e.hu> > Date: Wed, 19 Nov 2008 10:30:04 +0100 > > > * Jarek Poplawski <jarkao2@...il.com> wrote: > > > > > diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c > > > index d304d38..f6ecad8 100644 > > > --- a/drivers/net/netconsole.c > > > +++ b/drivers/net/netconsole.c > > > @@ -702,6 +702,8 @@ static void write_msg(struct console *con, const char *msg, unsigned int len) > > > if (list_empty(&target_list)) > > > return; > > > > > > + /* Avoid enabling softirqs with hardirqs disabled */ > > > + local_bh_disable(); > > > spin_lock_irqsave(&target_list_lock, flags); > > > list_for_each_entry(nt, &target_list, list) { > > > netconsole_target_get(nt); > > > @@ -723,6 +725,7 @@ static void write_msg(struct console *con, const char *msg, unsigned int len) > > > netconsole_target_put(nt); > > > } > > > spin_unlock_irqrestore(&target_list_lock, flags); > > > + local_bh_enable(); > > > > but netconsole can be triggered from printk - and printk can be called > > from hardirqs-off sections - so this doesnt really fix the bug. > > Netconsole should not do BH processing. > > Well, it sort of "has to". It calls the NAPI ->poll() method of the > driver to try and make forward progress with TX reclaim so it can > send new messages. > > It is very careful not to recursively invoke into ->poll() and other > nasty situations. > > Didn't you write some of this code Ingo a very long time ago? :-))) it is causing problems, so i'd like to distance myself from that careless mistake of my youth! [ And once it starts working again i'd like to take credit for having started that brilliant piece of innovation. ] > Anyways, I'll look more closely at this and the original report, > this never was a problem before. Thanks! We strengthened/cleaned up the bh checks a tiny bit recently, maybe that caused this to pop up. It might explain some netconsole lockups perhaps? Or, the new warning might be bogus. It's a bit of a maze. Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists