]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - net/sched/act_police.c
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)
commit0852e455238f8550fa92b1e40355eb2c6805787e
tree516e10d249bd34a6eaf587ca9040ca6599a62029
parent22dc13c837c33207548c8ee5116b64e2930a6e23
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: a03e6fe56971 ("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