All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Nilay Shroff <nilay@linux.ibm.com>, linux-block@vger.kernel.org
Cc: hch@lst.de, ming.lei@redhat.com, hare@suse.de, axboe@kernel.dk,
	johannes.thumshirn@wdc.com, gjoyce@ibm.com
Subject: Re: [PATCH 1/2] lib/sbitmap: fix kernel crash observed when sbitmap depth is zero
Date: Mon, 21 Jul 2025 22:02:11 +0900	[thread overview]
Message-ID: <ec79f6be-bd33-4654-b933-edb021a5e780@kernel.org> (raw)
In-Reply-To: <20250720113553.913034-2-nilay@linux.ibm.com>

On 2025/07/20 20:35, Nilay Shroff wrote:
> We observed a kernel crash when the I/O scheduler allocates an sbitmap
> for a hardware queue (hctx) that has no associated software queues (ctx),
> and later attempts to free it. When no software queues are mapped to a
> hardware queue, the sbitmap is initialized with a depth of zero. In such
> cases, the sbitmap_init_node() function should set sb->alloc_hint to NULL.
> However, if this is not done, sb->alloc_hint may contain garbage, and
> calling sbitmap_free() will pass this invalid pointer to free_percpu(),
> resulting in a kernel crash.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>



-- 
Damien Le Moal
Western Digital Research

  parent reply	other threads:[~2025-07-21 13:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-20 11:35 [PATCH 0/2] fix sbitmap initialization and null_blk tagset setup Nilay Shroff
2025-07-20 11:35 ` [PATCH 1/2] lib/sbitmap: fix kernel crash observed when sbitmap depth is zero Nilay Shroff
2025-07-21  7:15   ` Hannes Reinecke
2025-07-21 13:02   ` Damien Le Moal [this message]
2025-07-20 11:35 ` [PATCH 2/2] null_blk: fix set->driver_data while setting up tagset Nilay Shroff
2025-07-21  7:16   ` Hannes Reinecke
2025-07-21 13:04   ` Damien Le Moal
2025-07-21 13:37     ` Nilay Shroff

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=ec79f6be-bd33-4654-b933-edb021a5e780@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=gjoyce@ibm.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=johannes.thumshirn@wdc.com \
    --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 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.