mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
act_mirred: avoid calling tcf_hash_release() when binding
When we share an action within a filter, the bind refcnt should increase, therefore we should not call tcf_hash_release(). Cc: Jamal Hadi Salim <[email protected]> Cc: Daniel Borkmann <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3576fd794b
commit
636dba8e12
1 changed files with 2 additions and 0 deletions
|
|
@ -98,6 +98,8 @@ static int tcf_mirred_init(struct net *net, struct nlattr *nla,
|
|||
return ret;
|
||||
ret = ACT_P_CREATED;
|
||||
} else {
|
||||
if (bind)
|
||||
return 0;
|
||||
if (!ovr) {
|
||||
tcf_hash_release(a, bind);
|
||||
return -EEXIST;
|
||||
|
|
|
|||
Loading…
Reference in a new issue