]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: return -ENOENT when trying to remove filter from non-existent chain
authorJiri Pirko <jiri@mellanox.com>
Mon, 27 Aug 2018 18:58:44 +0000 (20:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Aug 2018 22:16:16 +0000 (15:16 -0700)
commit202cc5eb1a2109f2eeac091ad841923c93f01622
tree7de48667acf0c9b155da55796963d92b37d0ac7a
parenta9a3b559b8c66cade03f3ef93a9f95e8ee6218b8
net: sched: return -ENOENT when trying to remove filter from non-existent chain

When chain 0 was implicitly created, removal of non-existent filter from
chain 0 gave -ENOENT. Once chain 0 became non-implicit, the same call is
giving -EINVAL. Fix this by returning -ENOENT in that case.

Reported-by: Roman Mashak <mrv@mojatatu.com>
Fixes: 4d581538c312 ("net: sched: Avoid implicit chain 0 creation")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c