summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-io.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2023-10-31 19:12:54 +0100
committerMike Snitzer <snitzer@kernel.org>2023-10-31 19:25:06 +0100
commit9793c269da6cd339757de6ba5b2c8681b54c99af (patch)
tree6c71b9965930e7307d5431500ae3627dbaad1e3b /drivers/md/dm-io.c
parentdm integrity: use crypto_shash_digest() in sb_mac() (diff)
downloadlinux-9793c269da6cd339757de6ba5b2c8681b54c99af.tar.xz
linux-9793c269da6cd339757de6ba5b2c8681b54c99af.zip
dm crypt: account large pages in cc->n_allocated_pages
The commit 5054e778fcd9c ("dm crypt: allocate compound pages if possible") changed dm-crypt to use compound pages to improve performance. Unfortunately, there was an oversight: the allocation of compound pages was not accounted at all. Normal pages are accounted in a percpu counter cc->n_allocated_pages and dm-crypt is limited to allocate at most 2% of memory. Because compound pages were not accounted at all, dm-crypt could allocate memory over the 2% limit. Fix this by adding the accounting of compound pages, so that memory consumption of dm-crypt is properly limited. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Fixes: 5054e778fcd9c ("dm crypt: allocate compound pages if possible") Cc: stable@vger.kernel.org # v6.5+ Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-io.c')
0 files changed, 0 insertions, 0 deletions