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-next>] [day] [month] [year] [list]
Message-ID: <1312619188.5589.27.camel@localhost.localdomain>
Date:	Sat, 06 Aug 2011 10:26:25 +0200
From:	Thomas Meyer <thomas@...3r.de>
To:	davem@...emloft.net, linux-crypto@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] n2_crypto: Fix a get/put_cpu() imbalance

From: Thomas Meyer <thomas@...3r.de>

Fix a get/put_cpu() imbalance in the error case when qp == NULL

Signed-off-by: Thomas Meyer <thomas@...3r.de>
---

diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index d0183ddb..6683b58 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -1006,9 +1006,8 @@ static int n2_do_ecb(struct ablkcipher_request *req, bool encrypt)
 
        spin_unlock_irqrestore(&qp->lock, flags);
 
-       put_cpu();
-
 out:
+       put_cpu();
        n2_chunk_complete(req, NULL);
        return err;
 }
@@ -1096,9 +1095,8 @@ static int n2_do_chaining(struct ablkcipher_request *req, bool encrypt)
 
        spin_unlock_irqrestore(&qp->lock, flags);
 
-       put_cpu();
-
 out:
+       put_cpu();
        n2_chunk_complete(req, err ? NULL : final_iv_addr);
        return err;
 }







--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ