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