From 42896f26d7c992c5425f9b4908e04e759bd573fb Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Sun, 4 Sep 2011 20:24:20 +0000 Subject: [PATCH] --- yaml --- r: 263945 b: refs/heads/master c: 19c1ea14c930db5e9c0cd7c3c6f4d01457dfcd69 h: refs/heads/master i: 263943: 65233ae31e05f44c17a65b5f1412d185a6910b93 v: v3 --- [refs] | 2 +- trunk/net/ipv4/fib_semantics.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 276742418354..4c2038888f2d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4fb66b8210c7d7147b164e19b1b44da916a75691 +refs/heads/master: 19c1ea14c930db5e9c0cd7c3c6f4d01457dfcd69 diff --git a/trunk/net/ipv4/fib_semantics.c b/trunk/net/ipv4/fib_semantics.c index 33e2c35b74b7..80106d89d548 100644 --- a/trunk/net/ipv4/fib_semantics.c +++ b/trunk/net/ipv4/fib_semantics.c @@ -142,6 +142,14 @@ const struct fib_prop fib_props[RTN_MAX + 1] = { }; /* Release a nexthop info record */ +static void free_fib_info_rcu(struct rcu_head *head) +{ + struct fib_info *fi = container_of(head, struct fib_info, rcu); + + if (fi->fib_metrics != (u32 *) dst_default_metrics) + kfree(fi->fib_metrics); + kfree(fi); +} void free_fib_info(struct fib_info *fi) { @@ -156,7 +164,7 @@ void free_fib_info(struct fib_info *fi) } endfor_nexthops(fi); fib_info_cnt--; release_net(fi->fib_net); - kfree_rcu(fi, rcu); + call_rcu(&fi->rcu, free_fib_info_rcu); } void fib_release_info(struct fib_info *fi)