Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1551385
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.8 31/85] Btrfs: dont leak reloc root nodes on error |
| Date | 2017-01-04 22:20 +0100 |
| Message-ID | <sW18u-1M9-59@gated-at.bofh.it> (permalink) |
| References | <sW0P7-1np-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josef Bacik <jbacik@fb.com>
commit 6bdf131fac2336adb1a628f992ba32384f653a55 upstream.
We don't track the reloc roots in any sort of normal way, so the only way the
root/commit_root nodes get free'd is if the relocation finishes successfully and
the reloc root is deleted. Fix this by free'ing them in free_reloc_roots.
Thanks,
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/btrfs/relocation.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2366,6 +2366,10 @@ void free_reloc_roots(struct list_head *
while (!list_empty(list)) {
reloc_root = list_entry(list->next, struct btrfs_root,
root_list);
+ free_extent_buffer(reloc_root->node);
+ free_extent_buffer(reloc_root->commit_root);
+ reloc_root->node = NULL;
+ reloc_root->commit_root = NULL;
__del_reloc_root(reloc_root);
}
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.8 00/85] 4.8.16-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:10 +0100 [PATCH 4.8 13/85] USB: cdc-acm: add device id for GW Instek AFG-125 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 27/85] clk: ti: omap36xx: Work around sprz319 advisory 2.1 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 24/85] ALSA: hda - fix headset-mic problem on a Dell laptop Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 21/85] ALSA: hiface: Fix M2Tech hiFace driver sampling rate change Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 02/85] btrfs: limit async_work allocation and worker func duration Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 33/85] Btrfs: fix memory leak in do_walk_down Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 29/85] Btrfs: bail out if block group has different mixed flag Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 28/85] Btrfs: fix memory leak in reading btree blocks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 01/85] aoe: fix crash in page count manipulation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 15/85] usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 26/85] ALSA: hda: when comparing pin configurations, ignore assoc in addition to seq Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 34/85] btrfs: fix a possible umount deadlock Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 31/85] Btrfs: dont leak reloc root nodes on error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 32/85] btrfs: clean the old superblocks before freeing the device Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 18/85] USB: UHCI: report non-PME wakeup signalling for Intel hardware Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 [PATCH 4.8 11/85] USB: serial: option: add dlink dwm-158 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-04 22:20 +0100 Re: [PATCH 4.8 00/85] 4.8.16-stable review Shuah Khan <shuah.kh@samsung.com> - 2017-01-05 01:50 +0100 Re: [PATCH 4.8 00/85] 4.8.16-stable review Guenter Roeck <linux@roeck-us.net> - 2017-01-05 05:50 +0100
csiph-web