]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: ebtables: Use vmalloc_array() to improve code
authorQianfeng Rong <rongqianfeng@vivo.com>
Sun, 17 Aug 2025 09:15:56 +0000 (17:15 +0800)
committerFlorian Westphal <fw@strlen.de>
Tue, 2 Sep 2025 13:28:17 +0000 (15:28 +0200)
commit46015e6b3ea75297b28d4806564f3f692cf11861
tree02ff6f7c59af898961fccee462df6802f03cb92d
parentcd8a4cfa6bb43a441901e82f5c222dddc75a18a3
netfilter: ebtables: Use vmalloc_array() to improve code

Remove array_size() calls and replace vmalloc() with vmalloc_array() to
simplify the code.  vmalloc_array() is also optimized better, uses fewer
instructions, and handles overflow more concisely[1].

[1]: https://lore.kernel.org/lkml/abc66ec5-85a4-47e1-9759-2f60ab111971@vivo.com/
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/bridge/netfilter/ebtables.c