]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/net/bonding/bond_3ad: return when there's no aggregator
authorDaniil Tatianin <d-tatianin@yandex-team.ru>
Mon, 2 Jan 2023 09:53:35 +0000 (12:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:58 +0000 (11:41 +0100)
commitc04051a73e91ecfa94fcb3cd741e9094c2d2cf1b
tree3997377c1ff8b3c04b6b2fe532ab328f7bb9d128
parentaa1b80284c47e03cda76654b030c475b606cdd26
drivers/net/bonding/bond_3ad: return when there's no aggregator

[ Upstream commit 0aafa909eb6c02c5b9c1e6c9aa246f74ac6b2e96 ]

Otherwise we would dereference a NULL aggregator pointer when calling
__set_agg_ports_ready on the line below.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/bonding/bond_3ad.c