Skip to contentSkip to conversation

crypto/ablkcipher: missing return statement

PATCH Applied Dan Carpenter 3 participants 4 messages Jul 15, 2010 – Jul 16, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/ablkcipher: missing return statement

The intent was to return here. In the original an allocation failure would lead to a NULL dereference.

crypto/ablkcipher.c +1 -1
index 98a6610..a854df2 100644
@@ -165,7 +165,7 @@ static inline int ablkcipher_next_slow(struct ablkcipher_request *req,
 
 	p = kmalloc(n, GFP_ATOMIC);
 	if (!p)
-		ablkcipher_walk_done(req, walk, -ENOMEM);
+		return ablkcipher_walk_done(req, walk, -ENOMEM);
 
 	base = p + 1;
 
Applied
#2 lore raw
Quoted 9 lines · David Miller

From: Dan Carpenter <[email protected]>
Date: Thu, 15 Jul 2010 09:57:36 +0200

Quoted 4 lines

The intent was to return here. In the original an allocation failure would lead to a NULL dereference.

Thanks, applied to crypto-2.6.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#3 lore raw
Quoted 4 lines · Herbert Xu
Quoted 3 lines · David Miller

From: Dan Carpenter <[email protected]>
Date: Thu, 15 Jul 2010 09:57:36 +0200

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

The intent was to return here. In the original an allocation failure would lead to a NULL dereference.

Thanks, applied to crypto-2.6.

Oops I'd already applied the same patch but forgot to push to Linus. I've done the push now.

Sorry,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt