]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: cls: Check RSS table index validity when creating a context
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Mon, 27 May 2019 11:52:01 +0000 (13:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 May 2019 18:18:44 +0000 (11:18 -0700)
commit8652e8131a1543b5fb28a1ac718c629bf914bb40
tree7742e5c597a968577cf8a54793402650c2995ffe
parentc6e7f2e6f647f50b992a2582ed626e0ac8a31258
net: mvpp2: cls: Check RSS table index validity when creating a context

Make sure we don't use an out-of-bound index for the per-port RSS
context array.

As of today, the global context creation in mvpp22_rss_context_create
will prevent us from reaching this case, but we should still make sure
we are using a sane value anyway.

Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c