1
0
Fork 0
alistair23-linux/drivers/net/ethernet/qualcomm
Subash Abhinov Kasiviswanathan ab1e4b3c40 net: qualcomm: rmnet: Fix incorrect receive packet handling during cleanup
[ Upstream commit fc70f5bf5e ]

During rmnet unregistration, the real device rx_handler is first cleared
followed by the removal of rx_handler_data after the rcu synchronization.

Any packets in the receive path may observe that the rx_handler is NULL.
However, there is no check when dereferencing this value to use the
rmnet_port information.

This fixes following splat by adding the NULL check.

Unable to handle kernel NULL pointer dereference at virtual
address 000000000000000d
pc : rmnet_rx_handler+0x124/0x284
lr : rmnet_rx_handler+0x124/0x284
 rmnet_rx_handler+0x124/0x284
 __netif_receive_skb_core+0x758/0xd74
 __netif_receive_skb+0x50/0x17c
 process_backlog+0x15c/0x1b8
 napi_poll+0x88/0x284
 net_rx_action+0xbc/0x23c
 __do_softirq+0x20c/0x48c

Fixes: ceed73a2cf ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation")
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Link: https://lore.kernel.org/r/1605298325-3705-1-git-send-email-subashab@codeaurora.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-24 13:28:58 +01:00
..
emac net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init 2020-08-21 13:05:37 +02:00
rmnet net: qualcomm: rmnet: Fix incorrect receive packet handling during cleanup 2020-11-24 13:28:58 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qca_7k.c net: qca_spi: Introduce write register verification 2018-09-24 12:26:06 -07:00
qca_7k.h net: qca_spi: Introduce write register verification 2018-09-24 12:26:06 -07:00
qca_7k_common.c net: qualcomm: make qca_7k_common a separate kernel module 2017-05-30 13:57:30 -04:00
qca_7k_common.h net: qualcomm: add QCA7000 UART driver 2017-05-30 13:57:32 -04:00
qca_debug.c qca: no need to check return value of debugfs_create functions 2019-08-10 15:25:48 -07:00
qca_debug.h
qca_spi.c net: qca_spi: Move reset_count to struct qcaspi 2019-11-20 12:42:23 -08:00
qca_spi.h net: qca_spi: Move reset_count to struct qcaspi 2019-11-20 12:42:23 -08:00
qca_uart.c ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-08-22 16:22:04 -07:00