Skip to content
Commit 6d32a511 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski
Browse files

dpaa2-eth: prevent array underflow in update_cls_rule()

The "location" is controlled by the user via the ethtool_set_rxnfc()
function.  This update_cls_rule() function checks for array overflows
but it doesn't check if the value is negative.  I have changed the type
to unsigned to prevent array underflows.

Fixes: afb90dbb

 ("dpaa2-eth: Add ethtool support for flow classification")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5099dea0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment