Skip to contentSkip to conversation

sg: pass the device name to blk_trace_setup

PATCH Applied Christoph Hellwig 3 participants 3 messages Aug 25, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 [email protected]
---
 drivers/scsi/sg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/sg.c +1 -1
index 477267add49d..d5889b4f0fd4 100644
@@ -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:
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Christoph Hellwig

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

Fixes aebbb5831fbd ("sg: do not allocate a gendisk")
Reported-by [email protected]
---
  drivers/scsi/sg.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/sg.c +0 -0
index 477267add49d..d5889b4f0fd4 100644

drivers/scsi/sg.c sg_ioctl_common(struct file *filp, Sg_device *sdp, Sg_fd *sfp, · line 1124

Quoted 8 lines
drivers/scsi/sg.c +1 -1
@@ -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:

Looks good,

maintainer Applied
#2 lore raw
In reply to Christoph Hellwig
Quoted 2 lines · Christoph Hellwig

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

Applied, thanks.

Signature · 1 line
Jens Axboe