lkml.org 
[lkml]   [2011]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] n2_crypto: Fix a get/put_cpu() imbalance
From
Date
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;
}



\
 
 \ /
  Last update: 2011-08-13 10:03    [W:0.057 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site