mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ipv4: fix refcount leak in fib_check_nh()
fib_lookup() forces FIB_LOOKUP_NOREF flag, while fib_table_lookup()
does not.
This patch solves the typical message at reboot time or device
dismantle :
unregister_netdevice: waiting for eth0 to become free. Usage count = 4
Fixes: 3bfd847203 ("net: Use passed in table for nexthop lookups")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: David Ahern <[email protected]>
Acked-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d52736e24f
commit
1e31367899
1 changed files with 2 additions and 1 deletions
|
|
@ -708,7 +708,8 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
|
|||
|
||||
if (tbl)
|
||||
err = fib_table_lookup(tbl, &fl4, &res,
|
||||
FIB_LOOKUP_IGNORE_LINKSTATE);
|
||||
FIB_LOOKUP_IGNORE_LINKSTATE |
|
||||
FIB_LOOKUP_NOREF);
|
||||
else
|
||||
err = fib_lookup(net, &fl4, &res,
|
||||
FIB_LOOKUP_IGNORE_LINKSTATE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue