All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Huang Ying <ying.huang@intel.com>,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [BUGFIX] dm-crypt: Fix a bug of async cryption complete	function
Date: Fri, 27 Feb 2009 12:52:05 +0100	[thread overview]
Message-ID: <49A7D3E5.5040706@redhat.com> (raw)
In-Reply-To: <20090227114103.GB24024@gondor.apana.org.au>

Herbert Xu wrote:
> On Fri, Feb 27, 2009 at 04:56:11PM +0800, Huang Ying wrote:
>> @@ -830,7 +838,7 @@ static void kcryptd_async_done(struct cr
>>  		return;
>>  	}
>>  
>> -	mempool_free(ablkcipher_request_cast(async_req), cc->req_pool);
>> +	mempool_free(dmreq->req, cc->req_pool);
> 
> Why do we need all this complexity? Can't just fix it by using
> cc->req?

No. There can be parallel req allocated, also cc->req can be NULL.
(seems that these structs are overcomplicated already:-)

(And becuse sometimes the bio request is split into 2 pieces because
of hw restrictions, there can be two ablkcipher_requests for one bio...)

I think that patch is the best what we can do now as bugfix.
(I am just running some tests with that.)

Milan
--
mbroz@redhat.com


  reply	other threads:[~2009-02-27 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-27  8:56 [BUGFIX] dm-crypt: Fix a bug of async cryption complete function Huang Ying
2009-02-27 11:41 ` Herbert Xu
2009-02-27 11:52   ` Milan Broz [this message]
2009-02-27 11:56     ` Herbert Xu
2009-02-27 12:28       ` Milan Broz
2009-02-27 12:46         ` Herbert Xu
2009-02-27 13:51           ` Milan Broz
2009-02-27 14:19             ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49A7D3E5.5040706@redhat.com \
    --to=mbroz@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.