Re: [PATCH 17/20] aio: support for IO polling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/28/18 2:33 AM, Benny Halevy wrote:
>> I don't see how we can get there with it being larger than already,
>> that would be a big bug if we fill more events than userspace asked
>> for.
>>
> 
> Currently we indeed can't, but if the code changes in the future and
> we do, this will reduce the damage - hence being safer (and it costs
> nothing in terms of performance).

The thing is, if we're ever over max, we have potentially corrupted user
space memory by copying back too many events. So if anything, it should
be a BUG() condition, not just a check.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux