]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: act_api: Notify user space if any actions were flushed before error
authorVictor Nogueira <victor@mojatatu.com>
Thu, 23 Jun 2022 14:07:41 +0000 (11:07 -0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 28 Jun 2022 04:51:23 +0000 (21:51 -0700)
commitac4bdc934ddf7f1ce318a5d671694f568e5a9f65
tree4aa5250f647f54598b6f26305805add2acbe635c
parentf295831217d768615ea3853c652babebcab816f3
net/sched: act_api: Notify user space if any actions were flushed before error

If during an action flush operation one of the actions is still being
referenced, the flush operation is aborted and the kernel returns to
user space with an error. However, if the kernel was able to flush, for
example, 3 actions and failed on the fourth, the kernel will not notify
user space that it deleted 3 actions before failing.

This patch fixes that behaviour by notifying user space of how many
actions were deleted before flush failed and by setting extack with a
message describing what happened.

Fixes: 9ae3b9c21c89 ("net_sched: act: refuse to remove bound action outside")
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/act_api.c