public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: hch@lst.de, yukuai3@huawei.com, Yu Kuai <yukuai1@huaweicloud.com>
Cc: penguin-kernel@I-love.SAKURA.ne.jp, linux-block@vger.kernel.org,
	 linux-kernel@vger.kernel.org, yi.zhang@huawei.com,
	yangerkun@huawei.com,  johnny.chenyi@huawei.com
Subject: Re: [PATCH v2] brd: fix sleeping function called from invalid context in brd_insert_page()
Date: Tue, 01 Jul 2025 08:14:16 -0600	[thread overview]
Message-ID: <175137925672.318770.9783780559206172712.b4-ty@kernel.dk> (raw)
In-Reply-To: <20250630112828.421219-1-yukuai1@huaweicloud.com>


On Mon, 30 Jun 2025 19:28:28 +0800, Yu Kuai wrote:
> __xa_cmpxchg() is called with rcu_read_lock(), and it will allocate
> memory if necessary.
> 
> Fix the problem by moving rcu_read_lock() after __xa_cmpxchg(), meanwhile,
> it still should be held before xa_unlock(), prevent returned page to be
> freed by concurrent discard.
> 
> [...]

Applied, thanks!

[1/1] brd: fix sleeping function called from invalid context in brd_insert_page()
      commit: 0d519bb0de3bf0ac9e6f401d4910fc119062d7be

Best regards,
-- 
Jens Axboe




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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-30 11:28 [PATCH v2] brd: fix sleeping function called from invalid context in brd_insert_page() Yu Kuai
2025-06-30 15:24 ` Jens Axboe
2025-06-30 15:28   ` Jens Axboe
2025-07-01  1:28     ` Yu Kuai
2025-07-01  3:00       ` Jens Axboe
2025-07-01  7:38         ` Yu Kuai
2025-07-01 14:01           ` Jens Axboe
2025-07-01 14:14 ` Jens Axboe [this message]

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=175137925672.318770.9783780559206172712.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=johnny.chenyi@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.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