From: Eric Biggers <ebiggers@kernel.org>
To: linux-fscrypt@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 4/5] fs/super.c: stop calling fscrypt_destroy_keyring() from __put_super()
Date: Tue, 7 Feb 2023 22:21:06 -0800 [thread overview]
Message-ID: <20230208062107.199831-5-ebiggers@kernel.org> (raw)
In-Reply-To: <20230208062107.199831-1-ebiggers@kernel.org>
From: Eric Biggers <ebiggers@google.com>
Now that the key associated with the "test_dummy_operation" mount option
is added on-demand when it's needed, rather than immediately when the
filesystem is mounted, fscrypt_destroy_keyring() no longer needs to be
called from __put_super() to avoid a memory leak on mount failure.
Remove this call, which was causing confusion because it appeared to be
a sleep-in-atomic bug (though it wasn't, for a somewhat-subtle reason).
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
fs/super.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/super.c b/fs/super.c
index 12c08cb20405d..ce45b7fd27f90 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -291,7 +291,6 @@ static void __put_super(struct super_block *s)
WARN_ON(s->s_inode_lru.node);
WARN_ON(!list_empty(&s->s_mounts));
security_sb_free(s);
- fscrypt_destroy_keyring(s);
put_user_ns(s->s_user_ns);
kfree(s->s_subtype);
call_rcu(&s->rcu, destroy_super_rcu);
--
2.39.1
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: linux-fscrypt@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH 4/5] fs/super.c: stop calling fscrypt_destroy_keyring() from __put_super()
Date: Tue, 7 Feb 2023 22:21:06 -0800 [thread overview]
Message-ID: <20230208062107.199831-5-ebiggers@kernel.org> (raw)
In-Reply-To: <20230208062107.199831-1-ebiggers@kernel.org>
From: Eric Biggers <ebiggers@google.com>
Now that the key associated with the "test_dummy_operation" mount option
is added on-demand when it's needed, rather than immediately when the
filesystem is mounted, fscrypt_destroy_keyring() no longer needs to be
called from __put_super() to avoid a memory leak on mount failure.
Remove this call, which was causing confusion because it appeared to be
a sleep-in-atomic bug (though it wasn't, for a somewhat-subtle reason).
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
fs/super.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/super.c b/fs/super.c
index 12c08cb20405d..ce45b7fd27f90 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -291,7 +291,6 @@ static void __put_super(struct super_block *s)
WARN_ON(s->s_inode_lru.node);
WARN_ON(!list_empty(&s->s_mounts));
security_sb_free(s);
- fscrypt_destroy_keyring(s);
put_user_ns(s->s_user_ns);
kfree(s->s_subtype);
call_rcu(&s->rcu, destroy_super_rcu);
--
2.39.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2023-02-08 6:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 6:21 [PATCH 0/5] Add the test_dummy_encryption key on-demand Eric Biggers
2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers
2023-02-08 6:21 ` [PATCH 1/5] fscrypt: add the test dummy encryption " Eric Biggers
2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers
2023-02-08 6:21 ` [PATCH 2/5] ext4: stop calling fscrypt_add_test_dummy_key() Eric Biggers
2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers
2023-02-08 6:21 ` [PATCH 3/5] f2fs: " Eric Biggers
2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers
2023-02-08 6:21 ` Eric Biggers [this message]
2023-02-08 6:21 ` [f2fs-dev] [PATCH 4/5] fs/super.c: stop calling fscrypt_destroy_keyring() from __put_super() Eric Biggers
2023-02-08 6:21 ` [PATCH 5/5] fscrypt: clean up fscrypt_add_test_dummy_key() Eric Biggers
2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers
2023-02-08 15:38 ` [PATCH 0/5] Add the test_dummy_encryption key on-demand Linus Torvalds
2023-02-08 15:38 ` [f2fs-dev] " Linus Torvalds
2023-02-28 1:01 ` patchwork-bot+f2fs
2023-02-28 1:01 ` patchwork-bot+f2fs
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=20230208062107.199831-5-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.