All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [PATCH][RFT](2) minimal rmap for 2.5 - akpm tested
Date: Fri, 05 Jul 2002 23:28:41 -0700	[thread overview]
Message-ID: <3D268E19.B68559F6@zip.com.au> (raw)
In-Reply-To: Pine.LNX.4.44L.0207060228460.8346-100000@imladris.surriel.com

Rik van Riel wrote:
> 
> Hi,
> 
> Almost the same patch as before, except this one has had
> a few hours of testing by Andrew Morton and two bugs have
> been ironed out, most notably the truncate_complete_page()
> race.  This patch is probably safe since Andrew got bored
> when no new bugs showed up ...
> 

The box died, but not due to rmap.  We have a lock ranking
bug:

        do_exit
        ->mmput
          ->exit_mmap                           page_table_lock
            ->removed_shared_vm_struct
              ->lock_vma_mappings               i_shared_lock

versus

        do_truncate
        ->notify_change
          ->inode_setattr
            ->vmtruncate                        i_shared_lock
              ->vmtruncate_list
                ->zap_page_range                page_table_lock

It seems that in 2.5.16, a call to remove_shared_vm_struct() was
added to exit_mmap(), inside mm->page_table_lock.

That ranking conflicts with truncate.

-

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@zip.com.au>
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [PATCH][RFT](2) minimal rmap for 2.5 - akpm tested
Date: Fri, 05 Jul 2002 23:28:41 -0700	[thread overview]
Message-ID: <3D268E19.B68559F6@zip.com.au> (raw)
In-Reply-To: Pine.LNX.4.44L.0207060228460.8346-100000@imladris.surriel.com

Rik van Riel wrote:
> 
> Hi,
> 
> Almost the same patch as before, except this one has had
> a few hours of testing by Andrew Morton and two bugs have
> been ironed out, most notably the truncate_complete_page()
> race.  This patch is probably safe since Andrew got bored
> when no new bugs showed up ...
> 

The box died, but not due to rmap.  We have a lock ranking
bug:

        do_exit
        ->mmput
          ->exit_mmap                           page_table_lock
            ->removed_shared_vm_struct
              ->lock_vma_mappings               i_shared_lock

versus

        do_truncate
        ->notify_change
          ->inode_setattr
            ->vmtruncate                        i_shared_lock
              ->vmtruncate_list
                ->zap_page_range                page_table_lock

It seems that in 2.5.16, a call to remove_shared_vm_struct() was
added to exit_mmap(), inside mm->page_table_lock.

That ranking conflicts with truncate.

-
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

  reply	other threads:[~2002-07-06  6:20 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-06  5:31 [PATCH][RFT](2) minimal rmap for 2.5 - akpm tested Rik van Riel
2002-07-06  5:31 ` Rik van Riel
2002-07-06  6:28 ` Andrew Morton [this message]
2002-07-06  6:28   ` Andrew Morton
2002-07-06 19:06   ` Linus Torvalds
2002-07-06 19:06     ` Linus Torvalds
2002-07-06 20:00     ` Andrew Morton
2002-07-06 20:00       ` Andrew Morton
2002-07-06 20:11       ` Linus Torvalds
2002-07-06 20:11         ` Linus Torvalds
2002-07-10 17:35 ` Sebastian Droege
2002-07-10 20:42   ` Rik van Riel
2002-07-10 20:42     ` Rik van Riel
2002-07-10 21:56     ` Daniel Phillips
2002-07-10 21:56       ` Daniel Phillips
2002-07-11  6:47       ` Jens Axboe
2002-07-11  6:47         ` Jens Axboe
2002-07-11  9:58         ` Daniel Phillips
2002-07-11  9:58           ` Daniel Phillips
2002-07-11 10:08           ` Jens Axboe
2002-07-11 10:08             ` Jens Axboe
2002-07-22 22:02             ` DAC960 Bitrot Daniel Phillips
2002-07-24 14:39               ` Jens Axboe
2002-07-24 14:48                 ` Jens Axboe
2002-07-24 16:19                 ` Wakko Warner
2002-07-24 16:57                 ` Daniel Phillips
2002-07-24 17:02                   ` Jens Axboe
2002-07-24 17:30                     ` Alexander Viro

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=3D268E19.B68559F6@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@conectiva.com.br \
    --cc=torvalds@transmeta.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.