Commit 9fb582b6 authored by Committed by David S. MillerBrowse files
Revert "net: ptr_ring: otherwise safe empty checks can overrun array bounds"
This reverts commit bcecb4bb . If we try to allocate an extra entry as the above commit did, and when the requested size is UINT_MAX, addition overflows causing zero size to be passed to kmalloc(). kmalloc then returns ZERO_SIZE_PTR with a subsequent crash. Reported-by: email@example.com Cc: John Fastabend <firstname.lastname@example.org> Signed-off-by: Michael S. Tsirkin <email@example.com> Acked-by: John Fastabend <firstname.lastname@example.org> Signed-off-by: David S. Miller <email@example.com>
Showing with 1 addition and 6 deletions