]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 May 2023 04:10:10 +0000 (06:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 May 2023 04:10:10 +0000 (06:10 +0200)
from 4.19 and 5.4

queue-4.19/crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch [deleted file]
queue-4.19/series
queue-5.4/crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch [deleted file]
queue-5.4/series

diff --git a/queue-4.19/crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch b/queue-4.19/crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch
deleted file mode 100644 (file)
index 7f82a79..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-From a543ada7db729514ddd3ba4efa45f4c7b802ad85 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
-Date: Mon, 13 Mar 2023 10:17:24 +0100
-Subject: crypto: api - Demote BUG_ON() in crypto_unregister_alg() to a WARN_ON()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Toke Høiland-Jørgensen <toke@redhat.com>
-
-commit a543ada7db729514ddd3ba4efa45f4c7b802ad85 upstream.
-
-The crypto_unregister_alg() function expects callers to ensure that any
-algorithm that is unregistered has a refcnt of exactly 1, and issues a
-BUG_ON() if this is not the case. However, there are in fact drivers that
-will call crypto_unregister_alg() without ensuring that the refcnt has been
-lowered first, most notably on system shutdown. This causes the BUG_ON() to
-trigger, which prevents a clean shutdown and hangs the system.
-
-To avoid such hangs on shutdown, demote the BUG_ON() in
-crypto_unregister_alg() to a WARN_ON() with early return. Cc stable because
-this problem was observed on a 6.2 kernel, cf the link below.
-
-Link: https://lore.kernel.org/r/87r0tyq8ph.fsf@toke.dk
-Cc: stable@vger.kernel.org
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- crypto/algapi.c |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
---- a/crypto/algapi.c
-+++ b/crypto/algapi.c
-@@ -419,7 +419,9 @@ int crypto_unregister_alg(struct crypto_
-       if (ret)
-               return ret;
--      BUG_ON(refcount_read(&alg->cra_refcnt) != 1);
-+      if (WARN_ON(refcount_read(&alg->cra_refcnt) != 1))
-+              return;
-+
-       if (alg->cra_destroy)
-               alg->cra_destroy(alg);
index 6d093b623b1528c368c64de8dd5261226c7892b1..4ddf72ed9691098317cae582b445ec53680223a0 100644 (file)
@@ -13,7 +13,6 @@ xhci-fix-debugfs-register-accesses-while-suspended.patch
 mips-fw-allow-firmware-to-pass-a-empty-env.patch
 pwm-meson-fix-axg-ao-mux-parents.patch
 ring-buffer-sync-irq-works-before-buffer-destruction.patch
-crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch
 reiserfs-add-security-prefix-to-xattr-name-in-reiserfs_security_write.patch
 kvm-nvmx-emulate-nops-in-l2-and-pause-if-it-s-not-intercepted.patch
 i2c-omap-fix-standard-mode-false-ack-readings.patch
diff --git a/queue-5.4/crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch b/queue-5.4/crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch
deleted file mode 100644 (file)
index 3d6f35c..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-From a543ada7db729514ddd3ba4efa45f4c7b802ad85 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
-Date: Mon, 13 Mar 2023 10:17:24 +0100
-Subject: crypto: api - Demote BUG_ON() in crypto_unregister_alg() to a WARN_ON()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Toke Høiland-Jørgensen <toke@redhat.com>
-
-commit a543ada7db729514ddd3ba4efa45f4c7b802ad85 upstream.
-
-The crypto_unregister_alg() function expects callers to ensure that any
-algorithm that is unregistered has a refcnt of exactly 1, and issues a
-BUG_ON() if this is not the case. However, there are in fact drivers that
-will call crypto_unregister_alg() without ensuring that the refcnt has been
-lowered first, most notably on system shutdown. This causes the BUG_ON() to
-trigger, which prevents a clean shutdown and hangs the system.
-
-To avoid such hangs on shutdown, demote the BUG_ON() in
-crypto_unregister_alg() to a WARN_ON() with early return. Cc stable because
-this problem was observed on a 6.2 kernel, cf the link below.
-
-Link: https://lore.kernel.org/r/87r0tyq8ph.fsf@toke.dk
-Cc: stable@vger.kernel.org
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- crypto/algapi.c |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
---- a/crypto/algapi.c
-+++ b/crypto/algapi.c
-@@ -427,7 +427,9 @@ int crypto_unregister_alg(struct crypto_
-       if (ret)
-               return ret;
--      BUG_ON(refcount_read(&alg->cra_refcnt) != 1);
-+      if (WARN_ON(refcount_read(&alg->cra_refcnt) != 1))
-+              return;
-+
-       if (alg->cra_destroy)
-               alg->cra_destroy(alg);
index f987c17331ebc81b9509c8a3e070b01b28a5fed5..7204171f0d0b3672435bf8b1f97c6b6c92c44cae 100644 (file)
@@ -20,7 +20,6 @@ kheaders-use-array-declaration-instead-of-char.patch
 pwm-meson-fix-axg-ao-mux-parents.patch
 pwm-meson-fix-g12a-ao-clk81-name.patch
 ring-buffer-sync-irq-works-before-buffer-destruction.patch
-crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch
 reiserfs-add-security-prefix-to-xattr-name-in-reiserfs_security_write.patch
 kvm-nvmx-emulate-nops-in-l2-and-pause-if-it-s-not-intercepted.patch
 i2c-omap-fix-standard-mode-false-ack-readings.patch