Skip to content
Commit acd054a5 authored by Anton Blanchard's avatar Anton Blanchard Committed by Jens Axboe
Browse files

Initialise scatter/gather list in ata_sg_setup



After turning on DEBUG_SG I hit a fail:

kernel BUG at include/linux/scatterlist.h:50!

	ata_qc_issue
	ata_scsi_translate
	ipr_queuecommand
	scsi_dispatch_cmd
	scsi_request_fn
	elv_insert
	blk_execute_rq_nowait
	blk_execute_rq
	sg_io
	scsi_cmd_ioctl
	cdrom_ioctl
	sr_block_ioctl
	blkdev_driver_ioctl
	blkdev_ioctl
	block_ioctl
	do_ioctl
	vfs_ioctl
	sys_ioctl
	sg_ioctl_trans

It looks like ata_sg_setup is working on an uninitialised sg table. Call
sg_init_table to initialise it before use.

Signed-off-by: default avatarAnton Blanchard <anton@samba.org>

Note: this patch will fix it, but you could also get away with just
doing the sg_init_table() once at qc creation time.

Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 5336940d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment