[PATCH 17/23][SRU][OEM-5.14] sg: pass the device name to blk_trace_setup
Koba Ko
koba.ko at canonical.com
Fri Jan 28 03:26:04 UTC 2022
From: Christoph Hellwig <hch at lst.de>
BugLink: https://bugs.launchpad.net/bugs/1958850
Fix a regression that passed a NULL device name to blk_trace_setup
accidentally.
Fixes: aebbb5831fbd ("sg: do not allocate a gendisk")
Reported-by: syzbot+f74aa89114a236643919 at syzkaller.appspotmail.com
Signed-off-by: Christoph Hellwig <hch at lst.de>
Reviewed-by: Max Gurtovoy <mgurtovoy at nvidia.com>
Link: https://lore.kernel.org/r/20210825075438.1883687-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe at kernel.dk>
(cherry picked from commit 1d1cf156dc176e30eeaced5cf1450d582d387b81)
Signed-off-by: Koba Ko <koba.ko at canonical.com>
---
drivers/scsi/sg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 477267add49dd..d5889b4f0fd40 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:
--
2.25.1
More information about the kernel-team
mailing list