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 @@ -46,7 +46,10 @@ struct fw_filter {
46
46
#endif /* CONFIG_NET_CLS_IND */
47
47
struct tcf_exts exts ;
48
48
struct tcf_proto * tp ;
49
- struct rcu_head rcu ;
49
+ union {
50
+ struct work_struct work ;
51
+ struct rcu_head rcu ;
52
+ };
50
53
};
51
54
52
55
static u32 fw_hash (u32 handle )
@@ -119,12 +122,22 @@ static int fw_init(struct tcf_proto *tp)
119
122
return 0 ;
120
123
}
121
124
122
- static void fw_delete_filter (struct rcu_head * head )
125
+ static void fw_delete_filter_work (struct work_struct * work )
123
126
{
124
- struct fw_filter * f = container_of (head , struct fw_filter , rcu );
127
+ struct fw_filter * f = container_of (work , struct fw_filter , work );
125
128
129
+ rtnl_lock ();
126
130
tcf_exts_destroy (& f -> exts );
127
131
kfree (f );
132
+ rtnl_unlock ();
133
+ }
134
+
135
+ static void fw_delete_filter (struct rcu_head * head )
136
+ {
137
+ struct fw_filter * f = container_of (head , struct fw_filter , rcu );
138
+
139
+ INIT_WORK (& f -> work , fw_delete_filter_work );
140
+ tcf_queue_work (& f -> work );
128
141
}
129
142
130
143
static void fw_destroy (struct tcf_proto * tp )
You can’t perform that action at this time.
0 commit comments