Thread (175 messages) 175 messages, 9 authors, 2011-08-25

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

From: Dan Carpenter <hidden>
Date: 2011-07-16 10:35:36
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help