Skip to contentSkip to conversation

Revert "be2net: remove desc field from be_eq_obj"

PATCH In review Ivan Vecera 2 participants 3 messages Oct 23, 2018

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

PATCH 1/1 Revert "be2net: remove desc field from be_eq_obj"

The mentioned commit needs to be reverted because we cannot pass string allocated on stack to request_irq(). This function stores uses this pointer for later use (e.g. /proc/interrupts) so we need to keep this string persistently.

Fixes d6d9704af8f4 ("be2net: remove desc field from be_eq_obj")
---
 drivers/net/ethernet/emulex/benet/be.h      | 1 +
 drivers/net/ethernet/emulex/benet/be_main.c | 6 ++----
 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/net/ethernet/emulex/benet/be.h +1 -0
index 58bcee8f0a58..ce041c90adb0 100644
@@ -185,6 +185,7 @@ static inline void queue_tail_inc(struct be_queue_info *q)
 
 struct be_eq_obj {
 	struct be_queue_info q;
+	char desc[32];
 
 	struct be_adapter *adapter;
 	struct napi_struct napi;
drivers/net/ethernet/emulex/benet/be_main.c +2 -4
index 534787291b44..bff74752cef1 100644
@@ -3488,11 +3488,9 @@ static int be_msix_register(struct be_adapter *adapter)
 	int status, i, vec;
 
 	for_all_evt_queues(adapter, eqo, i) {
-		char irq_name[IFNAMSIZ+4];
-
-		snprintf(irq_name, sizeof(irq_name), "%s-q%d", netdev->name, i);
+		sprintf(eqo->desc, "%s-q%d", netdev->name, i);
 		vec = be_msix_vec_get(adapter, eqo);
-		status = request_irq(vec, be_msix, 0, irq_name, eqo);
+		status = request_irq(vec, be_msix, 0, eqo->desc, eqo);
 		if (status)
 			goto err_msix;
 
Signature · 1 line
2.18.1
maintainer
#1 lore raw

From: Ivan Vecera <[email protected]>
Date: Tue, 23 Oct 2018 16:40:26 +0200

Quoted 8 lines

The mentioned commit needs to be reverted because we cannot pass string allocated on stack to request_irq(). This function stores uses this pointer for later use (e.g. /proc/interrupts) so we need to keep this string persistently.

Fixes d6d9704af8f4 ("be2net: remove desc field from be_eq_obj")

Please do not put empty lines between Fixes and the other tags, all tags should appear together as one contiguous group.

Fixed and applied and queued up for -stable.

#2 lore raw
Quoted 8 lines · David Miller

From: Ivan Vecera <[email protected]>
Date: Tue, 23 Oct 2018 16:40:26 +0200

Quoted 5 lines

The mentioned commit needs to be reverted because we cannot pass string allocated on stack to request_irq(). This function stores uses this pointer for later use (e.g. /proc/interrupts) so we need to keep this string persistently.

Quoted 6 lines
Quoted 3 lines
Fixes d6d9704af8f4 ("be2net: remove desc field from be_eq_obj")

Please do not put empty lines between Fixes and the other tags, all tags should appear together as one contiguous group.

Sure Dave... sorry for that.

Ivan