|
|
@@ -94,15 +94,21 @@ static struct ip6_flowlabel *fl_lookup(struct net *net, __be32 label)
|
|
|
return fl;
|
|
|
}
|
|
|
|
|
|
+static void fl_free_rcu(struct rcu_head *head)
|
|
|
+{
|
|
|
+ struct ip6_flowlabel *fl = container_of(head, struct ip6_flowlabel, rcu);
|
|
|
+
|
|
|
+ if (fl->share == IPV6_FL_S_PROCESS)
|
|
|
+ put_pid(fl->owner.pid);
|
|
|
+ kfree(fl->opt);
|
|
|
+ kfree(fl);
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
static void fl_free(struct ip6_flowlabel *fl)
|
|
|
{
|
|
|
- if (fl) {
|
|
|
- if (fl->share == IPV6_FL_S_PROCESS)
|
|
|
- put_pid(fl->owner.pid);
|
|
|
- kfree(fl->opt);
|
|
|
- kfree_rcu(fl, rcu);
|
|
|
- }
|
|
|
+ if (fl)
|
|
|
+ call_rcu(&fl->rcu, fl_free_rcu);
|
|
|
}
|
|
|
|
|
|
static void fl_release(struct ip6_flowlabel *fl)
|