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>] [day] [month] [year] [list]
Date:	Thu, 29 Oct 2015 14:22:49 +0100
From:	Neil Armstrong <narmstrong@...libre.com>
To:	"David S. Miller" <davem@...emloft.net>
Cc:	Andrew Lunn <andrew@...n.ch>,
	Florian Fainelli <f.fainelli@...il.com>,
	Guenter Roeck <linux@...ck-us.net>,
	vivien.didelot@...oirfairelinux.com,
	Fabian Frederick <fabf@...net.be>,
	Pavel Nakonechny <pavel.nakonechny@...tlab.ru>,
	Joe Perches <joe@...ches.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Frode Isaksen <fisaksen@...libre.com>
Subject: [PATCH v2 2/6] net: dsa: Do not reschedule polling if driver removed

Do not reschedule the delayed work used for polling when
the driver is removed, by testing the 'poll_link_needed'
flag.
Avoids this crash:
 dsa dsa ethmv2 (unregistering): Link is Down
 device eth1 left promiscuous mode
 Unable to handle kernel paging request at virtual address bacc5cf6
 ...
 (run_timer_softirq) from [<c003e810>] (__do_softirq+0xcc/0x320)
 (__do_softirq) from [<c003ed40>] (irq_exit+0xac/0x10c)
 (irq_exit) from [<c007ec20>] (__handle_domain_irq+0x50/0xa8)

Signed-off-by: Frode Isaksen <fisaksen@...libre.com>
Signed-off-by: Neil Armstrong <narmstrong@...libre.com>
---
 net/dsa/dsa.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index aeb6a7c..19cff8f 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -522,7 +522,8 @@ static void dsa_link_poll_work(struct work_struct *ugly)
 			ds->drv->poll_link(ds);
 	}

-	schedule_delayed_work(&dst->link_poll_work, round_jiffies_relative(HZ));
+	if (dst->link_poll_needed)
+		schedule_delayed_work(&dst->link_poll_work, round_jiffies_relative(HZ));
 }

 /* platform driver init and cleanup *****************************************/
@@ -943,6 +944,7 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst)
 	int i;

 	if (dst->link_poll_needed) {
+		dst->link_poll_needed = 0;
 		cancel_delayed_work_sync(&dst->link_poll_work);
 		flush_delayed_work(&dst->link_poll_work);
 	}
-- 
1.9.1
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ