summaryrefslogtreecommitdiff
path: root/drivers/md/dm-core.h
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2024-01-09 17:57:56 +0300
committerMike Snitzer <snitzer@kernel.org>2024-01-30 22:05:02 +0300
commitbd504bcfec41a503b32054da5472904b404341a4 (patch)
treecb99fb5518b4b0a663750dd6559073299a2c8070 /drivers/md/dm-core.h
parent41bccc98fb7931d63d03f326a746ac4d429c1dd3 (diff)
downloadlinux-bd504bcfec41a503b32054da5472904b404341a4.tar.xz
dm: limit the number of targets and parameter size area
The kvmalloc function fails with a warning if the size is larger than INT_MAX. The warning was triggered by a syscall testing robot. In order to avoid the warning, this commit limits the number of targets to 1048576 and the size of the parameter area to 1073741824. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-core.h')
-rw-r--r--drivers/md/dm-core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-core.h b/drivers/md/dm-core.h
index 095b9b49aa82..e6757a30dcca 100644
--- a/drivers/md/dm-core.h
+++ b/drivers/md/dm-core.h
@@ -22,6 +22,8 @@
#include "dm-ima.h"
#define DM_RESERVED_MAX_IOS 1024
+#define DM_MAX_TARGETS 1048576
+#define DM_MAX_TARGET_PARAMS 1024
struct dm_io;