Hi Christian, On Thu, Feb 13, 2014 at 07:33:32AM +0000, cristian.sto...@freescale.com wrote: > Hi Phil, > > > > for (i = 0; i < DEF_COP_RINGSIZE; i++) { > > > tmp = kzalloc(sizeof(struct todo_list_item), GFP_KERNEL); > > > if (!tmp) > > > - return -ENOMEM; > > > + goto err_ringalloc; > > > > This would mean that in case pcr allocation fails, the code would try to > > destroy mutexes which haven't been initialised at all. Probably I was a > > bit unclear here: just leave the code as is, returning -ENOMEM at this > > point is perfectly fine. > [] > That part of the patch was reverted and doesn't show up anymore in v2. If pcr > alloc fails, > open returns -ENOMEM immediately as in the original (the v2 patch context > does not make it clear). > If ring alloc fails, we clean-up pcr (which didn't fail) and rollback the for > loop. But by this > point, the mutex-es have already been initialized and we should revert that > too. > Did you have something else in mind?
Nope, that's exactly it. But in this case probably a mistake happened when submitting your v2, as it contains the above change. Greetings, Phil _______________________________________________ Cryptodev-linux-devel mailing list Cryptodev-linux-devel@gna.org https://mail.gna.org/listinfo/cryptodev-linux-devel