On Fri, Oct 16, 2015 at 10:06:48AM -0400, Benjamin Romer wrote:
> @@ -526,7 +549,8 @@ visorinput_channel_interrupt(struct visor_device *dev)
>       int xmotion, ymotion, zmotion, button;
>       int i;
>  
> -     struct visorinput_devdata *devdata = dev_get_drvdata(&dev->device);
> +     struct visorinput_devdata *devdata =
> +             devdata_get(dev_get_drvdata(&dev->device));
>  
>       if (!devdata)
>               return;
> @@ -616,6 +640,7 @@ visorinput_channel_interrupt(struct visor_device *dev)
>               }
>       }
>  out_locked:
> +     devdata_put(devdata);
>       up_write(&devdata->lock_visor_dev);
>  }

Always release resources in the reverse order from how they were taken.
So we call devdata_put() after up_write().  Otherwise it looks like a
use after free or something.

regards,
dan carpenter
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to