File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ struct cls_mall_head {
21
21
struct tcf_result res ;
22
22
u32 handle ;
23
23
u32 flags ;
24
- struct rcu_head rcu ;
24
+ union {
25
+ struct work_struct work ;
26
+ struct rcu_head rcu ;
27
+ };
25
28
};
26
29
27
30
static int mall_classify (struct sk_buff * skb , const struct tcf_proto * tp ,
@@ -41,13 +44,23 @@ static int mall_init(struct tcf_proto *tp)
41
44
return 0 ;
42
45
}
43
46
47
+ static void mall_destroy_work (struct work_struct * work )
48
+ {
49
+ struct cls_mall_head * head = container_of (work , struct cls_mall_head ,
50
+ work );
51
+ rtnl_lock ();
52
+ tcf_exts_destroy (& head -> exts );
53
+ kfree (head );
54
+ rtnl_unlock ();
55
+ }
56
+
44
57
static void mall_destroy_rcu (struct rcu_head * rcu )
45
58
{
46
59
struct cls_mall_head * head = container_of (rcu , struct cls_mall_head ,
47
60
rcu );
48
61
49
- tcf_exts_destroy (& head -> exts );
50
- kfree ( head );
62
+ INIT_WORK (& head -> work , mall_destroy_work );
63
+ tcf_queue_work ( & head -> work );
51
64
}
52
65
53
66
static int mall_replace_hw_filter (struct tcf_proto * tp ,
You can’t perform that action at this time.
0 commit comments