Re: [PATCH net] net/sched: act_police: fix memory leak in case of invalid control action

2018-11-30 Thread David Miller
From: Davide Caratti Date: Wed, 28 Nov 2018 18:43:42 +0100 > when users set an invalid control action, kmemleak complains as follows: > > # echo clear >/sys/kernel/debug/kmemleak > # ./tdc.py -e b48b > Test b48b: Add police action with exceed goto chain control action > All test results: >

Re: [PATCH net] net/sched: act_police: fix memory leak in case of invalid control action

2018-11-29 Thread Cong Wang
On Wed, Nov 28, 2018 at 9:44 AM Davide Caratti wrote: > > when users set an invalid control action, kmemleak complains as follows: ... > change tcf_police_init() to avoid leaking 'new' in case TCA_POLICE_RESULT > contains TC_ACT_GOTO_CHAIN extended action. > > Fixes: c08f5ed5d625 ("net/sched:

[PATCH net] net/sched: act_police: fix memory leak in case of invalid control action

2018-11-28 Thread Davide Caratti
when users set an invalid control action, kmemleak complains as follows: # echo clear >/sys/kernel/debug/kmemleak # ./tdc.py -e b48b Test b48b: Add police action with exceed goto chain control action All test results: 1..1 ok 1 - b48b # Add police action with exceed goto chain control