media: video: tegra: nvavp: Fix nvmap handle issue
Gajanan Bhat [Wed, 12 Dec 2012 20:06:04 +0000 (12:06 -0800)]
In open call we were assigning the driver's nvmap handle to
the nvavp's client context which would get released in release
call to driver. This will cause driver's nvmap handle to be
invalid if a parallel client context is running and driver does
any nvmap operation.

Bug 1013063
Bug 1192772

Change-Id: Id02520ae8ec511bb8c50bc4d3908ea3e75e1ea6b
Reviewed-on: http://git-master/r/170585
Signed-off-by: Gajanan Bhat <gbhat@nvidia.com>
Reviewed-on: http://git-master/r/171097
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

drivers/media/video/tegra/nvavp/nvavp_dev.c

index 4501abb..d5edcbe 100644 (file)
@@ -1355,7 +1355,6 @@ static int tegra_nvavp_open(struct inode *inode, struct file *filp, int channel_
        if (!ret)
                nvavp->refcount++;
 
-       clientctx->nvmap = nvavp->nvmap;
        clientctx->nvavp = nvavp;
 
        filp->private_data = clientctx;