[lkml]   [2007]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/3] revoke: misc fixes
    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

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-03-16 08:41    [W:0.021 / U:6.704 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site