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-next>] [day] [month] [year] [list]
Date:	Tue, 16 Oct 2007 18:46:52 +0200
From:	Karsten Wiese <fzu@...gehoertderstaat.de>
To:	romieu@...zoreil.com, netdev@...r.kernel.org
Subject: [PATCH] Disable polling in rtl8169_suspend() to prevent race with rtl8169_interrupt()

Hi,

Sometimes (~ 1 in 10) after suspend to disk my r8169 nic doesn't work and a
"r8169: eth0: link down" gets mingled up with those suspend messages.
First tests show nothing bad, so maybe this patch really helps.
Will post again, if it doesn't.

      Karsten
------------------>

Disable polling in rtl8169_suspend() to prevent race with rtl8169_interrupt()

rtl8169_interrupt() is called during polling.
Without patch, rtl8169_interrupt() could run after rtl8169_asic_down(),
causing a disabled link state being saved later in rtl8169_suspend() by
pci_save_state().
netif_stop_queue() can go as it is called by netif_device_detach().

Signed-off-by: Karsten Wiese <fzu@...gehoertderstaat.de>
---
 drivers/net/r8169.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c76dd29..fee6c8e 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3024,7 +3024,7 @@ static int rtl8169_suspend(struct pci_dev *pdev, pm_message_t state)
 		goto out_pci_suspend;
 
 	netif_device_detach(dev);
-	netif_stop_queue(dev);
+	netif_poll_disable(dev);
 
 	spin_lock_irq(&tp->lock);
 
@@ -3054,6 +3054,7 @@ static int rtl8169_resume(struct pci_dev *pdev)
 	if (!netif_running(dev))
 		goto out;
 
+	netif_poll_enable(dev);
 	netif_device_attach(dev);
 
 	rtl8169_schedule_work(dev, rtl8169_reset_task);
-- 
1.5.2.4

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ