On Sun, Dec 30, 2018 at 4:52 PM Michael S. Tsirkin <m...@redhat.com> wrote: > So when we allocated one extra entry it was fine, thus maybe we should rather > list: > > Fixes: 9fb582b67072 ("Revert "net: ptr_ring: otherwise safe empty checks can > overrun array bounds"") > >
Good point, I totally forgot we once allocated one extra entry. However, prior to commit bcecb4bbf88a which introduced the extra one entry, this bug exists too, IIUC. Commit bcecb4bbf88a is merged 18 months after commit 5d49de532002 which is supposed to the one introduced this bug. On the other hand, it does not harm even if we backport this to a kernel release with commit bcecb4bbf88a. Thanks.