Commit a78765cc authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Liu Jian
Browse files

mlxsw: spectrum: Use 'bitmap_zalloc()' when applicable

stable inclusion
from stable-v5.10.209
commit 936d06d699c325dfeb034ee5222f2c88f551fd06
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I932WD
CVE: CVE-2024-26586

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=936d06d699c325dfeb034ee5222f2c88f551fd06



---------------------------

[ Upstream commit 2c087dfc ]

Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid
some open-coded arithmetic in allocator arguments.

Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Stable-dep-of: 483ae90d8f97 ("mlxsw: spectrum_acl_tcam: Fix stack corruption")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
parent a28f5b08
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment