summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorÍñigo Huguet <ihuguet@redhat.com>2022-09-15 17:19:58 +0300
committerJakub Kicinski <kuba@kernel.org>2022-09-20 21:21:28 +0300
commit589c6eded10c77a12b7b2cf235b6b19a2bdb91fa (patch)
treefe6a40dd4997d2ba594de957bc2e860912b9de03 /drivers
parent974bb793aded499491246f6f9826e26c2b127320 (diff)
downloadlinux-589c6eded10c77a12b7b2cf235b6b19a2bdb91fa.tar.xz
sfc/siena: fix null pointer dereference in efx_hard_start_xmit
Like in previous patch for sfc, prevent potential (but unlikely) NULL pointer dereference. Fixes: 12804793b17c ("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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/sfc/siena/tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/siena/tx.c b/drivers/net/ethernet/sfc/siena/tx.c
index e166dcb9b99c..91e87594ed1e 100644
--- a/drivers/net/ethernet/sfc/siena/tx.c
+++ b/drivers/net/ethernet/sfc/siena/tx.c
@@ -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;
}