Re: [PATCH -rc7 1/1] netpoll: Fix a leak-n-bug in netpoll_cleanup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Satyam Sharma <[email protected]>
Date: Wed, 04 Jul 2007 16:36:41 +0530

> From: Satyam Sharma <[email protected]>
> 
> [1/1] 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 <[email protected]>

Applied to net-2.6.23, I'll forward this on to -stable too.

Thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux