Linux block layer
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Nilay Shroff <nilay@linux.ibm.com>, linux-block@vger.kernel.org
Cc: hch@lst.de, ming.lei@redhat.com, axboe@kernel.dk, gjoyce@ibm.com
Subject: Re: [PATCH] block: fix module reference leak in mq-deadline I/O scheduler
Date: Mon, 21 Jul 2025 09:14:52 +0200	[thread overview]
Message-ID: <856ccfc6-f576-4789-8f4d-92b9498527d8@suse.de> (raw)
In-Reply-To: <20250719132722.769536-1-nilay@linux.ibm.com>

On 7/19/25 15:26, Nilay Shroff wrote:
> During probe, when the block layer registers a request queue, it
> defaults to the mq-deadline I/O scheduler if the device is single-queue
> and the mq-deadline module is available. To determine availability, the
> elevator_set_default() invokes elevator_find_get(), which increments the
> module's reference count. However, this reference is never released,
> resulting in a module reference leak that prevents the mq-deadline module
> from being unloaded.
> 
> This patch fixes the issue by ensuring the acquired module reference is
> properly released.
> 
> Fixes: 1e44bedbc921 ("block: unifying elevator change")
> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
> ---
> Note: This patch is based on https://lore.kernel.org/all/20250718133232.626418-1-nilay@linux.ibm.com/
> So please apply this patch after the above is merged.
> ---
>   block/elevator.c | 19 +++++++++++++------
>   1 file changed, 13 insertions(+), 6 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich

  parent reply	other threads:[~2025-07-21  7:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-19 13:26 [PATCH] block: fix module reference leak in mq-deadline I/O scheduler Nilay Shroff
2025-07-20 12:22 ` Ming Lei
2025-07-21  7:14 ` Hannes Reinecke [this message]
2025-07-21 12:48 ` 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=856ccfc6-f576-4789-8f4d-92b9498527d8@suse.de \
    --to=hare@suse.de \
    --cc=axboe@kernel.dk \
    --cc=gjoyce@ibm.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=nilay@linux.ibm.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