]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: bench-write should return error if io-size >= 4G 12864/head
authorGaurav Kumar Garg <garg.gaurav52@gmail.com>
Tue, 10 Jan 2017 14:25:13 +0000 (15:25 +0100)
committerGaurav Kumar Garg <garg.gaurav52@gmail.com>
Tue, 10 Jan 2017 15:02:01 +0000 (16:02 +0100)
commit6ab73e5f420e89e19b52e39dab28fa4c94e00197
treed1831bef7f5639433cd37d326a6ce8daa0f5d381
parente0acce4953188f16cf3e8cde95f956a84c45addb
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>
src/tools/rbd/action/Bench.cc