Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754703AbaADUbd (ORCPT ); Sat, 4 Jan 2014 15:31:33 -0500 Received: from blu0-omc1-s24.blu0.hotmail.com ([65.55.116.35]:34513 "EHLO blu0-omc1-s24.blu0.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753367AbaADUbc (ORCPT ); Sat, 4 Jan 2014 15:31:32 -0500 X-TMN: [n7V5YzojJg1Y6MJ6r5DmWggQp6tD8oH6] X-Originating-Email: [dave.anglin@bell.net] Message-ID: From: John David Anglin To: Mikulas Patocka In-Reply-To: Subject: Re: [PATCH] fix crash when using XFS on loopback References: Content-Type: text/plain; charset="US-ASCII"; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit MIME-Version: 1.0 (Apple Message framework v936) Date: Sat, 4 Jan 2014 15:31:13 -0500 CC: Joonsoo Kim , Andi Kleen , Christoph Lameter , Pekka Enberg , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org X-Mailer: Apple Mail (2.936) X-OriginalArrivalTime: 04 Jan 2014 20:31:30.0329 (UTC) FILETIME=[F3417090:01CF098B] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1301 Lines: 47 On 4-Jan-14, at 2:55 PM, Mikulas Patocka wrote: > On Sat, 4 Jan 2014, John David Anglin wrote: > >> On 4-Jan-14, at 12:45 PM, Mikulas Patocka wrote: >> >>> * flush_dcache_page asks for the list of userspace mappings, >>> however that >>> page->mapping field is reused by the slab subsystem for a different >>> purpose. This causes the crash. >> >> I'd noticed the other day that the parisc implementation of >> flush_dcache_page() >> should return if "!mapping || mapping != page->mapping" is true. >> This would >> have avoided crash. >> >> Dave > > I think no. > > page_mapping returns NULL if the page has only anonymous mapping and > it is > not placed in the swap cache. In this case, you need to flush the > kernel > cache. The suggestion is to add the "mapping != page->mapping" to the current NULL check. It occurs after the kernel cache flush. It doesn't seem right to flush the vma mappings associated with swap address space and that appears to be happening with current code. Dave -- John David Anglin dave.anglin@bell.net -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/