From: Greg Kroah-Hartman Date: Fri, 13 Sep 2024 12:53:29 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v6.1.111~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b13a1f3200cea985b45f8a4363558daa71002a39;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: fs-ntfs3-use-kvfree-to-free-memory-allocated-by-kvmalloc.patch --- diff --git a/queue-5.15/fs-ntfs3-use-kvfree-to-free-memory-allocated-by-kvmalloc.patch b/queue-5.15/fs-ntfs3-use-kvfree-to-free-memory-allocated-by-kvmalloc.patch new file mode 100644 index 00000000000..ad7c9c99801 --- /dev/null +++ b/queue-5.15/fs-ntfs3-use-kvfree-to-free-memory-allocated-by-kvmalloc.patch @@ -0,0 +1,89 @@ +From ddb17dc880eeaac37b5a6e984de07b882de7d78d Mon Sep 17 00:00:00 2001 +From: Konstantin Komarov +Date: Tue, 16 Jan 2024 10:32:20 +0300 +Subject: fs/ntfs3: Use kvfree to free memory allocated by kvmalloc + +From: Konstantin Komarov + +commit ddb17dc880eeaac37b5a6e984de07b882de7d78d upstream. + +Signed-off-by: Konstantin Komarov +Signed-off-by: Greg Kroah-Hartman +--- + fs/ntfs3/attrlist.c | 4 ++-- + fs/ntfs3/bitmap.c | 4 ++-- + fs/ntfs3/frecord.c | 4 ++-- + fs/ntfs3/super.c | 2 +- + 4 files changed, 7 insertions(+), 7 deletions(-) + +--- a/fs/ntfs3/attrlist.c ++++ b/fs/ntfs3/attrlist.c +@@ -29,7 +29,7 @@ static inline bool al_is_valid_le(const + void al_destroy(struct ntfs_inode *ni) + { + run_close(&ni->attr_list.run); +- kfree(ni->attr_list.le); ++ kvfree(ni->attr_list.le); + ni->attr_list.le = NULL; + ni->attr_list.size = 0; + ni->attr_list.dirty = false; +@@ -318,7 +318,7 @@ int al_add_le(struct ntfs_inode *ni, enu + memcpy(ptr, al->le, off); + memcpy(Add2Ptr(ptr, off + sz), le, old_size - off); + le = Add2Ptr(ptr, off); +- kfree(al->le); ++ kvfree(al->le); + al->le = ptr; + } else { + memmove(Add2Ptr(le, sz), le, old_size - off); +--- a/fs/ntfs3/bitmap.c ++++ b/fs/ntfs3/bitmap.c +@@ -129,7 +129,7 @@ void wnd_close(struct wnd_bitmap *wnd) + { + struct rb_node *node, *next; + +- kfree(wnd->free_bits); ++ kvfree(wnd->free_bits); + run_close(&wnd->run); + + node = rb_first(&wnd->start_tree); +@@ -1340,7 +1340,7 @@ int wnd_extend(struct wnd_bitmap *wnd, s + wnd->nwnd * sizeof(short)); + memset(new_free + wnd->nwnd, 0, + (new_wnd - wnd->nwnd) * sizeof(short)); +- kfree(wnd->free_bits); ++ kvfree(wnd->free_bits); + wnd->free_bits = new_free; + } + +--- a/fs/ntfs3/frecord.c ++++ b/fs/ntfs3/frecord.c +@@ -750,7 +750,7 @@ static int ni_try_remove_attr_list(struc + run_deallocate(sbi, &ni->attr_list.run, true); + run_close(&ni->attr_list.run); + ni->attr_list.size = 0; +- kfree(ni->attr_list.le); ++ kvfree(ni->attr_list.le); + ni->attr_list.le = NULL; + ni->attr_list.dirty = false; + +@@ -899,7 +899,7 @@ int ni_create_attr_list(struct ntfs_inod + goto out; + + out1: +- kfree(ni->attr_list.le); ++ kvfree(ni->attr_list.le); + ni->attr_list.le = NULL; + ni->attr_list.size = 0; + return err; +--- a/fs/ntfs3/super.c ++++ b/fs/ntfs3/super.c +@@ -441,7 +441,7 @@ static noinline void put_ntfs(struct ntf + { + kfree(sbi->new_rec); + kvfree(ntfs_put_shared(sbi->upcase)); +- kfree(sbi->def_table); ++ kvfree(sbi->def_table); + + wnd_close(&sbi->mft.bitmap); + wnd_close(&sbi->used.bitmap); diff --git a/queue-5.15/series b/queue-5.15/series index 16d678ddc11..89978441fb3 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -19,3 +19,4 @@ arm64-dts-rockchip-override-bios_disable-signal-via-gpio-hog-on-rk3399-puma.patc minmax-reduce-min-max-macro-expansion-in-atomisp-driver.patch net-tighten-bad-gso-csum-offset-check-in-virtio_net_hdr.patch mm-avoid-leaving-partial-pfn-mappings-around-in-error-case.patch +fs-ntfs3-use-kvfree-to-free-memory-allocated-by-kvmalloc.patch