dm stats: limit the number of entries
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 9 Jan 2024 14:59:15 +0000 (15:59 +0100)
committerMike Snitzer <snitzer@kernel.org>
Tue, 30 Jan 2024 19:06:44 +0000 (14:06 -0500)
commit9cf11ce06ea52911245578032761e40a6409cf35
treec0eee6f11a1148c4d7a509d88d989ecf55df0c26
parentbd504bcfec41a503b32054da5472904b404341a4
dm stats: limit the number of entries

The kvmalloc function fails with a warning if the size is larger than
INT_MAX. Linus said that there should be limits that prevent this warning
from being hit. This commit adds the limits to the dm-stats subsystem
in DM core.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-stats.c