[PATCHv8 04/13] cec: expose the new connector info API
Hans Verkuil
hverkuil-cisco at xs4all.nl
Tue Jun 25 14:28:26 UTC 2019
On 6/25/19 3:59 PM, Dariusz Marcinkiewicz wrote:
> 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.
Good catch! Yes, this needs a lock.
Regards,
Hans
>
>> + 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