]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: properly cancel netlink dump on failure
authorCong Wang <xiyou.wangcong@gmail.com>
Thu, 6 Sep 2018 21:50:16 +0000 (14:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Sep 2018 06:05:07 +0000 (23:05 -0700)
commit2ede4d535c0ff40563cfcf495b149d447efd3103
treea687a142f1edc5d5246cb6b46453ae53ddbd4dc2
parentb53bc567b3bdc08b88e011e93b4fa7285c0735b6
net_sched: properly cancel netlink dump on failure

When nla_put*() fails after nla_nest_start(), we need
to call nla_nest_cancel() to cancel the message, otherwise
we end up calling nla_nest_end() like a success.

Fixes: 2b33f2b7aca3 ("net/sched: add tunnel option support to act_tunnel_key")
Cc: Davide Caratti <dcaratti@redhat.com>
Cc: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_tunnel_key.c