]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd: bench-write should return error if io-size >= 4G 14536/head
authorGaurav Kumar Garg <garg.gaurav52@gmail.com>
Tue, 10 Jan 2017 14:25:13 +0000 (15:25 +0100)
committerNathan Cutler <ncutler@suse.com>
Thu, 13 Apr 2017 21:03:52 +0000 (23:03 +0200)
commitb9258ccfd836d49d64c8de3cb614a4f0ce9806aa
tree2ca45dc86451261d5661beb26f63589f074ff006
parenteb84959bac369dbb86674f9e4225ba1c836c104c
rbd: bench-write should return error if io-size >= 4G

Currently if user perform bench-write with io-size > 4G
then its crashing because currently during memory allocation
bufferptr taking size of buffer as a unsigned and io-size > 4G
will overflow with unsigned. so during memset operation it will
try to set io_size size of memory area pointed by bufferptr,
(bufferptr area is:  (4G - io_size)), so it will cause
segmentation fault.

Fix is to return error if io-size >= 4G

Fixes: http://tracker.ceph.com/issues/18422
Reported-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
(cherry picked from commit 6ab73e5f420e89e19b52e39dab28fa4c94e00197)
src/tools/rbd/action/Bench.cc