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

Dariusz Marcinkiewicz darekm at google.com
Tue Jun 25 13:59:31 UTC 2019


Hi.

This looks good except one comment about the ioctl.

On Mon, Jun 24, 2019 at 6:03 PM Hans Verkuil <hverkuil-cisco at xs4all.nl> 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.


More information about the dri-devel mailing list