OpenCloudOS-Kernel/drivers/md/persistent-data
Mikulas Patocka a6bba25f15 dm persistent data: fix memory allocation failure
commit faada2174c08662ae98b439c69efe3e79382c538 upstream.

kmalloc is unreliable when allocating more than 8 pages of memory. It may
fail when there is plenty of free memory but the memory is fragmented.
Zdenek Kabelac observed such failure in his tests.

This commit changes kmalloc to kvmalloc - kvmalloc will fall back to
vmalloc if the large allocation fails.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:33:13 +02:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
dm-array.c dm: add missing blank line after declarations/fix those 2023-02-14 14:23:07 -05:00
dm-array.h dm: change "unsigned" to "unsigned int" 2023-02-14 14:23:06 -05:00
dm-bitset.c dm: add missing empty lines 2023-02-14 14:23:06 -05:00
dm-bitset.h dm: add missing SPDX-License-Indentifiers 2023-02-14 14:23:06 -05:00
dm-block-manager.c dm thin metadata: Fix ABBA deadlock by resetting dm_bufio_client 2023-06-16 18:24:13 -04:00
dm-block-manager.h dm thin metadata: Fix ABBA deadlock by resetting dm_bufio_client 2023-06-16 18:24:13 -04:00
dm-btree-internal.h dm: favour __packed versus "__attribute__ ((packed))" 2023-02-14 14:23:07 -05:00
dm-btree-remove.c dm: add missing empty lines 2023-02-14 14:23:06 -05:00
dm-btree-spine.c dm: prefer '"%s...", __func__' 2023-02-14 14:23:07 -05:00
dm-btree.c dm: add missing blank line after declarations/fix those 2023-02-14 14:23:07 -05:00
dm-btree.h dm: add missing blank line after declarations/fix those 2023-02-14 14:23:07 -05:00
dm-persistent-data-internal.h dm: change "unsigned" to "unsigned int" 2023-02-14 14:23:06 -05:00
dm-space-map-common.c dm: avoid useless 'else' after 'break' or return' 2023-02-14 14:23:07 -05:00
dm-space-map-common.h dm: favour __packed versus "__attribute__ ((packed))" 2023-02-14 14:23:07 -05:00
dm-space-map-disk.c dm: remove unnecessary braces from single statement blocks 2023-02-14 14:23:06 -05:00
dm-space-map-disk.h dm: add missing SPDX-License-Indentifiers 2023-02-14 14:23:06 -05:00
dm-space-map-metadata.c dm persistent data: fix memory allocation failure 2024-08-29 17:33:13 +02:00
dm-space-map-metadata.h dm: add missing SPDX-License-Indentifiers 2023-02-14 14:23:06 -05:00
dm-space-map.h dm thin metadata: Fix ABBA deadlock by resetting dm_bufio_client 2023-06-16 18:24:13 -04:00
dm-transaction-manager.c dm thin metadata: Fix ABBA deadlock by resetting dm_bufio_client 2023-06-16 18:24:13 -04:00
dm-transaction-manager.h dm: change "unsigned" to "unsigned int" 2023-02-14 14:23:06 -05:00