* re: crypto: echainiv - Add encrypted chain IV generator
@ 2015-05-26 9:36 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-05-26 9:36 UTC (permalink / raw)
To: herbert; +Cc: linux-crypto
Hello Herbert Xu,
The patch a10f554fa7e0: "crypto: echainiv - Add encrypted chain IV
generator" from May 21, 2015, leads to the following static checker
warning:
crypto/echainiv.c:492 echainiv_alloc()
warn: 'inst' isn't an ERR_PTR
crypto/echainiv.c
435 static struct crypto_instance *echainiv_aead_alloc(struct rtattr **tb)
436 {
437 struct aead_instance *inst;
438 struct crypto_aead_spawn *spawn;
439 struct aead_alg *alg;
440
441 inst = aead_geniv_alloc(&echainiv_tmpl, tb, 0, 0);
442
443 if (IS_ERR(inst))
444 goto out;
445
446 if (inst->alg.ivsize < sizeof(u64) ||
447 inst->alg.ivsize & (sizeof(u32) - 1) ||
448 inst->alg.ivsize > MAX_IV_SIZE) {
449 aead_geniv_free(inst);
450 inst = ERR_PTR(-EINVAL);
451 goto out;
^^^^^^^^
Goto out here means return the container_of() an error pointer. This
is a class of bugs called a "one err bug" because all the error paths
go to the same error label.
452 }
453
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-26 14:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-26 9:36 crypto: echainiv - Add encrypted chain IV generator Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.