This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] em28xx: use after free in em28xx_v4l2_close()
Author:  Dan Carpenter <[email protected]>
Date:    Tue Aug 14 02:58:15 2012 -0300

We need to move the unlock before the kfree(dev);

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/usb/em28xx/em28xx-video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=e36c92fd63bb4773e6f4bc38ecee11a609ded1cf

diff --git a/drivers/media/usb/em28xx/em28xx-video.c 
b/drivers/media/usb/em28xx/em28xx-video.c
index ecb23df..78d6ebd 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -2264,9 +2264,9 @@ static int em28xx_v4l2_close(struct file *filp)
                if (dev->state & DEV_DISCONNECTED) {
                        em28xx_release_resources(dev);
                        kfree(dev->alt_max_pkt_size);
+                       mutex_unlock(&dev->lock);
                        kfree(dev);
                        kfree(fh);
-                       mutex_unlock(&dev->lock);
                        return 0;
                }
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to