Linux block layer
 help / color / mirror / Atom feed
From: Max Gurtovoy <mgurtovoy@nvidia.com>
To: Christoph Hellwig <hch@lst.de>, <axboe@kernel.dk>
Cc: <linux-block@vger.kernel.org>,
	<syzbot+f74aa89114a236643919@syzkaller.appspotmail.com>
Subject: Re: [PATCH] sg: pass the device name to blk_trace_setup
Date: Wed, 25 Aug 2021 13:08:41 +0300	[thread overview]
Message-ID: <b6387427-d944-2de6-fb75-4529ac721908@nvidia.com> (raw)
In-Reply-To: <20210825075438.1883687-1-hch@lst.de>


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>


  reply	other threads:[~2021-08-25 10:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  7:54 [PATCH] sg: pass the device name to blk_trace_setup Christoph Hellwig
2021-08-25 10:08 ` Max Gurtovoy [this message]
2021-08-25 12:46 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6387427-d944-2de6-fb75-4529ac721908@nvidia.com \
    --to=mgurtovoy@nvidia.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=syzbot+f74aa89114a236643919@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox