diff options
author | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
commit | ff24e4980a68d83090a02fda081741a410fe8eef (patch) | |
tree | 4d874dfcaf2bb8c3abc2446af9447a983402c0ae /drivers/net/dsa/bcm_sf2_cfp.c | |
parent | 26f146ed971c0e4a264ce525d7a66a71ef73690d (diff) | |
parent | ea9866793d1e925b4d320eaea409263b2a568f38 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three trivial overlapping conflicts.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2_cfp.c')
-rw-r--r-- | drivers/net/dsa/bcm_sf2_cfp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/bcm_sf2_cfp.c b/drivers/net/dsa/bcm_sf2_cfp.c index e6234d209787..4212bc4a5f31 100644 --- a/drivers/net/dsa/bcm_sf2_cfp.c +++ b/drivers/net/dsa/bcm_sf2_cfp.c | |||
@@ -886,6 +886,9 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port, | |||
886 | fs->m_ext.data[1])) | 886 | fs->m_ext.data[1])) |
887 | return -EINVAL; | 887 | return -EINVAL; |
888 | 888 | ||
889 | if (fs->location != RX_CLS_LOC_ANY && fs->location >= CFP_NUM_RULES) | ||
890 | return -EINVAL; | ||
891 | |||
889 | if (fs->location != RX_CLS_LOC_ANY && | 892 | if (fs->location != RX_CLS_LOC_ANY && |
890 | test_bit(fs->location, priv->cfp.used)) | 893 | test_bit(fs->location, priv->cfp.used)) |
891 | return -EBUSY; | 894 | return -EBUSY; |
@@ -974,6 +977,9 @@ static int bcm_sf2_cfp_rule_del(struct bcm_sf2_priv *priv, int port, u32 loc) | |||
974 | struct cfp_rule *rule; | 977 | struct cfp_rule *rule; |
975 | int ret; | 978 | int ret; |
976 | 979 | ||
980 | if (loc >= CFP_NUM_RULES) | ||
981 | return -EINVAL; | ||
982 | |||
977 | /* Refuse deleting unused rules, and those that are not unique since | 983 | /* Refuse deleting unused rules, and those that are not unique since |
978 | * that could leave IPv6 rules with one of the chained rule in the | 984 | * that could leave IPv6 rules with one of the chained rule in the |
979 | * table. | 985 | * table. |