diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2024-01-09 15:57:56 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2024-01-30 14:05:02 -0500 |
commit | bd504bcfec41a503b32054da5472904b404341a4 (patch) | |
tree | cb99fb5518b4b0a663750dd6559073299a2c8070 /drivers/md/dm-core.h | |
parent | 41bccc98fb7931d63d03f326a746ac4d429c1dd3 (diff) | |
download | linux-stable-bd504bcfec41a503b32054da5472904b404341a4.tar.gz linux-stable-bd504bcfec41a503b32054da5472904b404341a4.tar.bz2 linux-stable-bd504bcfec41a503b32054da5472904b404341a4.zip |
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.h | 2 |
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; |