On Wed, Sep 04, 2019 at 08:36:41AM +1000, Herbert Xu wrote: > On Tue, Sep 03, 2019 at 08:50:20AM -0500, Eric Biggers wrote: > > > > Doesn't this re-introduce the same bug that my patch fixed -- that > > scatterwalk_done() could be called after 0 bytes processed, causing a crash in > > scatterwalk_pagedone()? > > No because that crash is caused by the internal calls to the > function skcipher_walk_done with an error. Those two internal > calls have now been changed into skcipher_walk_unwind which does > not try to unmap the pages. > Okay, but what about external callers that pass in an error? (I mean, I don't actually see any currently, but the point of this patch is to allow it...) What would prevent the crash in scatterwalk_done() in that case? - Eric