Commit 1d1cf156 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

sg: pass the device name to blk_trace_setup



Fix a regression that passed a NULL device name to blk_trace_setup
accidentally.

Fixes: aebbb583 ("sg: do not allocate a gendisk")
Reported-by: default avatar <syzbot+f74aa89114a236643919@syzkaller.appspotmail.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Link: https://lore.kernel.org/r/20210825075438.1883687-1-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1e294970
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1118,7 +1118,7 @@ sg_ioctl_common(struct file *filp, Sg_device *sdp, Sg_fd *sfp,
		return put_user(max_sectors_bytes(sdp->device->request_queue),
				ip);
	case BLKTRACESETUP:
		return blk_trace_setup(sdp->device->request_queue, NULL,
		return blk_trace_setup(sdp->device->request_queue, sdp->name,
				       MKDEV(SCSI_GENERIC_MAJOR, sdp->index),
				       NULL, p);
	case BLKTRACESTART: