All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sg: pass the device name to blk_trace_setup
@ 2021-08-25  7:54 Christoph Hellwig
  2021-08-25 10:08 ` Max Gurtovoy
  2021-08-25 12:46 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-08-25  7:54 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, syzbot+f74aa89114a236643919

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 <hch@lst.de>
---
 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 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:
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sg: pass the device name to blk_trace_setup
  2021-08-25  7:54 [PATCH] sg: pass the device name to blk_trace_setup Christoph Hellwig
@ 2021-08-25 10:08 ` Max Gurtovoy
  2021-08-25 12:46 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Max Gurtovoy @ 2021-08-25 10:08 UTC (permalink / raw)
  To: Christoph Hellwig, axboe; +Cc: linux-block, syzbot+f74aa89114a236643919


On 8/25/2021 10:54 AM, Christoph Hellwig wrote:
> 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 <hch@lst.de>
> ---
>   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 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:

Looks good,

Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sg: pass the device name to blk_trace_setup
  2021-08-25  7:54 [PATCH] sg: pass the device name to blk_trace_setup Christoph Hellwig
  2021-08-25 10:08 ` Max Gurtovoy
@ 2021-08-25 12:46 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2021-08-25 12:46 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block, syzbot+f74aa89114a236643919

On 8/25/21 1:54 AM, Christoph Hellwig wrote:
> Fix a regression that passd a NULL device name to blk_trace_setup
> accidentally.

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-25 12:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  7:54 [PATCH] sg: pass the device name to blk_trace_setup Christoph Hellwig
2021-08-25 10:08 ` Max Gurtovoy
2021-08-25 12:46 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.