diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-03 21:21:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-04 15:05:32 -0400 |
commit | 1f1b9c9990205759aae31b7734b0ede41a867f32 (patch) | |
tree | aba367dd7280ff38932c881a0fcf5356bea53df2 /net/ipv4 | |
parent | cccbe5ef85284621d19e5b2b1c61cc0506bc9dee (diff) |
fib: fib_result_assign() should not change fib refcounts
After commit ebc0ffae5 (RCU conversion of fib_lookup()),
fib_result_assign() should not change fib refcounts anymore.
Thanks to Michael who did the bisection and bug report.
Reported-by: Michael Ellerman <michael@ellerman.id.au>
Tested-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/fib_lookup.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv4/fib_lookup.h b/net/ipv4/fib_lookup.h index a29edf2219c8..c079cc0ec651 100644 --- a/net/ipv4/fib_lookup.h +++ b/net/ipv4/fib_lookup.h | |||
@@ -47,11 +47,8 @@ extern int fib_detect_death(struct fib_info *fi, int order, | |||
47 | static inline void fib_result_assign(struct fib_result *res, | 47 | static inline void fib_result_assign(struct fib_result *res, |
48 | struct fib_info *fi) | 48 | struct fib_info *fi) |
49 | { | 49 | { |
50 | if (res->fi != NULL) | 50 | /* we used to play games with refcounts, but we now use RCU */ |
51 | fib_info_put(res->fi); | ||
52 | res->fi = fi; | 51 | res->fi = fi; |
53 | if (fi != NULL) | ||
54 | atomic_inc(&fi->fib_clntref); | ||
55 | } | 52 | } |
56 | 53 | ||
57 | #endif /* _FIB_LOOKUP_H */ | 54 | #endif /* _FIB_LOOKUP_H */ |