Re: [PATCH 088/117] Staging: hv: netvsc: Inline the code for free_net_device()

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

 



On Fri, Jul 15, 2011 at 10:47:16AM -0700, K. Y. Srinivasan wrote:
> -static void free_net_device(struct netvsc_device *device)
> -{
> -	WARN_ON(atomic_read(&device->refcnt) != 0);
> -	device->dev->ext = NULL;

device->dev->ext points to device.  We set it NULL here to prevent
a use after free bug.  What prevents that in the new code?

> -	kfree(device);
> -}

regards,
dan carpenter


_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux