From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Ebru Akagunduz <ebru.akagunduz@gmail.com>,
akpm@linux-foundation.org, sergey.senozhatsky.work@gmail.com,
mhocko@kernel.org, kirill.shutemov@linux.intel.com,
sfr@canb.auug.org.au, linux-mm@kvack.org,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
riel@redhat.com, aarcange@redhat.com
Subject: Re: [PATCH] mm, thp: fix locking inconsistency in collapse_huge_page
Date: Thu, 9 Jun 2016 12:51:08 +0900 [thread overview]
Message-ID: <20160609035108.GD655@swordfish> (raw)
In-Reply-To: <12918dcd-a695-c6f4-e06f-69141c5f357f@suse.cz>
On (06/06/16 15:05), Vlastimil Babka wrote:
[..]
> I think this does fix the inconsistency, thanks.
>
> But looking at collapse_huge_page() as of latest -next, I wonder if there's
> another problem:
>
> pmd = mm_find_pmd(mm, address);
> ...
> up_read(&mm->mmap_sem);
> down_write(&mm->mmap_sem);
> hugepage_vma_revalidate(mm, address);
> ...
> pte = pte_offset_map(pmd, address);
>
> What guarantees that 'pmd' is still valid?
the same question applied to __collapse_huge_page_swapin(), I think.
__collapse_huge_page_swapin(pmd)
pte = pte_offset_map(pmd, address);
do_swap_page(mm, vma, _address, pte, pmd...)
up_read(&mm->mmap_sem);
down_read(&mm->mmap_sem);
pte = pte_offset_map(pmd, _address);
-ss
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Ebru Akagunduz <ebru.akagunduz@gmail.com>,
akpm@linux-foundation.org, sergey.senozhatsky.work@gmail.com,
mhocko@kernel.org, kirill.shutemov@linux.intel.com,
sfr@canb.auug.org.au, linux-mm@kvack.org,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
riel@redhat.com, aarcange@redhat.com
Subject: Re: [PATCH] mm, thp: fix locking inconsistency in collapse_huge_page
Date: Thu, 9 Jun 2016 12:51:08 +0900 [thread overview]
Message-ID: <20160609035108.GD655@swordfish> (raw)
In-Reply-To: <12918dcd-a695-c6f4-e06f-69141c5f357f@suse.cz>
On (06/06/16 15:05), Vlastimil Babka wrote:
[..]
> I think this does fix the inconsistency, thanks.
>
> But looking at collapse_huge_page() as of latest -next, I wonder if there's
> another problem:
>
> pmd = mm_find_pmd(mm, address);
> ...
> up_read(&mm->mmap_sem);
> down_write(&mm->mmap_sem);
> hugepage_vma_revalidate(mm, address);
> ...
> pte = pte_offset_map(pmd, address);
>
> What guarantees that 'pmd' is still valid?
the same question applied to __collapse_huge_page_swapin(), I think.
__collapse_huge_page_swapin(pmd)
pte = pte_offset_map(pmd, address);
do_swap_page(mm, vma, _address, pte, pmd...)
up_read(&mm->mmap_sem);
down_read(&mm->mmap_sem);
pte = pte_offset_map(pmd, _address);
-ss
next prev parent reply other threads:[~2016-06-09 3:51 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 3:11 linux-next: Tree for Jun 1 Stephen Rothwell
2016-06-02 1:48 ` [linux-next: Tree for Jun 1] __khugepaged_exit rwsem_down_write_failed lockup Sergey Senozhatsky
2016-06-02 1:48 ` Sergey Senozhatsky
2016-06-02 9:21 ` Michal Hocko
2016-06-02 9:21 ` Michal Hocko
2016-06-02 12:08 ` Sergey Senozhatsky
2016-06-02 12:08 ` Sergey Senozhatsky
2016-06-02 12:21 ` Michal Hocko
2016-06-02 12:21 ` Michal Hocko
2016-06-03 13:51 ` Andrea Arcangeli
2016-06-03 13:51 ` Andrea Arcangeli
2016-06-03 14:46 ` Michal Hocko
2016-06-03 14:46 ` Michal Hocko
2016-06-03 15:10 ` Andrea Arcangeli
2016-06-03 15:10 ` Andrea Arcangeli
2016-06-07 7:34 ` Michal Hocko
2016-06-07 7:34 ` Michal Hocko
2016-06-08 8:19 ` Vlastimil Babka
2016-06-08 8:19 ` Vlastimil Babka
2016-06-03 7:15 ` Sergey Senozhatsky
2016-06-03 7:15 ` Sergey Senozhatsky
2016-06-03 7:25 ` Michal Hocko
2016-06-03 7:25 ` Michal Hocko
2016-06-03 8:43 ` Sergey Senozhatsky
2016-06-03 8:43 ` Sergey Senozhatsky
2016-06-03 9:55 ` Michal Hocko
2016-06-03 9:55 ` Michal Hocko
2016-06-03 10:05 ` Michal Hocko
2016-06-03 10:05 ` Michal Hocko
2016-06-03 13:38 ` Sergey Senozhatsky
2016-06-03 13:38 ` Sergey Senozhatsky
2016-06-03 13:45 ` Michal Hocko
2016-06-03 13:45 ` Michal Hocko
2016-06-03 13:49 ` Michal Hocko
2016-06-03 13:49 ` Michal Hocko
2016-06-03 13:49 ` Michal Hocko
2016-06-04 7:51 ` Sergey Senozhatsky
2016-06-04 7:51 ` Sergey Senozhatsky
2016-06-06 8:39 ` Michal Hocko
2016-06-06 8:39 ` Michal Hocko
2016-06-02 13:24 ` Vlastimil Babka
2016-06-02 13:24 ` Vlastimil Babka
2016-06-02 18:58 ` Ebru Akagunduz
2016-06-02 18:58 ` Ebru Akagunduz
2016-06-03 1:00 ` Sergey Senozhatsky
2016-06-03 1:00 ` Sergey Senozhatsky
2016-06-03 1:29 ` Sergey Senozhatsky
2016-06-03 1:29 ` Sergey Senozhatsky
2016-06-03 4:14 ` Sergey Senozhatsky
2016-06-03 4:14 ` Sergey Senozhatsky
2016-06-03 12:28 ` [PATCH] mm, thp: fix locking inconsistency in collapse_huge_page Ebru Akagunduz
2016-06-03 12:28 ` Ebru Akagunduz
2016-06-06 13:05 ` Vlastimil Babka
2016-06-06 13:05 ` Vlastimil Babka
2016-06-09 3:51 ` Sergey Senozhatsky [this message]
2016-06-09 3:51 ` Sergey Senozhatsky
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=20160609035108.GD655@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=ebru.akagunduz@gmail.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=mhocko@kernel.org \
--cc=riel@redhat.com \
--cc=sfr@canb.auug.org.au \
--cc=vbabka@suse.cz \
/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.