]> git.itanic.dy.fi Git - linux-stable/commit
ethernet: sun: add check for the mdesc_grab()
authorLiang He <windhl@126.com>
Wed, 15 Mar 2023 06:00:21 +0000 (14:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:26:15 +0000 (13:26 +0100)
commitb163110a5267ba951cefd4b7535a827601c28025
treedda203ea2354b5acbb23d1d2ca510fd2900ef0fd
parenta908eae0f71811afee86be7088692f1aa5855c3b
ethernet: sun: add check for the mdesc_grab()

[ Upstream commit 90de546d9a0b3c771667af18bb3f80567eabb89b ]

In vnet_port_probe() and vsw_port_probe(), we should
check the return value of mdesc_grab() as it may
return NULL which can caused NPD bugs.

Fixes: 5d01fa0c6bd8 ("ldmvsw: Add ldmvsw.c driver code")
Fixes: 43fdf27470b2 ("[SPARC64]: Abstract out mdesc accesses for better MD update handling.")
Signed-off-by: Liang He <windhl@126.com>
Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/sun/ldmvsw.c
drivers/net/ethernet/sun/sunvnet.c