lkml.org 
[lkml]   [2019]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] aio: add timeout validity check for io_[p]getevents
From
Date
On 2019/7/30 15:11, Arnd Bergmann Wrote:
> On Tue, Jul 30, 2019 at 3:46 AM zhangyi (F) <yi.zhang@huawei.com> wrote:
>
>> {
>> - ktime_t until = ts ? timespec64_to_ktime(*ts) : KTIME_MAX;
>> - struct kioctx *ioctx = lookup_ioctx(ctx_id);
>> + ktime_t until = KTIME_MAX;
>> + struct kioctx *ioctx = NULL;
>> long ret = -EINVAL;
>>
>> + if (ts) {
>> + if (!timespec64_valid(ts))
>> + return ret;
>> + until = timespec64_to_ktime(*ts);
>> + }
>
> The man page should probably get updated as well to reflect that this
> will now return -EINVAL for a negative timeout or malformed
> nanoseconds.
>

Thanks for your suggestion, I will add a patch to update the man page.

Thanks,
Yi.

\
 
 \ /
  Last update: 2019-07-30 15:53    [W:0.044 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site