Jason Wang 54e02162d4 ptr_ring: prevent integer overflow when calculating size
Switch to use dividing to prevent integer overflow when size is too
big to calculate allocation size properly.

Reported-by: Eric Biggers <ebiggers3@gmail.com>
Fixes: 6e6e41c31122 ("ptr_ring: fail early if queue occupies more than KMALLOC_MAX_SIZE")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-11 22:33:22 -05:00
..
2018-02-06 10:32:13 +01:00
2018-02-07 11:33:08 -08:00
2018-02-07 11:22:44 -08:00
2018-02-10 13:16:35 -08:00
2018-02-02 10:01:04 -08:00
2018-02-03 13:07:56 -08:00
2018-02-01 16:35:31 -08:00
2018-02-07 12:11:09 -08:00
2018-02-07 13:10:43 -08:00
2017-12-22 12:30:10 -08:00