lkml.org 
[lkml]   [2019]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 4/5] PTP: Add flag for non-periodic output
Date

Hi,

Richard Cochran <richardcochran@gmail.com> writes:

> On Tue, Aug 13, 2019 at 10:48:21AM -0700, Richard Cochran wrote:
>> > + if (copy_from_user(&req.extts, (void __user *)arg,
>> > + sizeof(req.extts))) {
>> > + err = -EFAULT;
>> > + break;
>> > + }
>> > + if (req.extts.flags || req.extts.rsv[0]
>> > + || req.extts.rsv[1]) {
>> > + err = -EINVAL;
>>
>> Since the code is mostly the same as in the PTP_EXTTS_REQUEST case,
>> maybe just double up the case statements (like in the other) and add
>> an extra test for (cmd == PTP_EXTTS_REQUEST2) for this if-block.
>
> Thinking about the drivers, in the case of the legacy ioctls, let's
> also be sure to clear the flags and reserved fields before passing
> them to the drivers.

makes sense to me. I'll update per your requests and send only this
patch officially. Thanks for the pointers.

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-08-14 09:09    [W:0.094 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site