Skip to contentSkip to conversation

idpf: Fix mailbox IRQ name leak on request failure

PATCH In review Yuho Choi 3 participants 3 messages Jul 3 – Jul 28

Subsystems (3)
lore
Share & tools
lore

Yuho Choi

author
#0 lore raw

PATCH v2 1/1 idpf: Fix mailbox IRQ name leak on request failure

idpf_mb_intr_req_irq() allocates the mailbox IRQ name before calling request_irq(). On success, the name is released later through kfree(free_irq()), but request_irq() failure returns without freeing it.

Free the allocated name on the request_irq() failure path.

Fixes 4930fbf419a7 ("idpf: add core init and interrupt request")

---
Changes in v2:
- Add net tag for the patch subject line.

 drivers/net/ethernet/intel/idpf/idpf_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/idpf/idpf_lib.c +1 -1
index cf966fe6c759..bb81e620c5c8 100644
@@ -139,7 +139,7 @@ static int idpf_mb_intr_req_irq(struct idpf_adapter *adapter)
 	if (err) {
 		dev_err(&adapter->pdev->dev,
 			"IRQ request for mailbox failed, error: %d\n", err);
-
+		kfree(name);
 		return err;
 	}
 
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 47 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Yuho Choi
Sent: Friday, July 3, 2026 7:04 AM
To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; Yuho Choi <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v2] idpf: Fix mailbox IRQ name leak on request failure

idpf_mb_intr_req_irq() allocates the mailbox IRQ name before calling request_irq(). On success, the name is released later through kfree(free_irq()), but request_irq() failure returns without freeing it.

Free the allocated name on the request_irq() failure path.

Fixes 4930fbf419a7 ("idpf: add core init and interrupt request")

---
Changes in v2:
- Add net tag for the patch subject line.

 drivers/net/ethernet/intel/idpf/idpf_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/idpf/idpf_lib.c +1 -1
index cf966fe6c759..bb81e620c5c8 100644
@@ -139,7 +139,7 @@ static int idpf_mb_intr_req_irq(struct
 idpf_adapter *adapter)
 	if (err) {
 		dev_err(&adapter->pdev->dev,
 			"IRQ request for mailbox failed, error: %d\n",
 err);
-
+		kfree(name);
 		return err;

}

Quoted 2 lines

--
2.43.0

Tested-by
#2 lore raw
Quoted 64 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Loktionov, Aleksandr
Sent: Tuesday, July 7, 2026 6:32 AM
To: Yuho Choi <[email protected]>; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]
Subject: Re: [Intel-wired-lan] [PATCH net v2] idpf: Fix mailbox IRQ name leak on request failure

Quoted 8 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Yuho Choi
Sent: Friday, July 3, 2026 7:04 AM
To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>;

Paolo

Quoted 36 lines

Abeni <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; Yuho Choi <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v2] idpf: Fix mailbox IRQ name leak on request failure

idpf_mb_intr_req_irq() allocates the mailbox IRQ name before calling request_irq(). On success, the name is released later through kfree(free_irq()), but request_irq() failure returns without freeing it.

Free the allocated name on the request_irq() failure path.

Fixes 4930fbf419a7 ("idpf: add core init and interrupt request")

---
Changes in v2:
- Add net tag for the patch subject line.

 drivers/net/ethernet/intel/idpf/idpf_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/idpf/idpf_lib.c +1 -1
index cf966fe6c759..bb81e620c5c8 100644
@@ -139,7 +139,7 @@ static int idpf_mb_intr_req_irq(struct
 idpf_adapter *adapter)
 	if (err) {
 		dev_err(&adapter->pdev->dev,
 			"IRQ request for mailbox failed, error: %d\n", err);
-
+		kfree(name);
 		return err;
 	}
Quoted 5 lines
Quoted 2 lines

--
2.43.0