[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <24a7fc31-c54f-4ef3-a76f-7d844a398720@I-love.SAKURA.ne.jp>
Date: Sat, 28 Jun 2025 18:39:03 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: Jens Axboe <axboe@...nel.dk>, Yu Kuai <yukuai3@...wei.com>,
Christoph Hellwig <hch@....de>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] brd: fix sleeping memory allocation in brd_insert_page()
On 2025/06/28 17:36, Tetsuo Handa wrote:
> syzbot is reporting that brd_insert_page() is calling
> __xa_cmpxchg(__GFP_DIRECT_RECLAIM) with spinlock and RCU lock held.
Hmm. Holding spinlock itself is OK because xa_lock() is a requirement.
> Change __xa_cmpxchg() to use GFP_NOWAIT | __GFP_NOWARN, for it is likely
> that __xa_cmpxchg() succeeds because of preceding alloc_page().
Since this gfp flag is for allocating index array, it should use
__GFP_DIRECT_RECLAIM if possible. Then, deferring RCU lock if possible
makes sense. Then, I wonder what this RCU lock is protecting...
Powered by blists - more mailing lists