From: Satyam Sharma Date: Mon, 9 Jul 2007 22:22:23 +0000 (-0700) Subject: [NETPOLL]: Fix a leak-n-bug in netpoll_cleanup() X-Git-Tag: v2.6.23-rc1~1109^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1498b3f1952ae539a7d5c356acf942d5f4c1aece;p=pandora-kernel.git [NETPOLL]: Fix a leak-n-bug in netpoll_cleanup() 93ec2c723e3f8a216dde2899aeb85c648672bc6b applied excessive duct tape to the netpoll beast's netpoll_cleanup(), thus substituting one leak with another, and opening up a little buglet :-) net_device->npinfo (netpoll_info) is a shared and refcounted object and cannot simply be set NULL the first time netpoll_cleanup() is called. Otherwise, further netpoll_cleanup()'s see np->dev->npinfo == NULL and become no-ops, thus leaking. And it's a bug too: the first call to netpoll_cleanup() would thus (annoyingly) "disable" other (still alive) netpolls too. Maybe nobody noticed this because netconsole (only user of netpoll) never supported multiple netpoll objects earlier. This is a trivial and obvious one-line fixlet. Signed-off-by: Satyam Sharma Signed-off-by: David S. Miller --- Reading git-diff-tree failed