diff options
author | Jason Wang <[email protected]> | 2018-02-11 11:28:12 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2018-02-11 22:33:22 -0500 |
commit | 54e02162d4454a99227f520948bf4494c3d972d0 (patch) | |
tree | 47f1ac2164f0f61abb6e55ff4e8f9142ac6e2ba1 /net/unix/af_unix.c | |
parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) |
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 <[email protected]>
Fixes: 6e6e41c31122 ("ptr_ring: fail early if queue occupies more than KMALLOC_MAX_SIZE")
Signed-off-by: Jason Wang <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions