mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:30:58 +07:00
fscrypt: remove WARN_ON_ONCE() when decryption fails
If decrypting a block fails, fscrypt did a WARN_ON_ONCE(). But WARN is meant for kernel bugs, which this isn't; this could be hit by fuzzers using fault injection, for example. Also, there is already a proper warning message logged in fscrypt_do_page_crypto(), so the WARN doesn't add much. Just remove the unnessary WARN. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
cd0265fcd2
commit
ff5d3a9707
@ -37,12 +37,10 @@ static void __fscrypt_decrypt_bio(struct bio *bio, bool done)
|
||||
int ret = fscrypt_decrypt_page(page->mapping->host, page,
|
||||
PAGE_SIZE, 0, page->index);
|
||||
|
||||
if (ret) {
|
||||
WARN_ON_ONCE(1);
|
||||
if (ret)
|
||||
SetPageError(page);
|
||||
} else if (done) {
|
||||
else if (done)
|
||||
SetPageUptodate(page);
|
||||
}
|
||||
if (done)
|
||||
unlock_page(page);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user