Re: [PATCH net] ptr_ring: prevent integer overflow when calculating size

2018-02-11 Thread David Miller
From: Jason Wang Date: Sun, 11 Feb 2018 11:28:12 +0800 > Switch to use dividing to prevent integer overflow when size is too > big to calculate allocation size properly. > > Reported-by: Eric Biggers > Fixes: 6e6e41c31122 ("ptr_ring: fail early if

Re: [PATCH net] ptr_ring: prevent integer overflow when calculating size

2018-02-11 Thread Michael S. Tsirkin
On Sun, Feb 11, 2018 at 11:28:12AM +0800, Jason Wang wrote: > Switch to use dividing to prevent integer overflow when size is too > big to calculate allocation size properly. > > Reported-by: Eric Biggers > Fixes: 6e6e41c31122 ("ptr_ring: fail early if queue occupies more

[PATCH net] ptr_ring: prevent integer overflow when calculating size

2018-02-10 Thread Jason Wang
Switch to use dividing to prevent integer overflow when size is too big to calculate allocation size properly. Reported-by: Eric Biggers Fixes: 6e6e41c31122 ("ptr_ring: fail early if queue occupies more than KMALLOC_MAX_SIZE") Signed-off-by: Jason Wang