mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: Kirill Korotaev <dev@sw.ru>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: BUG in writeback_inodes()?
Date: Mon, 13 Sep 2004 16:35:11 -0400	[thread overview]
Message-ID: <1095107711.15547.102.camel@coffee.suse.com> (raw)
In-Reply-To: <4145C45E.2020705@sw.ru>

On Mon, 2004-09-13 at 12:01, Kirill Korotaev wrote:

> The problem with it is that writeback_inodes() supposes that if 
> __put_super() returns 0 then no super block was deleted from the list 
> and we can safely traverse sb list further.
> 
> But as it is obvious from the deactivate_super() it's not actually true. 
> because at point Y we delete super block from the list and drop the 
> lock. We do __put_super() very much later... So we can find sb with 
> poisoned sb->s_list at point X and we won't be the last sb reference 
> holders. The last reference will be dropped in point Z.
> 
> So in case of the following sequence of execution Y -> X -> Z we'll get 
> an oops after point X in writeback_inodes().
> 
> Am I correct with it?

Hmmm, sure looks that way.  Seems like it should be enough to switch to
list_del_init in deactivate_super, and then check for
list_empty(sb->s_list) in writeback_inodes.

-chris



      reply	other threads:[~2004-09-13 20:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-13 16:01 Kirill Korotaev
2004-09-13 20:35 ` Chris Mason [this message]

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=1095107711.15547.102.camel@coffee.suse.com \
    --to=mason@suse.com \
    --cc=akpm@osdl.org \
    --cc=dev@sw.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®