From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752415AbaEZNfW (ORCPT ); Mon, 26 May 2014 09:35:22 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:64998 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751914AbaEZNfV (ORCPT ); Mon, 26 May 2014 09:35:21 -0400 Message-ID: <53834310.8060808@redhat.com> Date: Mon, 26 May 2014 15:35:12 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Jeff Smith , "Kirill A. Shutemov" CC: Christoph Hellwig , Kenny Simpson , Michal Hocko , linux-kernel@vger.kernel.org, Andrew Morton , Peter Zijlstra , Dave Jones , Linus Torvalds Subject: Re: remap_file_pages() use References: <20140519130114.GA3140@dhcp22.suse.cz> <20140519143540.BE9F6E009B@blue.fi.intel.com> <20140519143837.GA5228@infradead.org> <20140526094240.B5508E009B@blue.fi.intel.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 26/05/2014 15:24, Jeff Smith ha scritto: > Your addr2 mmap() call is a bit incorrect semantically and > syntactically (you skipped the length arg). The addr2 request will > fail because mmap() does not implicitly munmap() occupied virtual > address space. With MAP_FIXED it does. It is in the man page. Paolo > Even if you did that, the following still has a race > condition between the addr2 request and another thread grabbing the > same virtual space, which nothing short of a lock on all threads' > mmap()-ing logic can protect: