linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] n2_crypto: Fix a get/put_cpu() imbalance
@ 2011-08-06  8:26 Thomas Meyer
  2011-08-08  5:55 ` David Miller
  2011-08-10 10:59 ` Herbert Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Meyer @ 2011-08-06  8:26 UTC (permalink / raw)
  To: davem, linux-crypto, linux-kernel

From: Thomas Meyer <thomas@m3y3r.de>

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

Signed-off-by: Thomas Meyer <thomas@m3y3r.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;
 }








^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] n2_crypto: Fix a get/put_cpu() imbalance
  2011-08-06  8:26 [PATCH] n2_crypto: Fix a get/put_cpu() imbalance Thomas Meyer
@ 2011-08-08  5:55 ` David Miller
  2011-08-10 10:59 ` Herbert Xu
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2011-08-08  5:55 UTC (permalink / raw)
  To: thomas; +Cc: linux-crypto, linux-kernel

From: Thomas Meyer <thomas@m3y3r.de>
Date: Sat, 06 Aug 2011 10:26:25 +0200

> From: Thomas Meyer <thomas@m3y3r.de>
> 
> Fix a get/put_cpu() imbalance in the error case when qp == NULL
> 
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] n2_crypto: Fix a get/put_cpu() imbalance
  2011-08-06  8:26 [PATCH] n2_crypto: Fix a get/put_cpu() imbalance Thomas Meyer
  2011-08-08  5:55 ` David Miller
@ 2011-08-10 10:59 ` Herbert Xu
  2011-08-13  7:59   ` Thomas Meyer
  1 sibling, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2011-08-10 10:59 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: davem, linux-crypto, linux-kernel

On Sat, Aug 06, 2011 at 08:26:25AM +0000, Thomas Meyer wrote:
> From: Thomas Meyer <thomas@m3y3r.de>
> 
> Fix a get/put_cpu() imbalance in the error case when qp == NULL
> 
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>

I tried to apply your patch but it doesn't work as your mailer
has turned all the tabs into spaces.  Please resend and make
sure that you can still apply the patch that the list forwards
back to you.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] n2_crypto: Fix a get/put_cpu() imbalance
  2011-08-10 10:59 ` Herbert Xu
@ 2011-08-13  7:59   ` Thomas Meyer
  2011-08-15  7:20     ` Herbert Xu
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Meyer @ 2011-08-13  7:59 UTC (permalink / raw)
  To: Herbert Xu; +Cc: davem, linux-crypto, linux-kernel

From: Thomas Meyer <thomas@m3y3r.de>

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

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

Am Mittwoch, den 10.08.2011, 18:59 +0800 schrieb Herbert Xu:
On Sat, Aug 06, 2011 at 08:26:25AM +0000, Thomas Meyer wrote:
> > From: Thomas Meyer <thomas@m3y3r.de>
> > 
> > Fix a get/put_cpu() imbalance in the error case when qp == NULL
> > 
> > Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> 
> I tried to apply your patch but it doesn't work as your mailer
> has turned all the tabs into spaces.
> 

Actually this was not my mailer's fault...

> Please resend and make
> sure that you can still apply the patch that the list forwards
> back to you.
> 
> Thanks,
> 

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] n2_crypto: Fix a get/put_cpu() imbalance
  2011-08-13  7:59   ` Thomas Meyer
@ 2011-08-15  7:20     ` Herbert Xu
  0 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2011-08-15  7:20 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: davem, linux-crypto, linux-kernel

On Sat, Aug 13, 2011 at 09:59:58AM +0200, Thomas Meyer wrote:
> From: Thomas Meyer <thomas@m3y3r.de>
> 
> Fix a get/put_cpu() imbalance in the error case when qp == NULL
> 
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>

Patch applied.  Thanks!
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-15  7:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-06  8:26 [PATCH] n2_crypto: Fix a get/put_cpu() imbalance Thomas Meyer
2011-08-08  5:55 ` David Miller
2011-08-10 10:59 ` Herbert Xu
2011-08-13  7:59   ` Thomas Meyer
2011-08-15  7:20     ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).