Re: [PATCHv9 04/13] cec: expose the new connector info API

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

 



Hi again.
On Tue, Jun 25, 2019 at 4:45 PM Hans Verkuil <hverkuil-cisco@xxxxxxxxx> wrote:
>
> +       mutex_lock(&adap->lock);
> +       if (copy_to_user(parg, &adap->conn_info, sizeof(adap->conn_info)))
> +               ret = -EFAULT;
> +       mutex_unlock(&adap->lock);
> +       return ret;
> +}
Shouldn't the lock be released before calling copy_to_user? I guess
you need to make an extra copy of the conn_info, like it is done for
other ioctls.

Regards.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux