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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  6 Nov 2019 11:14:54 +0100
From:   Lukas Czerner <lczerner@...hat.com>
To:     linux-ext4@...r.kernel.org
Cc:     Theodore Ts'o <tytso@....edu>, David Howells <dhowells@...hat.com>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: [PATCH 14/17] ext4: add ext4_fc_free for the new mount API

Signed-off-by: Lukas Czerner <lczerner@...hat.com>
---
 fs/ext4/super.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 471fe7b6ad9e..815f86f1e047 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -95,6 +95,7 @@ static void ext4_apply_options(struct fs_context *fc, struct super_block *sb);
 static int ext4_parse_param(struct fs_context *fc, struct fs_parameter *param);
 static int ext4_get_tree(struct fs_context *fc);
 static int ext4_reconfigure(struct fs_context *fc);
+static void ext4_fc_free(struct fs_context *fc);
 
 /*
  * Lock ordering
@@ -128,6 +129,7 @@ static const struct fs_context_operations ext4_context_ops = {
 	.parse_param	= ext4_parse_param,
 	.get_tree	= ext4_get_tree,
 	.reconfigure	= ext4_reconfigure,
+	.free		= ext4_fc_free,
 };
 
 #if !defined(CONFIG_EXT2_FS) && !defined(CONFIG_EXT2_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT2)
@@ -1872,6 +1874,19 @@ struct ext4_fs_context {
 	ext4_fsblk_t	s_sb_block;
 };
 
+static void ext4_fc_free(struct fs_context *fc)
+{
+	struct ext4_fs_context *ctx = fc->fs_private;
+	int i;
+
+	if (!ctx)
+		return;
+
+	for (i = 0; i < EXT4_MAXQUOTAS; i++)
+		kfree(ctx->s_qf_names[i]);
+	kfree(ctx);
+}
+
 #ifdef CONFIG_QUOTA
 /*
  * Note the name of the specified quota file.
-- 
2.21.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ