lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Jul 2012 14:04:52 -0400
From:	Larry Woodman <lwoodman@...hat.com>
To:	Rik van Riel <riel@...hat.com>
CC:	Hugh Dickins <hughd@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Michal Hocko <mhocko@...e.cz>, Linux-MM <linux-mm@...ck.org>,
	David Gibson <david@...son.dropbear.id.au>,
	Ken Chen <kenchen@...gle.com>,
	Cong Wang <xiyou.wangcong@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -alternative] mm: hugetlbfs: Close race during teardown
 of hugetlbfs shared page tables V2 (resend)

On 07/26/2012 01:42 PM, Rik van Riel wrote:
> On 07/23/2012 12:04 AM, Hugh Dickins wrote:
>
>> Please don't be upset if I say that I don't like either of your patches.
>> Mainly for obvious reasons - I don't like Mel's because anything with
>> trylock retries and nested spinlocks worries me before I can even start
>> to think about it; and I don't like Michal's for the same reason as Mel,
>> that it spreads more change around in common paths than we would like.
>
> I have a naive question.
>
> In huge_pmd_share, we protect ourselves by taking
> the mapping->i_mmap_mutex.
>
> Is there any reason we could not take the i_mmap_mutex
> in the huge_pmd_unshare path?

I think it is already taken on every path into huge_pmd_unshare().

Larry
>
> I see that hugetlb_change_protection already takes that
> lock. Is there something preventing __unmap_hugepage_range
> from also taking mapping->i_mmap_mutex?
>
> That way the sharing and the unsharing code are
> protected by the same, per shm segment, lock.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ