]> 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)
commit5202e6cb957368c3b42f80a815b4f244bebe643f
tree516e10d249bd34a6eaf587ca9040ca6599a62029
parent28064b37d73cab6f4f2eb43755cbd69d10ec767b
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: 5d026325565b ("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