aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-02-03 01:47:29 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-02-18 04:32:00 -0500
commitc1c201200a359cf3b6e2e36a4236cdca77a3cd8e (patch)
treee214a2773f20b814cb8cc8c5509066cd9ec98a1a /include/linux/fs.h
parent5955c7a2cfb6a35429adea5dc480002b15ca8cfc (diff)
bsg: Fix sense buffer bug in SG_IO
When submitting requests via SG_IO, which does a sync io, a bsg_command is not allocated. So an in-Kernel sense_buffer was not set. However when calling blk_execute_rq() with no sense buffer one is provided from the stack. Now bsg at blk_complete_sgv4_hdr_rq() would check if rq->sense_len and a sense was requested by sg_io_v4 the rq->sense was copy_user() back, but by now it is already mangled stack memory. I have fixed that by forcing a sense_buffer when calling bsg_map_hdr(). The bsg_command->sense is provided in the write/read path like before, and on-the-stack buffer is provided when doing SG_IO. I have also fixed a dprintk message to print rq->errors in hex because of the scsi bit-field use of this member. For other block devices it does not matter anyway. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/fs.h')
0 files changed, 0 insertions, 0 deletions