summaryrefslogtreecommitdiff
path: root/include/net/aligned_data.h
diff options
context:
space:
mode:
authorAlok Tiwari <alok.a.tiwari@oracle.com>2025-12-29 21:21:18 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-17 16:31:22 +0100
commit3950054c9512add0cc79ab7e72b6d2f9f675e25b (patch)
tree9733db7b9682a2ebcbe2311fa46ccd1dfa2a973c /include/net/aligned_data.h
parent26a82dce2beee39c43c109d9647e16f49cb02a35 (diff)
net: marvell: prestera: fix NULL dereference on devlink_alloc() failure
[ Upstream commit a428e0da1248c353557970848994f35fd3f005e2 ] devlink_alloc() may return NULL on allocation failure, but prestera_devlink_alloc() unconditionally calls devlink_priv() on the returned pointer. This leads to a NULL pointer dereference if devlink allocation fails. Add a check for a NULL devlink pointer and return NULL early to avoid the crash. Fixes: 34dd1710f5a3 ("net: marvell: prestera: Add basic devlink support") Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Acked-by: Elad Nachman <enachman@marvell.com> Link: https://patch.msgid.link/20251230052124.897012-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions