Skip to content

Commit

Permalink
sfc/siena: fix null pointer dereference in efx_hard_start_xmit
Browse files Browse the repository at this point in the history
Like in previous patch for sfc, prevent potential (but unlikely) NULL
pointer dereference.

Fixes: 1280479 ("sfc: decouple TXQ type from label")
Reported-by: Tianhao Zhao <tizhao@redhat.com>
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Link: https://lore.kernel.org/r/20220915141958.16458-1-ihuguet@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Íñigo Huguet authored and Jakub Kicinski committed Sep 20, 2022
1 parent 974bb79 commit 589c6ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/sfc/siena/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ netdev_tx_t efx_siena_hard_start_xmit(struct sk_buff *skb,
* previous packets out.
*/
if (!netdev_xmit_more())
efx_tx_send_pending(tx_queue->channel);
efx_tx_send_pending(efx_get_tx_channel(efx, index));
return NETDEV_TX_OK;
}

Expand Down

0 comments on commit 589c6ed

Please sign in to comment.