Skip to contentSkip to conversation

scsi: qedf: drop invalid skb_transport_header check to prevent panic

PATCH Superseded Nimal Prabudoss I 2 participants 2 messages May 26 – May 27

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: qedf: drop invalid skb_transport_header check to prevent panic

During intensive FCOE Tier 1 CTC boot tests, the qedf driver triggers a warning assertion in include/linux/skbuff.h. This happens because the driver attempts to access an uninitialized transport header offset via skb_transport_header() under a CONFIG_DEBUG_NET environment.

Remove the invalid helper call within qedf_recv_frame() to eliminate the warning assertion and prevent the subsequent system panic.

---
 drivers/scsi/qedf/qedf_main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/qedf/qedf_main.c +0 -1
index da429b3a4283..f2bc0ac684e0 100644
@@ -2496,7 +2496,6 @@ static void qedf_recv_frame(struct qedf_ctx *qedf,
 
 	/* Pull the header */
 	hp = (struct fcoe_hdr *)skb->data;
-	fh = (struct fc_frame_header *) skb_transport_header(skb);
 	skb_pull(skb, sizeof(struct fcoe_hdr));
 	fr_len = skb->len - sizeof(struct fcoe_crc_eof);
 
Signature · 1 line
2.54.0
#1 lore raw
Quoted 9 lines · Nimal Prabudoss I

During intensive FCOE Tier 1 CTC boot tests, the qedf driver triggers a warning assertion in include/linux/skbuff.h. This happens because the driver attempts to access an uninitialized transport header offset via skb_transport_header() under a CONFIG_DEBUG_NET environment.

Remove the invalid helper call within qedf_recv_frame() to eliminate the warning assertion and prevent the subsequent system panic.

Hi Nimal. This is a private link to a Red Hat Jira issue report. Please remove this from you commit message.

Quoted 1 line

Please also attribute this patch to Jesse with a From: Jesse Taube <[email protected]>.

Not really important for this, but bnx2fc looks to have the same code and issue.

/John

Quoted 16 lines
---
  drivers/scsi/qedf/qedf_main.c | 1 -
  1 file changed, 1 deletion(-)
drivers/scsi/qedf/qedf_main.c +0 -1
index da429b3a4283..f2bc0ac684e0 100644
@@ -2496,7 +2496,6 @@ static void qedf_recv_frame(struct qedf_ctx *qedf,
 
  	/* Pull the header */
  	hp = (struct fcoe_hdr *)skb->data;
-	fh = (struct fc_frame_header *) skb_transport_header(skb);
  	skb_pull(skb, sizeof(struct fcoe_hdr));
  	fr_len = skb->len - sizeof(struct fcoe_crc_eof);