diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-10-20 14:51:38 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-20 14:51:38 +0200 |
commit | 1faca4ced8594d3586302e8d1788a60932f2bbca (patch) | |
tree | 5130aaa4803a322f3d1f0ff6406f047ed0dba475 /net/ipv4/fib_semantics.c | |
parent | 112d17d6f75b93e1dcaec2e2232a411148b3bf71 (diff) | |
parent | 6b6844dd54e4196dd9818bc63b319f93c37a08be (diff) |
Merge branch 'samsung/devel' of git+ssh://git.linaro.org/home/arndbergmann/public_git/arm-soc into next/devel2
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r-- | net/ipv4/fib_semantics.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 33e2c35b74b7..80106d89d548 100644 --- a/net/ipv4/fib_semantics.c +++ b/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) |