linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Damien Le Moal <damien.lemoal@wdc.com>, linux-block@vger.kernel.org
Cc: Matias Bjorling <matias.bjorling@wdc.com>
Subject: Re: [PATCH v3] nullb: Prevent use of legacy request queue mode
Date: Mon, 11 Feb 2019 19:55:27 -0700	[thread overview]
Message-ID: <a27e13e6-93a3-e7f7-cc67-a7169c8a44ad@kernel.dk> (raw)
In-Reply-To: <20190211234716.18816-1-damien.lemoal@wdc.com>

On 2/11/19 4:47 PM, Damien Le Moal wrote:
> When null_blk queue mode is specified together with modprobe/insmod, a
> check to prevent setting the nullb device queue mode to 1 (NULL_Q_RQ) is
> done. However, the same check is not performed when setting up a nullb
> device through configfs, resulting in a oops (NULL pointer dereference
> for the device request queue).
> 
> Fix this problem by checking for an invalid queue mode value in
> null_validate_conf(), propagating -EINVAL to null_add_dev() if the queue
> mode is NULL_Q_RQ. While at it, also fix the propagation to user space
> of null_add_dev() return value when a nullb device is created through
> the power attribute of configfs.
> 
> Finally, remove the "1=rq" value from the list of possible values of
> the queue_mode module argument to make it clear that this is no longer
> a valid setting.

I actually left that in there on purpose, to avoid breaking test
scripts. It's not the perfect solution, but I viewed it as the
lesser of two evils. Maybe we're fine now, I think blktests has
been fixed a while back?

-- 
Jens Axboe


  reply	other threads:[~2019-02-12  2:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 23:47 [PATCH v3] nullb: Prevent use of legacy request queue mode Damien Le Moal
2019-02-12  2:55 ` Jens Axboe [this message]
2019-02-12  3:01   ` Damien Le Moal

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=a27e13e6-93a3-e7f7-cc67-a7169c8a44ad@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=matias.bjorling@wdc.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;
as well as URLs for NNTP newsgroup(s).