]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dm crypt: add missing error handling
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 28 Mar 2012 17:41:22 +0000 (18:41 +0100)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 13 Apr 2012 19:22:53 +0000 (12:22 -0700)
commit87e5a630c069996476bee123ecedaca52c0f6082
treeffb45d6bf55a9452daba2adabf63eef3f9db077f
parent2ec6061cc93f397771ad499f22804ad7dd553f9f
dm crypt: add missing error handling

commit 72c6e7afc43e19f68a31dea204fc366624d6eee9 upstream.

Always set io->error to -EIO when an error is detected in dm-crypt.

There were cases where an error code would be set only if we finish
processing the last sector. If there were other encryption operations in
flight, the error would be ignored and bio would be returned with
success as if no error happened.

This bug is present in kcryptd_crypt_write_convert, kcryptd_crypt_read_convert
and kcryptd_async_done.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-crypt.c