]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Use filter index rather than ID for rps_flow_id table
authorEdward Cree <ecree@solarflare.com>
Fri, 27 Apr 2018 14:08:41 +0000 (15:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Apr 2018 00:21:07 +0000 (20:21 -0400)
commit9972122b8048b4e0e52b26bc0e65a0c19b66925c
tree72a1aae23a9906f90d5eb5a19dbe9ebea9680674
parentdf39334918ddbb9e44225b87c14a6ccdae0f6311
sfc: Use filter index rather than ID for rps_flow_id table

efx->type->filter_insert() returns an ID rather than the index that
 efx->type->filter_async_insert() used to, which causes it to exceed
 efx->type->max_rx_ip_filters on some EF10 configurations, leading to out-
 of-bounds array writes.
So, in efx_filter_rfs_work(), convert this back into an index (which is
 what the remove call in the expiry path expects, anyway).

Fixes: c1198c0d3910 ("sfc: replace asynchronous filter operations")
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/rx.c