]> git.baikalelectronics.ru Git - kernel.git/commit
net: qed: fix the array may be out of bound
authorzhangyue <zhangyue1@kylinos.cn>
Thu, 25 Nov 2021 11:36:10 +0000 (19:36 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Nov 2021 19:29:20 +0000 (11:29 -0800)
commitccafb2e5e2161c40a7de835cef513a4a638034cb
treefe2921e3354850085538e2516f80860a3b0134fb
parent54eb2d07e2c783ce07feb4695964ac22a2c047e1
net: qed: fix the array may be out of bound

If the variable 'p_bit->flags' is always 0,
the loop condition is always 0.

The variable 'j' may be greater than or equal to 32.

At this time, the array 'p_aeu->bits[32]' may be out
of bound.

Signed-off-by: zhangyue <zhangyue1@kylinos.cn>
Link: https://lore.kernel.org/r/20211125113610.273841-1-zhangyue1@kylinos.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_int.c