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

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

 



Hi.

This looks good except one comment about the ioctl.

On Mon, Jun 24, 2019 at 6:03 PM Hans Verkuil <hverkuil-cisco@xxxxxxxxx> wrote:
>
...
> +static long cec_adap_g_connector_info(struct cec_adapter *adap,
> +                                     struct cec_log_addrs __user *parg)
> +{
> +       if (!(adap->capabilities & CEC_CAP_CONNECTOR_INFO))
> +               return -ENOTTY;
I guess access to adap->conn_info needs to be guarded by the lock now.

> +       if (copy_to_user(parg, &adap->conn_info,
> +                        sizeof(adap->conn_info)))
> +               return -EFAULT;
> +       return 0;
> +}

Best regards.



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux