]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: act_ife: always release ife action on init error
authorVlad Buslov <vladbu@mellanox.com>
Tue, 14 Aug 2018 17:29:56 +0000 (20:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Aug 2018 19:12:12 +0000 (12:12 -0700)
commit866a5f898dec96b754c57d6adf16096c9eb4f4e9
treee032ecc8fe44d5c4534999e5bdd97e1cced66080
parent064090adb75e4bfeab3467cce0f9f0160786b525
net: sched: act_ife: always release ife action on init error

Action init API was changed to always take reference to action, even when
overwriting existing action. Substitute conditional action release, which
was executed only if action is newly created, with unconditional release in
tcf_ife_init() error handling code to prevent double free or memory leak in
case of overwrite.

Fixes: bca2d6466f16 ("net: sched: don't release reference on action overwrite")
Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_ife.c