netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next V2 1/2] cls_flower: Fix missing free of rhashtable
@ 2018-06-03  7:06 Paul Blakey
  2018-06-03  7:06 ` [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter Paul Blakey
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Paul Blakey @ 2018-06-03  7:06 UTC (permalink / raw)
  To: Jiri Pirko, Cong Wang, Jamal Hadi Salim, David Miller, netdev
  Cc: Yevgeny Kliteynik, Roi Dayan, Shahar Klein, Mark Bloch,
	Or Gerlitz, Paul Blakey

When destroying the instance, destroy the head rhashtable.

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, 2 insertions(+)

diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index 3786fea..159efd9 100644
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -326,6 +326,8 @@ static void fl_destroy_sleepable(struct work_struct *work)
 	struct cls_fl_head *head = container_of(to_rcu_work(work),
 						struct cls_fl_head,
 						rwork);
+
+	rhashtable_destroy(&head->ht);
 	kfree(head);
 	module_put(THIS_MODULE);
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter
  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
  2018-06-04 17:52   ` 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
  2 siblings, 2 replies; 7+ messages in thread
From: Paul Blakey @ 2018-06-03  7:06 UTC (permalink / raw)
  To: Jiri Pirko, Cong Wang, Jamal Hadi Salim, David Miller, netdev
  Cc: Yevgeny Kliteynik, Roi Dayan, Shahar Klein, Mark Bloch,
	Or Gerlitz, Paul Blakey

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next V2 1/2] cls_flower: Fix missing free of rhashtable
  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 ` [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter Paul Blakey
@ 2018-06-04 17:51 ` Simon Horman
  2018-06-04 21:04 ` David Miller
  2 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2018-06-04 17:51 UTC (permalink / raw)
  To: Paul Blakey
  Cc: Jiri Pirko, Cong Wang, Jamal Hadi Salim, David Miller, netdev,
	Yevgeny Kliteynik, Roi Dayan, Shahar Klein, Mark Bloch,
	Or Gerlitz

On Sun, Jun 03, 2018 at 10:06:13AM +0300, Paul Blakey wrote:
> When destroying the instance, destroy the head rhashtable.
> 
> 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>

Reviewed-by: Simon Horman <simon.horman@netronome.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter
  2018-06-03  7:06 ` [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter Paul Blakey
@ 2018-06-04 17:52   ` Simon Horman
  2018-06-04 21:04   ` David Miller
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Horman @ 2018-06-04 17:52 UTC (permalink / raw)
  To: Paul Blakey
  Cc: Jiri Pirko, Cong Wang, Jamal Hadi Salim, David Miller, netdev,
	Yevgeny Kliteynik, Roi Dayan, Shahar Klein, Mark Bloch,
	Or Gerlitz

On Sun, Jun 03, 2018 at 10:06:14AM +0300, Paul Blakey wrote:
> 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>

Reviewed-by: Simon Horman <simon.horman@netronome.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next V2 1/2] cls_flower: Fix missing free of rhashtable
  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 ` [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter Paul Blakey
  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
  2 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2018-06-04 21:04 UTC (permalink / raw)
  To: paulb
  Cc: jiri, xiyou.wangcong, jhs, netdev, kliteyn, roid, shahark, markb,
	ogerlitz

From: Paul Blakey <paulb@mellanox.com>
Date: Sun,  3 Jun 2018 10:06:13 +0300

> When destroying the instance, destroy the head rhashtable.
> 
> 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>

Applied.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter
  2018-06-03  7:06 ` [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter Paul Blakey
  2018-06-04 17:52   ` Simon Horman
@ 2018-06-04 21:04   ` David Miller
  1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2018-06-04 21:04 UTC (permalink / raw)
  To: paulb
  Cc: jiri, xiyou.wangcong, jhs, netdev, kliteyn, roid, shahark, markb,
	ogerlitz

From: Paul Blakey <paulb@mellanox.com>
Date: Sun,  3 Jun 2018 10:06:14 +0300

> 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>

Applied.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next V2 1/2] cls_flower: Fix missing free of rhashtable
  2018-06-04 21:04 ` David Miller
@ 2018-06-05  7:44   ` Paul Blakey
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Blakey @ 2018-06-05  7:44 UTC (permalink / raw)
  To: David Miller
  Cc: paulb, jiri, xiyou.wangcong, jhs, netdev, kliteyn, roid, shahark,
	markb, ogerlitz



On 05/06/2018 00:04, David Miller wrote:
> From: Paul Blakey <paulb@mellanox.com>
> Date: Sun,  3 Jun 2018 10:06:13 +0300
> 
>> When destroying the instance, destroy the head rhashtable.
>>
>> 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>
> 
> Applied.
> 

thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-06-05  7:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH net-next V2 2/2] cls_flower: Fix comparing of old filter mask with new filter Paul Blakey
2018-06-04 17:52   ` 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

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).