OSDN Git Service

netconsole: enable netconsole can make net_device refcnt incorrent
authorGao feng <gaofeng@cn.fujitsu.com>
Tue, 11 Oct 2011 16:08:11 +0000 (16:08 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:36:27 +0000 (09:36 -0800)
commit18743353b3154f0ff7c29f3c5ae3a8466a70d73a
treecd647b83853135d4481a93cb1185647a2972a720
parent89c32c14c190c6113187c7c57784695701e314e4
netconsole: enable netconsole can make net_device refcnt incorrent

[ Upstream commit d5123480b1d6f7d1a5fe1a13520cef88fb5d4c84 ]

There is no check if netconsole is enabled current.
so when exec echo 1 > enabled;
the reference of net_device will increment always.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/netconsole.c