]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jul 2022 15:36:50 +0000 (17:36 +0200)
commit1e7026665d650a8dc551a5bbffcce935dfbace4d
tree24e5981f25d9a265fb1f07ceb52de0862208173a
parentcd36a58d673824fa8c5588565ab64b546ef4b955
net/sched: act_api: Notify user space if any actions were flushed before error

commit 97914eab748332565c060780aff3b45a5f0455e2 upstream.

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: 03b73b9b7303 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/act_api.c