]> git.baikalelectronics.ru Git - kernel.git/commit
cls_flower: Fix incorrect idr release when failing to modify rule
authorPaul Blakey <paulb@mellanox.com>
Wed, 30 May 2018 08:29:15 +0000 (11:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 May 2018 19:18:44 +0000 (15:18 -0400)
commitd9f1fea4119e8f195b58967b7238f1b1ada96a1c
tree7b7e7a59b441da96e0f7b10bb281006d85a76ded
parentd09a0ea4ee61c094911c9124a75fc6abe4044b02
cls_flower: Fix incorrect idr release when failing to modify rule

When we fail to modify a rule, we incorrectly release the idr handle
of the unmodified old rule.

Fix that by checking if we need to release it.

Fixes: 042279ff522c ("net_sched: remove cls_flower idr on failure")
Reported-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_flower.c