1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/marvell
Dan Carpenter cdd97383e1 net: mvneta: Fix an out of bounds check
In an earlier commit, I added a bounds check to prevent an out of bounds
read and a WARN().  On further discussion and consideration that check
was probably too aggressive.  Instead of returning -EINVAL, a better fix
would be to just prevent the out of bounds read but continue the process.

Background: The value of "pp->rxq_def" is a number between 0-7 by default,
or even higher depending on the value of "rxq_number", which is a module
parameter. If the value is more than the number of available CPUs then
it will trigger the WARN() in cpu_max_bits_warn().

Fixes: e8b4fc1390 ("net: mvneta: Prevent out of bounds read in mvneta_config_rss()")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/Y5A7d1E5ccwHTYPf@kadam
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-12-08 09:09:36 -08:00
..
mvpp2 net: mvpp2: fix possible invalid pointer dereference 2022-11-18 19:38:59 -08:00
octeon_ep octeon_ep: ensure get mac address successfully before eth_hw_addr_set() 2022-11-14 10:55:43 +00:00
octeontx2 octeontx2-pf: Fix potential memory leak in otx2_init_tc() 2022-12-05 11:05:05 +00:00
prestera net: marvell: prestera: Fix a NULL vs IS_ERR() check in some functions 2022-11-29 12:29:46 +01:00
Kconfig net: mvneta: add support for page_pool_get_stats 2022-04-15 10:43:48 +01:00
Makefile octeon_ep: Add driver framework and device initialization 2022-04-13 12:56:32 +01:00
mv643xx_eth.c net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open() 2022-11-10 13:30:01 +01:00
mvmdio.c net: mvmdio: fix compilation warning 2021-11-16 18:55:17 -08:00
mvneta.c net: mvneta: Fix an out of bounds check 2022-12-08 09:09:36 -08:00
mvneta_bm.c net: mvneta: use devm_platform_ioremap_resource() to simplify code 2019-08-21 13:52:33 -07:00
mvneta_bm.h net: mvneta: make stub functions static inline 2019-10-25 16:21:48 -07:00
pxa168_eth.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
skge.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
skge.h net: marvell: remove leading spaces before tabs 2021-05-19 12:17:31 -07:00
sky2.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
sky2.h net: marvell: remove leading spaces before tabs 2021-05-19 12:17:31 -07:00