linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Andreas Gruenbacher <agruenba@redhat.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.4 56/70] gfs2: Put bitmap buffers in put_super
Date: Mon, 26 Nov 2018 11:51:11 +0100	[thread overview]
Message-ID: <20181126105052.184442981@linuxfoundation.org> (raw)
In-Reply-To: <20181126105046.722096341@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

commit 10283ea525d30f2e99828978fd04d8427876a7ad upstream.

gfs2_put_super calls gfs2_clear_rgrpd to destroy the gfs2_rgrpd objects
attached to the resource group glocks.  That function should release the
buffers attached to the gfs2_bitmap objects (bi_bh), but the call to
gfs2_rgrp_brelse for doing that is missing.

When gfs2_releasepage later runs across these buffers which are still
referenced, it refuses to free them.  This causes the pages the buffers
are attached to to remain referenced as well.  With enough mount/unmount
cycles, the system will eventually run out of memory.

Fix this by adding the missing call to gfs2_rgrp_brelse in
gfs2_clear_rgrpd.

(Also fix a gfs2_rgrp_relse -> gfs2_rgrp_brelse typo in a comment.)

Fixes: 39b0f1e92908 ("GFS2: Don't brelse rgrp buffer_heads every allocation")
Cc: stable@vger.kernel.org # v4.4
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/gfs2/rgrp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index c134c0462cee..ef24894edecc 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -732,6 +732,7 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp)
 			spin_lock(&gl->gl_lockref.lock);
 			gl->gl_object = NULL;
 			spin_unlock(&gl->gl_lockref.lock);
+			gfs2_rgrp_brelse(rgd);
 			gfs2_glock_add_to_lru(gl);
 			gfs2_glock_put(gl);
 		}
@@ -1139,7 +1140,7 @@ static u32 count_unlinked(struct gfs2_rgrpd *rgd)
  * @rgd: the struct gfs2_rgrpd describing the RG to read in
  *
  * Read in all of a Resource Group's header and bitmap blocks.
- * Caller must eventually call gfs2_rgrp_relse() to free the bitmaps.
+ * Caller must eventually call gfs2_rgrp_brelse() to free the bitmaps.
  *
  * Returns: errno
  */
-- 
2.17.1




  parent reply	other threads:[~2018-11-26 10:55 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26 10:50 [PATCH 4.4 00/70] 4.4.165-stable review Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 01/70] flow_dissector: do not dissect l4 ports for fragments Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 02/70] ip_tunnel: dont force DF when MTU is locked Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 03/70] net-gro: reset skb->pkt_type in napi_reuse_skb() Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 04/70] tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 05/70] ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 06/70] kbuild: Add better clang cross build support Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 07/70] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 08/70] kbuild: Consolidate header generation from ASM offset information Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 09/70] kbuild: consolidate redundant sed script ASM offset generation Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 10/70] kbuild: fix asm-offset generation to work with clang Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 11/70] kbuild: drop -Wno-unknown-warning-option from clang options Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 12/70] kbuild, LLVMLinux: Add -Werror to cc-option to support clang Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 13/70] kbuild: use -Oz instead of -Os when using clang Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 14/70] kbuild: Add support to generate LLVM assembly files Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 15/70] modules: mark __inittest/__exittest as __maybe_unused Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 16/70] kbuild: clang: Disable address-of-packed-member warning Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 17/70] crypto: arm64/sha - avoid non-standard inline asm tricks Greg Kroah-Hartman
2020-11-23 20:49   ` dann frazier
2020-12-05 20:39     ` dann frazier
2020-12-06  9:46       ` Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 18/70] efi/libstub/arm64: Force hidden visibility for section markers Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 19/70] efi/libstub/arm64: Set -fpie when building the EFI stub Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 20/70] kbuild: fix linker feature test macros when cross compiling with Clang Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 21/70] kbuild: Set KBUILD_CFLAGS before incl. arch Makefile Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 22/70] kbuild: move cc-option and cc-disable-warning after " Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 23/70] kbuild: clang: fix build failures with sparse check Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 24/70] kbuild: clang: remove crufty HOSTCFLAGS Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 25/70] kbuild: clang: disable unused variable warnings only when constant Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 26/70] kbuild: set no-integrated-as before incl. arch Makefile Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 27/70] kbuild: allow to use GCC toolchain not in Clang search path Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 28/70] arm64: Disable asm-operand-width warning for clang Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 29/70] x86/kbuild: Use cc-option to enable -falign-{jumps/loops} Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 30/70] crypto, x86: aesni - fix token pasting for clang Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 31/70] x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 32/70] kbuild: Add __cc-option macro Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 33/70] x86/build: Use __cc-option for boot code compiler options Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 34/70] x86/build: Specify stack alignment for clang Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 35/70] x86/boot: #undef memcpy() et al in string.c Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 36/70] x86/build: Fix stack alignment for CLang Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 37/70] x86/build: Use cc-option to validate stack alignment parameter Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 38/70] reiserfs: propagate errors from fill_with_dentries() properly Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 39/70] hfs: prevent btree data loss on root split Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 40/70] hfsplus: " Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 41/70] um: Give start_idle_thread() a return code Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 42/70] fs/exofs: fix potential memory leak in mount option parsing Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 43/70] clk: samsung: exynos5420: Enable PERIS clocks for suspend Greg Kroah-Hartman
2018-11-26 10:50 ` [PATCH 4.4 44/70] platform/x86: acerhdf: Add BIOS entry for Gateway LT31 v1.3307 Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 45/70] arm64: percpu: Initialize ret in the default case Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 46/70] s390/vdso: add missing FORCE to build targets Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 47/70] netfilter: ipset: actually allow allowable CIDR 0 in hash:net,port,net Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 48/70] s390/mm: Fix ERROR: "__node_distance" undefined! Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 49/70] netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment() Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 50/70] netfilter: xt_IDLETIMER: add sysfs filename checking routine Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 51/70] hwmon: (ibmpowernv) Remove bogus __init annotations Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 52/70] lib/raid6: Fix arm64 test build Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 53/70] i2c: omap: Enable for ARCH_K3 Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 54/70] zram: close udev startup race condition as default groups Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 55/70] SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer() Greg Kroah-Hartman
2018-11-26 10:51 ` Greg Kroah-Hartman [this message]
2018-11-26 10:51 ` [PATCH 4.4 57/70] btrfs: fix pinned underflow after transaction aborted Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 58/70] Revert "media: videobuf2-core: dont call memop finish when queueing" Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 59/70] Revert "Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV" Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 60/70] media: v4l: event: Add subscription to list before calling "add" operation Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 61/70] uio: Fix an Oops on load Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 62/70] usb: cdc-acm: add entry for Hiro (Conexant) modem Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 63/70] USB: quirks: Add no-lpm quirk for Raydium touchscreens Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 64/70] usb: quirks: Add delay-init quirk for Corsair K70 LUX RGB Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 65/70] misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 66/70] USB: misc: appledisplay: add 20" Apple Cinema Display Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 67/70] drivers/misc/sgi-gru: fix Spectre v1 vulnerability Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 68/70] ACPI / platform: Add SMB0001 HID to forbidden_id_list Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 69/70] new helper: uaccess_kernel() Greg Kroah-Hartman
2018-11-26 10:51 ` [PATCH 4.4 70/70] HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges Greg Kroah-Hartman
2018-11-26 16:29 ` [PATCH 4.4 00/70] 4.4.165-stable review kernelci.org bot
2018-11-26 23:49 ` Guenter Roeck
2018-11-26 23:54 ` shuah
2018-11-27  9:56 ` Harsh Shandilya
2018-11-27 14:39   ` Greg Kroah-Hartman
2018-11-27 13:09 ` Naresh Kamboju
2018-11-27 13:29 ` Jon Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181126105052.184442981@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=agruenba@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).