]> 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)
commit1f8b0c08e40c2b138921e10f4a3f5c79ed8803d3
treefe2921e3354850085538e2516f80860a3b0134fb
parent24ae3b643d4e4028c2c7e3e769483c1feee5cf1d
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