From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41ltww2dnVzDqhV for ; Thu, 9 Aug 2018 00:26:24 +1000 (AEST) In-Reply-To: <20180727114817.27190-1-npiggin@gmail.com> To: Nicholas Piggin , linuxppc-dev@lists.ozlabs.org From: Michael Ellerman Cc: "Aneesh Kumar K . V" , Andrew Morton , Linus Torvalds , Nicholas Piggin , linux-mm@kvack.org Subject: Re: [resend] powerpc/64s: fix page table fragment refcount race vs speculative references Message-Id: <41ltwv4RJjz9s4V@ozlabs.org> Date: Thu, 9 Aug 2018 00:26:10 +1000 (AEST) List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2018-07-27 at 11:48:17 UTC, Nicholas Piggin wrote: > The page table fragment allocator uses the main page refcount racily > with respect to speculative references. A customer observed a BUG due > to page table page refcount underflow in the fragment allocator. This > can be caused by the fragment allocator set_page_count stomping on a > speculative reference, and then the speculative failure handler > decrements the new reference, and the underflow eventually pops when > the page tables are freed. > > Fix this by using a dedicated field in the struct page for the page > table fragment allocator. > > Fixes: 5c1f6ee9a31c ("powerpc: Reduce PTE table memory wastage") > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/4231aba000f5a4583dd9f67057aadb cheers