Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f1b9c99 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

fib: fib_result_assign() should not change fib refcounts



After commit ebc0ffae (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: default avatarMichael Ellerman <michael@ellerman.id.au>
Tested-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cccbe5ef
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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 */