Skip to contentSkip to conversation

be2net: call napi_disable() for all event queues

PATCH Applied Ivan Vecera 3 participants 3 messages Nov 27, 2013 – Nov 28, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 be2net: call napi_disable() for all event queues

The recent be2net commit 6384a4d (adds a support for busy polling) introduces a regression that results in kernel crash. It incorrectly modified be_close() so napi_disable() is called only for the first queue. This breaks a correct pairing of napi_enable/_disable for the rest of event queues and causes a crash in subsequent be_open() call.

v2: Applied suggestions from Sathya

Fixes 6384a4d ("be2net: add support for ndo_busy_poll")
Cc Sathya Perla <[email protected]>
Cc Subbu Seetharaman <[email protected]>
Cc Ajit Khaparde <[email protected]>
---
 drivers/net/ethernet/emulex/benet/be_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/emulex/benet/be_main.c +2 -2
index 78a0e85..fee64bf 100644
@@ -2658,8 +2658,8 @@ static int be_close(struct net_device *netdev)
 
 	be_roce_dev_close(adapter);
 
-	for_all_evt_queues(adapter, eqo, i) {
-		if (adapter->flags & BE_FLAGS_NAPI_ENABLED) {
+	if (adapter->flags & BE_FLAGS_NAPI_ENABLED) {
+		for_all_evt_queues(adapter, eqo, i) {
 			napi_disable(&eqo->napi);
 			be_disable_busy_poll(eqo);
 		}
Signature · 1 line
1.8.3.2
Acked-by on v2 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Ivan Vecera [mailto:[email protected]]

The recent be2net commit 6384a4d (adds a support for busy polling) introduces a regression that results in kernel crash. It incorrectly modified be_close() so napi_disable() is called only for the first queue. This breaks a correct pairing of napi_enable/_disable for the rest of event queues and causes a crash in subsequent be_open() call.

Quoted 7 lines

v2: Applied suggestions from Sathya

Fixes 6384a4d ("be2net: add support for ndo_busy_poll")
Cc Sathya Perla <[email protected]>
Cc Subbu Seetharaman <[email protected]>
Cc Ajit Khaparde <[email protected]>
Quoted 22 lines
---
 drivers/net/ethernet/emulex/benet/be_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/emulex/benet/be_main.c +2 -3
index 78a0e85..fee64bf 100644
@@ -2658,8 +2658,8 @@ static int be_close(struct net_device *netdev)
 
 	be_roce_dev_close(adapter);
 
-	for_all_evt_queues(adapter, eqo, i) {
-		if (adapter->flags & BE_FLAGS_NAPI_ENABLED) {
+	if (adapter->flags & BE_FLAGS_NAPI_ENABLED) {
+		for_all_evt_queues(adapter, eqo, i) {
 			napi_disable(&eqo->napi);
 			be_disable_busy_poll(eqo);
 		}
--

1.8.3.2

maintainer Applied
#2 lore raw
In reply to Ivan Vecera

From: Ivan Vecera <[email protected]>
Date: Wed, 27 Nov 2013 08:59:32 +0100

Quoted 6 lines

The recent be2net commit 6384a4d (adds a support for busy polling) introduces a regression that results in kernel crash. It incorrectly modified be_close() so napi_disable() is called only for the first queue. This breaks a correct pairing of napi_enable/_disable for the rest of event queues and causes a crash in subsequent be_open() call.

Quoted 7 lines

v2: Applied suggestions from Sathya

Fixes 6384a4d ("be2net: add support for ndo_busy_poll")
Cc Sathya Perla <[email protected]>
Cc Subbu Seetharaman <[email protected]>
Cc Ajit Khaparde <[email protected]>

Applied, thanks.