mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: systemport: Fix NULL pointer dereference in bcm_sysport_fini_rx_ring()
If allocation of priv->rx_cbs fails during bcm_sysport_init_rx_ring(), error unwinding in bcm_sysport_open() calls bcm_sysport_fini_rx_ring(). Without checking if priv->rx_cbs is non-NULL, bcm_sysport_fini_rx_ring() dereferences priv->rx_cbs, resulting in a NULL pointer dereference. Add a check for !priv->rx_cbs at the beginning of bcm_sysport_fini_rx_ring(), matching bcm_sysport_fini_tx_ring(). Cc: stable+noautosel@kernel.org # unlikely driver error path Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://patch.msgid.link/20260922232440.598918-4-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
5fe4271d62
commit
96c201a2f4
1 changed files with 3 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue