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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181017035038.czaqown24rnjn2pw@codemonkey.org.uk>
Date:   Tue, 16 Oct 2018 23:50:38 -0400
From:   Dave Jones <davej@...emonkey.org.uk>
To:     Cong Wang <xiyou.wangcong@...il.com>, Meelis Roos <mroos@...ux.ee>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: netconsole warning in 4.19.0-rc7

On Tue, Oct 16, 2018 at 11:40:47PM -0400, Dave Jones wrote:

 >  > This is exactly what I mentioned in my review here:
 >  > https://marc.info/?l=linux-netdev&m=153816136624679&w=2
 >  > 
 >  > "But irq is disabled here, so not sure if rcu_read_lock_bh()
 >  > could cause trouble... "
 > 
 > Not sure why this didn't show up for me when I was developing that
 > patch, but I can now reproduce this.  The patch below fixes it for
 > me, but I'm not sure if there are still any side-effects.
 > There's also a missed unlock in the error path.

I took another look at that error path. Turns out this is all we need I
think..


diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index de1d1ba92f2d..f9322d5db899 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -318,6 +318,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
 	npinfo = rcu_dereference_bh(np->dev->npinfo);
 	if (!npinfo || !netif_running(dev) || !netif_device_present(dev)) {
 		dev_kfree_skb_irq(skb);
+		rcu_read_unlock_bh();
 		return;
 	}
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ