]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: unify the init logic for act_police
authorWANG Cong <xiyou.wangcong@gmail.com>
Sun, 14 Aug 2016 05:35:01 +0000 (22:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Aug 2016 23:27:51 +0000 (19:27 -0400)
commit5771de62343f568bcf74b436600762e946950d9e
tree516e10d249bd34a6eaf587ca9040ca6599a62029
parent0fbde5cfaa35b6c4b6bbb3be0980ffd18f105c83
net_sched: unify the init logic for act_police

Jamal reported a crash when we create a police action
with a specific index, this is because the init logic
is not correct, we should always create one for this
case. Just unify the logic with other tc actions.

Fixes: 96caef719518 ("act_police: fix a crash during removal")
Reported-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_police.c