Skip to content

Commit

Permalink
fib: fib_result_assign() should not change fib refcounts
Browse files Browse the repository at this point in the history
After commit ebc0ffa (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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 4, 2010
1 parent cccbe5e commit 1f1b9c9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/ipv4/fib_lookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@ extern int fib_detect_death(struct fib_info *fi, int order,
static inline void fib_result_assign(struct fib_result *res,
struct fib_info *fi)
{
if (res->fi != NULL)
fib_info_put(res->fi);
/* we used to play games with refcounts, but we now use RCU */
res->fi = fi;
if (fi != NULL)
atomic_inc(&fi->fib_clntref);
}

#endif /* _FIB_LOOKUP_H */

0 comments on commit 1f1b9c9

Please sign in to comment.