# Re: \[PATCH\] mm/vmscan.c: fix potential deadlock in reclaim\_pages()

- From: Andrew Morton \<akpm@linux-foundation.org\>
- Date: 2021-06-14 22:10:34 
- List: linux-mm
- Page: https://ratatoskr.run/linux-mm/2021/06/6508760
- Thread: https://ratatoskr.run/linux-mm/2021/06/6508757/t.md

```text
On Mon, 14 Jun 2021 13:47:27 -0600 Yu Zhao [ref] wrote:

> Use memalloc_noreclaim_save()/memalloc_noreclaim_restore() in
> reclaim_pages() to prevent the page reclaim from going into the block
> I/O layer recursively and deadlock.

Well.  Deadlocking the kernel is considered a bad thing ;)

From the lack of a cc:stable I'm assuming that this is a theoretical
from-code-inspection thing and that such a deadlock has not been
observed?

If not, why do we think that is the case?  What is saving us?

(In other words, more detailed changelogging, please!)

```
