From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Pekka J Enberg <penberg@cs.helsinki.fi>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] revoke: misc fixes
Date: Fri, 16 Mar 2007 18:38:44 +1100 [thread overview]
Message-ID: <45FA4984.9000506@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.64.0703160927240.14902@sbz-30.cs.Helsinki.FI>
Pekka J Enberg wrote:
> Pekka J Enberg wrote:
>
>>> /*
>>>- * Not holding ->mmap_sem here.
>>>+ * Not holding ->mmap_sem here but we must watch out for page
>>>+ * faults and after the shared mappings have been taken down
>>>+ * and sys_mmap() trying to remap the revoked range.
>>> */
>>> vma->vm_flags |= VM_REVOKED;
>>> smp_mb();
>>>@@ -455,7 +457,7 @@ int err = 0;
>
>
> On Fri, 16 Mar 2007, Nick Piggin wrote:
>
>>You're still modifying vm_flags without down_write mmap_sem, so this will
>>corrupt vm_flags.
>
>
> Uhm, you're right, two concurrent writes and we can lose some bits so a
> barrier doesn't work. Too bad as we're under mapping->i_mmap_lock here and
> thus cannot take ->mmap_sep...
>
Could you try something like walk the i_mmap lists to find mms with vmas that
haven't need revoking, then each time you find one, take a ref on the mm, drop
i_mmap_lock, take mmap_sem, and walk all its vmas looking for any that reference
the inode?
Bit of a roundabout way to go, but it might work.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2007-03-16 7:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 7:17 [PATCH 1/3] revoke: misc fixes Pekka J Enberg
2007-03-16 7:21 ` Nick Piggin
2007-03-16 7:29 ` Pekka J Enberg
2007-03-16 7:38 ` Nick Piggin [this message]
2007-03-16 7:45 ` Pekka J Enberg
2007-03-16 7:50 ` Nick Piggin
2007-03-16 7:51 ` Pekka J Enberg
2007-03-16 8:52 ` Pekka Enberg
2007-03-19 5:37 ` Nick Piggin
2007-03-19 6:59 ` Pekka J Enberg
-- strict thread matches above, loose matches on Subject: below --
2007-03-16 9:47 Pekka J Enberg
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=45FA4984.9000506@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/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.