mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brian Bloniarz <bmb@athenacr.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Larry Woodman <lwoodman@redhat.com>,
	linux-kernel@vger.kernel.org, riel@redhat.com,
	Mark Lord <kernel@teksavvy.com>,
	stefan.bader@canonical.com, kees@ubuntu.com
Subject: Re: Race in wb_do_writeback() ???
Date: Wed, 30 Jun 2010 15:15:35 -0400	[thread overview]
Message-ID: <4C2B97D7.60303@athenacr.com> (raw)
In-Reply-To: <20100629202650.GA28992@infradead.org>

On 06/29/2010 04:26 PM, Christoph Hellwig wrote:
> On Tue, Jun 29, 2010 at 04:28:16PM -0400, Larry Woodman wrote:
>> Chistoph, I am seeing slabcache corruption.  wb_do_writeback() calls
>> wb_clear_pending() which can queue up the freeing of the bdi_work. Then
>> it calls wb_writeback() which can block, resulting in using the bdi_work
>> after its freed.
>> 
>> ------------------------------------------------------------------
>>   /*
>>    * If this isn't a data integrity operation, just notify
>>    * that we have seen this work and we are now starting it.
>>    */
>>   if (!test_bit(WS_ONSTACK, &work->state))
>>          wb_clear_pending(wb, work);
>> 
>>   wrote += wb_writeback(wb, &args);
>> 
>>  /*
>>   * This is a data integrity writeback, so only do the
>>   * notification when we have completed the work.
>>   */
>>   if (test_bit(WS_ONSTACK, &work->state))
>>          wb_clear_pending(wb, work);
>> ------------------------------------------------------------------
>> 
>> Can you have one unconditional call to wb_clear_pending() after the
>> calling wb_writeback()???
> 
> In fact we should only have a conditional call after wb_writeback.
> I've done that already and it's in Jens' tree for 2.6.36:
> 
>   http://git.kernel.dk/?p=linux-2.6-block.git;a=commitdiff;h=79338d2a78ab78efdc1698f1309766a039addf9d

Hi Christoph, 

Is this a problem that was introduced by your writeback patch
series which just got merged for 2.6.35?
Are you going to try to get a fix for this into 2.6.35?

(CCing some people who were interested in your writeback series).

  reply	other threads:[~2010-06-30 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 20:28 Larry Woodman
2010-06-29 20:26 ` Christoph Hellwig
2010-06-30 19:15   ` Brian Bloniarz [this message]
2010-07-02 14:05   ` Christoph Hellwig

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=4C2B97D7.60303@athenacr.com \
    --to=bmb@athenacr.com \
    --cc=hch@infradead.org \
    --cc=kees@ubuntu.com \
    --cc=kernel@teksavvy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lwoodman@redhat.com \
    --cc=riel@redhat.com \
    --cc=stefan.bader@canonical.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome