[dm-devel] [PATCH v2] dm crypt: fix deadlock when algo returns -EBUSY

Ben Collins ben.c at servergy.com
Fri Apr 10 17:56:46 UTC 2015


> On Apr 10, 2015, at 11:11 AM, Mike Snitzer <snitzer at redhat.com> wrote:
> 
> On Tue, Apr 07 2015 at  1:10pm -0400,
> Ben Collins <ben.c at servergy.com> wrote:
> 
>> 
>>> On Apr 7, 2015, at 11:28 AM, Mike Snitzer <snitzer at redhat.com> wrote:
>>> 
>>> On Tue, Apr 07 2015 at 11:55P -0400,
>>> Mike Snitzer <snitzer at redhat.com> wrote:
>>> 
>>>> It looks like you're _always_ using the completion regardless of whether
>>>> crypt_convert() will be waiting (e.g. even if error is 0).
>>>> 
>>>> I can see this "working" but it seems less than ideal.  Would it be
>>>> better to record the need to use the completion in ctx and then
>>>> conditionally call complete()?
>>> 
>>> Actually, how about using !completion_done() before calling complete()?
>>> If you think this would be OK, any chance you could re-test with this?
>> 
>> I'll be able to test it before Friday (out of town). Thanks
> 
> Hi Ben,
> 
> I'm still waiting for test feedback from you on v2.  Fairly certain
> you'll have the same results but I'd like to be certain before pushing
> this upstream.

As expected, this patch works as well as what I had originally done.
Thanks for reviewing it.

——
Ben Collins
Cyphre Champion
————————————————
Principal Architect
Servergy, Inc.
469-919-5634 (O)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20150410/00bf8dab/attachment.sig>


More information about the dm-devel mailing list