lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1517837957-1636-1-git-send-email-wanglong19@meituan.com>
Date:   Mon,  5 Feb 2018 21:39:17 +0800
From:   Wang Long <wanglong19@...tuan.com>
To:     tytso@....edu, jack@...e.com
Cc:     linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
        wanglong19@...tuan.com
Subject: [PATCH] jbd2: set to NULL after kmem_cache_destroy

Signed-off-by: Wang Long <wanglong19@...tuan.com>
---
 fs/jbd2/journal.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 93016bb..38dc24c 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2649,11 +2649,14 @@ static int __init jbd2_journal_init_handle_cache(void)
 
 static void jbd2_journal_destroy_handle_cache(void)
 {
-	if (jbd2_handle_cache)
+	if (jbd2_handle_cache) {
 		kmem_cache_destroy(jbd2_handle_cache);
-	if (jbd2_inode_cache)
+		jbd2_handle_cache = NULL;
+	}
+	if (jbd2_inode_cache) {
 		kmem_cache_destroy(jbd2_inode_cache);
-
+		jbd2_inode_cache = NULL;
+	}
 }
 
 /*
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ