[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z5m-FuU7wJsUoSST@infradead.org>
Date: Tue, 28 Jan 2025 21:35:18 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Rik van Riel <riel@...riel.com>
Cc: "Martin K. Petersen" <martin.petersen@...cle.com>,
Marc Aurèle La France <tsi@...oix.net>,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...a.com
Subject: Re: [PATCH] scsi: use GFP_NOFS to avoid circular locking dependency
GFP_NOFS is never the right thing for block layer allocations.
The right thing here is GFP_NOIO which is a superset of GFP_NOFS.
Otherwise you could reproduce the same deadlock when using swap
instead of a file system to reproduce basically the same deadlock.
Note that this:
https://lore.kernel.org/linux-block/20250117074442.256705-3-hch@lst.de/T/#u
should probably fix the actual deadlock, but it might still need
annotations for lockdep to deal with the initial probing where
the queue is not frozen. Compared to hacky annotations just using
GFP_NOIO feels simpler and more obvious.
Powered by blists - more mailing lists