From: Christoph Hellwig Date: Wed, 25 Aug 2021 07:52:44 +0000 (+0200) Subject: sg: pass the device name to blk_trace_setup X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=460a8a1ec60940d9459586b84b5297aa254e6b83;p=users%2Fhch%2Fblock.git sg: pass the device name to blk_trace_setup Fix a regression that passd a NULL device name to blk_trace_setup accidentally. Fixes: aebbb5831fbd ("sg: do not allocate a gendisk") Reported-by: syzbot+f74aa89114a236643919@syzkaller.appspotmail.com Signed-off-by: Christoph Hellwig --- diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 477267add49d..d5889b4f0fd4 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -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: