diff options
author | Duoming Zhou <duoming@zju.edu.cn> | 2024-03-08 22:25:40 +0800 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2024-03-26 18:20:43 -0400 |
commit | c9b4e220dd18f79507803f38a55d53b483f6c9c3 (patch) | |
tree | 165e491d05ee7714e39414235be251bc39069a2e /drivers/md/dm-raid.c | |
parent | b7c2b7eae2864b84644e535635fd88b0bcce0065 (diff) | |
download | linux-c9b4e220dd18f79507803f38a55d53b483f6c9c3.tar.gz linux-c9b4e220dd18f79507803f38a55d53b483f6c9c3.tar.bz2 linux-c9b4e220dd18f79507803f38a55d53b483f6c9c3.zip |
nfp: flower: handle acti_netdevs allocation failure
[ Upstream commit 84e95149bd341705f0eca6a7fcb955c548805002 ]
The kmalloc_array() in nfp_fl_lag_do_work() will return null, if
the physical memory has run out. As a result, if we dereference
the acti_netdevs, the null pointer dereference bugs will happen.
This patch adds a check to judge whether allocation failure occurs.
If it happens, the delayed work will be rescheduled and try again.
Fixes: bb9a8d031140 ("nfp: flower: monitor and offload LAG groups")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Link: https://lore.kernel.org/r/20240308142540.9674-1-duoming@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/md/dm-raid.c')
0 files changed, 0 insertions, 0 deletions