Commit 07f5b8c4 authored by Yonglong Liu's avatar Yonglong Liu Committed by Greg Kroah-Hartman
Browse files

net: hns3: fix out-of-bounds access may occur when coalesce info is read via debugfs



[ Upstream commit 53aba458 ]

The hns3 driver define an array of string to show the coalesce
info, but if the kernel adds a new mode or a new state,
out-of-bounds access may occur when coalesce info is read via
debugfs, this patch fix the problem.

Fixes: c99fead7 ("net: hns3: add debugfs support for interrupt coalesce")
Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 83a177b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment