]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: fix refcount leak in fib_check_nh()
authorEric Dumazet <edumazet@google.com>
Sat, 15 Aug 2015 17:54:07 +0000 (10:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Aug 2015 05:14:32 +0000 (22:14 -0700)
commitd514ecedaca35bd9d86a7a868acbfc6a6ee79eb4
tree82c553cbe65590071c28001f27e6325ad240bbb9
parent1d0dd845c76294751e7933afa4859bd90aac18d5
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: 088e3db430a1 ("net: Use passed in table for nexthop lookups")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: David Ahern <dsa@cumulusnetworks.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c