crypto: blkcipher - Fix WARN_ON handling in walk_done
authorHerbert Xu <[email protected]>
Fri, 16 Jan 2009 03:40:54 +0000 (14:40 +1100)
committerHerbert Xu <[email protected]>
Tue, 27 Jan 2009 06:11:13 +0000 (17:11 +1100)
commitbac1b5c4696f217afeac5b29874a337bc39da717
tree7e13f7953ea27cff00ef5e45a3fd8e7dac4ea95a
parent29b37f42127f7da511560a40ea74f5047da40c13
crypto: blkcipher - Fix WARN_ON handling in walk_done

When we get left-over bits from a slow walk, it means that the
underlying cipher has gone troppo.  However, as we're handling
that case we should ensure that the caller terminates the walk.

This patch does this by setting walk->nbytes to zero.

Reported-by: Roel Kluin <[email protected]>
Reported-by: Huang Ying <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
crypto/blkcipher.c