]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hinic: Avoid some over memory allocation
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 21 May 2022 06:33:01 +0000 (08:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:25:58 +0000 (10:25 +0200)
commite3e608a6873cccab382fd2a4782b19bdd3086c86
treee09451c19d2b4b2fb0e76bc1beaa966927f27475
parente5215feec4fca5b92dcd0fce63619ef309bff464
hinic: Avoid some over memory allocation

[ Upstream commit 15d221d0c345b76947911a3ac91897ffe2f1cc4e ]

'prod_idx' (atomic_t) is larger than 'shadow_idx' (u16), so some memory is
over-allocated.

Fixes: b15a9f37be2b ("net-next/hinic: Add wq")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c