diff options
author | Jason Wang <jasowang@redhat.com> | 2018-02-11 06:28:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-12 06:33:22 +0300 |
commit | 54e02162d4454a99227f520948bf4494c3d972d0 (patch) | |
tree | 47f1ac2164f0f61abb6e55ff4e8f9142ac6e2ba1 /drivers/net/ethernet/marvell/mvpp2.c | |
parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) | |
download | linux-54e02162d4454a99227f520948bf4494c3d972d0.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvpp2.c')
0 files changed, 0 insertions, 0 deletions