WSL2-Linux-Kernel/include
Mikulas Patocka a666e5c05e dm: fix deadlock when swapping to encrypted device
The system would deadlock when swapping to a dm-crypt device. The reason
is that for each incoming write bio, dm-crypt allocates memory that holds
encrypted data. These excessive allocations exhaust all the memory and the
result is either deadlock or OOM trigger.

This patch limits the number of in-flight swap bios, so that the memory
consumed by dm-crypt is limited. The limit is enforced if the target set
the "limit_swap_bios" variable and if the bio has REQ_SWAP set.

Non-swap bios are not affected becuase taking the semaphore would cause
performance degradation.

This is similar to request-based drivers - they will also block when the
number of requests is over the limit.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2021-02-11 09:45:28 -05:00
..
acpi More power management updates for 5.11-rc1 2020-12-22 14:12:10 -08:00
asm-generic arm64: make atomic helpers __always_inline 2021-01-13 15:09:06 +00:00
clocksource
crypto crypto: lib/blake2s - Move selftest prototype into header file 2020-12-04 18:13:14 +11:00
drm drm-misc-next for 5.11: 2020-12-15 10:21:48 +01:00
dt-bindings The core framework got some nice improvements this time around. We gained the 2020-12-21 10:39:37 -08:00
keys
kunit
kvm KVM: arm64: Replace KVM_ARM_PMU with HW_PERF_EVENTS 2021-01-04 16:50:16 +00:00
linux dm: fix deadlock when swapping to encrypted device 2021-02-11 09:45:28 -05:00
math-emu
media media: rc: add keymap for pine64 remote 2020-12-07 13:51:59 +01:00
memory
misc ocxl: Update the Process Element Entry 2020-12-04 01:01:30 +11:00
net tcp: fix TCP socket rehash stats mis-accounting 2021-01-19 19:47:20 -08:00
pcmcia
ras
rdma RDMA 5.11 pull request 2020-12-16 13:42:26 -08:00
scsi SCSI misc on 20201216 2020-12-16 13:34:31 -08:00
soc include/soc: remove headers for EZChip NPS 2021-01-05 12:59:41 -08:00
sound ASoC: Updates for v5.11 2020-12-14 15:57:14 +01:00
target
trace for-linus-2021-01-24 2021-01-24 09:35:28 -08:00
uapi dm: add support for passing through inline crypto support 2021-02-11 09:45:25 -05:00
vdso
video
xen xen: Fix event channel callback via INTX/GSI 2021-01-13 16:12:00 +01:00