From: Paul Blakey <paulb@mellanox.com>
To: Jiri Pirko <jiri@mellanox.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Cc: Yevgeny Kliteynik <kliteyn@mellanox.com>,
Roi Dayan <roid@mellanox.com>,
Shahar Klein <shahark@mellanox.com>,
Mark Bloch <markb@mellanox.com>,
Or Gerlitz <ogerlitz@mellanox.com>,
Paul Blakey <paulb@mellanox.com>
Subject: [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter
Date: Sun, 3 Jun 2018 10:06:14 +0300 [thread overview]
Message-ID: <1528009574-63306-2-git-send-email-paulb@mellanox.com> (raw)
In-Reply-To: <1528009574-63306-1-git-send-email-paulb@mellanox.com>
We incorrectly compare the mask and the result is that we can't modify
an already existing rule.
Fix that by comparing correctly.
Fixes: 05cd271fd61a ("cls_flower: Support multiple masks per priority")
Reported-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Paul Blakey <paulb@mellanox.com>
---
Changelog: v0 -> v2: rebased.
net/sched/cls_flower.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index 159efd9..2b5be42 100644
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -877,7 +877,7 @@ static int fl_check_assign_mask(struct cls_fl_head *head,
return PTR_ERR(newmask);
fnew->mask = newmask;
- } else if (fold && fold->mask == fnew->mask) {
+ } else if (fold && fold->mask != fnew->mask) {
return -EINVAL;
}
--
2.7.4
next prev parent reply other threads:[~2018-06-03 7:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-03 7:06 [PATCH net-next V2 1/2] cls_flower: Fix missing free of rhashtable Paul Blakey
2018-06-03 7:06 ` Paul Blakey [this message]
2018-06-04 17:52 ` [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter Simon Horman
2018-06-04 21:04 ` David Miller
2018-06-04 17:51 ` [PATCH net-next V2 1/2] cls_flower: Fix missing free of rhashtable Simon Horman
2018-06-04 21:04 ` David Miller
2018-06-05 7:44 ` Paul Blakey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1528009574-63306-2-git-send-email-paulb@mellanox.com \
--to=paulb@mellanox.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@mellanox.com \
--cc=kliteyn@mellanox.com \
--cc=markb@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=roid@mellanox.com \
--cc=shahark@mellanox.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).