From: Mikulas Patocka Date: Tue, 17 Apr 2018 22:32:26 +0000 (-0400) Subject: dm integrity: use kvfree for kvmalloc'd memory X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=586d02c1479f47483ca40dba463e4e5cbcd21241;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dm integrity: use kvfree for kvmalloc'd memory commit fc8cec113904a47396bf0a1afc62920d66319d36 upstream. Use kvfree instead of kfree because the array is allocated with kvmalloc. Fixes: 7eada909bfd7a ("dm: add integrity target") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 3cc2052f972c..cbc56372ff97 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -2439,7 +2439,7 @@ static void dm_integrity_free_journal_scatterlist(struct dm_integrity_c *ic, str unsigned i; for (i = 0; i < ic->journal_sections; i++) kvfree(sl[i]); - kfree(sl); + kvfree(sl); } static struct scatterlist **dm_integrity_alloc_journal_scatterlist(struct dm_integrity_c *ic, struct page_list *pl)