Thread (12 messages) 12 messages, 5 authors, 2023-02-08

Re: block: sleeping in atomic warnings

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2023-02-07 18:57:32
Also in: linux-fsdevel, lkml

On Tue, Feb 7, 2023 at 10:36 AM Eric Biggers [off-list ref] wrote:
Also note that keys are normally added using an ioctl, which can only be
executed after the filesystem was mounted.  The only exception is the key
associated with the "test_dummy_encryption" mount option.
Could we perhaps then replace the

                fscrypt_destroy_keyring(s);

with a more specific

                fscrypt_destroy_dummy_keyring(s);

thing, that would only handle the dummy encryption case?

Ot could we just *fix* the dummy encryption test to actually work like
real encryption cases, so that it doesn't have this bogus case?

By the way, the following code is in generic_shutdown_super(), and not in
__put_super(), for a very similar reason:
Well, but that isn't a problem, exactly because that code isn't in
__put_super().

Put another way: the problem with the dummy encryption appears to be
exactly that it doesn't actually act like any real encryption would,
and then triggers that "this whole sequence gets called even under the
spinlock, even though it's documented to not be valid for that case,
because we added a bogus test-case that doesn't actually match
reality".

Looking at Jens' reply to the other cases, Dan's tool seems to be on
the money here except for this self-inflicted bogus crypto key thing.

                     Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help