]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: Fix parser entry init boundary check
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Thu, 5 Apr 2018 09:55:48 +0000 (11:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Apr 2018 02:13:16 +0000 (22:13 -0400)
commite7373f608b5dce87e11d2139d3969320b3404680
tree3dfcc4c52006b72dd7e1b57b04ba7d33050cc5d5
parent29ed301c5d0c74ba1498a8ee8989c2ad9f234748
net: mvpp2: Fix parser entry init boundary check

Boundary check in mvpp2_prs_init_from_hw must be done according to the
passed "tid" parameter, not the mvpp2_prs_entry index, which is not yet
initialized at the time of the check.

Fixes: 543e10e8b851 ("net: mvpp2: Make mvpp2_prs_hw_read a parser entry init function")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c