Skip to contentSkip to conversation

scsi: bnx2fc: Drop unesseary call to skb_transport_header

PATCH New Jesse Taube 1 participant 1 message Sep 25

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

PATCH 1/1 scsi: bnx2fc: Drop unesseary call to skb_transport_header

The result of skb_transport_header was unused, previously it had no side effects.
commit 66e4c8d95008 ("net: warn if transport header was not set") Added a check to prevent accesses to an uninitialized transport header under a CONFIG_DEBUG_NET environment. Sence skb_transport_header was called with an uninitialized transport header, it triggered a warning case and a subsequent system panic.

Remove the unesseary call to skb_transport_header eliminating the warning assertion and prevent the subsequent system panic.

---
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/bnx2fc/bnx2fc_fcoe.c +0 -1
index c95b084cad69..3bff781d0531 100644
@@ -533,7 +533,6 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
 
 	/* Pull the header */
 	hp = (struct fcoe_hdr *) skb_network_header(skb);
-	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.55.0