diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2018-04-18 01:32:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-16 11:10:27 +0300 |
commit | 586d02c1479f47483ca40dba463e4e5cbcd21241 (patch) | |
tree | 073088ee66954b0d1690ea8948568ed0e3cbe245 /drivers/md/dm-integrity.c | |
parent | 3b93fff8f4527d7ccfed3c73b7a590aea3d4e8aa (diff) | |
download | linux-586d02c1479f47483ca40dba463e4e5cbcd21241.tar.xz |
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 <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md/dm-integrity.c')
-rw-r--r-- | drivers/md/dm-integrity.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |