diff options
Diffstat (limited to 'net/sched/cls_flower.c')
-rw-r--r-- | net/sched/cls_flower.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 9aada2d0ef06..92dd5071a708 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -79,6 +79,7 @@ struct fl_flow_tmplt { struct fl_flow_key mask; struct flow_dissector dissector; struct tcf_chain *chain; + struct rcu_work rwork; }; struct cls_fl_head { @@ -1437,14 +1438,22 @@ errout_tb: return ERR_PTR(err); } -static void fl_tmplt_destroy(void *tmplt_priv) +static void fl_tmplt_destroy_work(struct work_struct *work) { - struct fl_flow_tmplt *tmplt = tmplt_priv; + struct fl_flow_tmplt *tmplt = container_of(to_rcu_work(work), + struct fl_flow_tmplt, rwork); fl_hw_destroy_tmplt(tmplt->chain, tmplt); kfree(tmplt); } +static void fl_tmplt_destroy(void *tmplt_priv) +{ + struct fl_flow_tmplt *tmplt = tmplt_priv; + + tcf_queue_work(&tmplt->rwork, fl_tmplt_destroy_work); +} + static int fl_dump_key_val(struct sk_buff *skb, void *val, int val_type, void *mask, int mask_type, int len) |