Re: Hard system lock-ups when using encrypted swap and RAM is exhausted
Mikulas Patocka <[email protected]> Fri, 2 Jan 2026 14:46:44 +0100 (CET)
| Newsgroups | dev.linux.lists.cryptsetup,dev.linux.lists.dm-devel,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 11 Dec 2025, Askar Safin wrote: > Mikulas Patocka <[email protected]>: > > So, this is what happened to you - the machine runs out of memory, it > > needs to swap out some pages, dm-crypt encrypts the pages and generates > > write bios, the write bios are directed to the loop device, the loop > > device directs them to the filesystem, the filesystem attempts to allocate > > more memory => deadlock. > > Does similar thing happen in my case? I. e. swap on top of dm-integrity on > top of partition? Is my use case supported? (I'm not talking about > hibernation now, just about swap.) > > -- > Askar Safin Hi Dm integrity doesn't need to allocate memory when processing I/O requests (it reserves some memory using mempools). So, dm-integrity on the top of a partition should be safe. Mikulas