From: Christoph Hellwig <hch@infradead.org>
To: "Ewan D. Milne" <emilne@redhat.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: sd: do not call device_add() on scsi_disk with uninitialized gendisk ->queue
Date: Thu, 2 Sep 2021 18:00:06 +0100 [thread overview]
Message-ID: <YTEDFs8GdhTi6EUl@infradead.org> (raw)
In-Reply-To: <20210902162425.17208-1-emilne@redhat.com>
On Thu, Sep 02, 2021 at 12:24:25PM -0400, Ewan D. Milne wrote:
> Calling device_add() makes the scsi_disk visible in sysfs, the accessor
> routines reference sdkp->disk->queue which was not yet set properly.
> Fix this by initializing gendisk fields earlier in the function.
What kernel is this against? This won't apply against linux-next
as disk->queue is now always set up by __blk_alloc_disk.
next prev parent reply other threads:[~2021-09-02 17:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 16:24 [PATCH] scsi: sd: do not call device_add() on scsi_disk with uninitialized gendisk ->queue Ewan D. Milne
2021-09-02 17:00 ` Christoph Hellwig [this message]
2021-09-02 19:35 ` Ewan Milne
2021-09-03 4:41 ` Christoph Hellwig
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=YTEDFs8GdhTi6EUl@infradead.org \
--to=hch@infradead.org \
--cc=emilne@redhat.com \
--cc=linux-scsi@vger.kernel.org \
/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