kernel_samsung_a53x/drivers/net/ethernet/qlogic/qed
Manish Chopra 45db38edfb qed: fix LL2 RX buffer allocation
commit 2f3389c73832ad90b63208c0fc281ad080114c7a upstream.

Driver allocates the LL2 rx buffers from kmalloc()
area to construct the skb using slab_build_skb()

The required size allocation seems to have overlooked
for accounting both skb_shared_info size and device
placement padding bytes which results into the below
panic when doing skb_put() for a standard MTU sized frame.

skbuff: skb_over_panic: text:ffffffffc0b0225f len:1514 put:1514
head:ff3dabceaf39c000 data:ff3dabceaf39c042 tail:0x62c end:0x566
dev:<NULL>
…
skb_panic+0x48/0x4a
skb_put.cold+0x10/0x10
qed_ll2b_complete_rx_packet+0x14f/0x260 [qed]
qed_ll2_rxq_handle_completion.constprop.0+0x169/0x200 [qed]
qed_ll2_rxq_completion+0xba/0x320 [qed]
qed_int_sp_dpc+0x1a7/0x1e0 [qed]

This patch fixes this by accouting skb_shared_info and device
placement padding size bytes when allocating the buffers.

Cc: David S. Miller <davem@davemloft.net>
Fixes: 0a7fb11c23c0 ("qed: Add Light L2 support")
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-08 11:26:09 +01:00
..
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_chain.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_cxt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_cxt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_dcbx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_dcbx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_dev_api.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_devlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_devlink.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_fcoe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_fcoe.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_hsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_hw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_hw.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_init_fw_funcs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_init_ops.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_init_ops.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_int.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_int.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_iscsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_iscsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_iwarp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_iwarp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_l2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_l2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_ll2.c qed: fix LL2 RX buffer allocation 2024-11-08 11:26:09 +01:00
qed_ll2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_mcp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_mcp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_mng_tlv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_ooo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_ooo.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_ptp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_ptp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_rdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_rdma.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_reg_addr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_roce.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_roce.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_selftest.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_selftest.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_sp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_sp_commands.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_spq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_sriov.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_sriov.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_vf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qed_vf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00