[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bad8e43e-1b8b-90dd-b16e-c8784cbcc8d5@huawei.com>
Date: Tue, 30 Jul 2019 21:52:35 +0800
From: "zhangyi (F)" <yi.zhang@...wei.com>
To: Arnd Bergmann <arnd@...db.de>
CC: linux-aio <linux-aio@...ck.org>,
Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Benjamin LaHaise <bcrl@...ck.org>,
Al Viro <viro@...iv.linux.org.uk>,
Jeff Moyer <jmoyer@...hat.com>,
Deepa Dinamani <deepa.kernel@...il.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: Re: [PATCH v2] aio: add timeout validity check for io_[p]getevents
On 2019/7/30 15:11, Arnd Bergmann Wrote:
> On Tue, Jul 30, 2019 at 3:46 AM zhangyi (F) <yi.zhang@...wei.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.
Powered by blists - more mailing lists