From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752315AbcKQXTv (ORCPT ); Thu, 17 Nov 2016 18:19:51 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36408 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751288AbcKQXTt (ORCPT ); Thu, 17 Nov 2016 18:19:49 -0500 Date: Fri, 18 Nov 2016 02:19:45 +0300 From: "Kirill A. Shutemov" To: Johannes Weiner Cc: Andrew Morton , Jan Kara , Linus Torvalds , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 1/9] mm: khugepaged: close use-after-free race during shmem collapsing Message-ID: <20161117231945.GA8358@node> References: <20161117191138.22769-1-hannes@cmpxchg.org> <20161117191138.22769-2-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161117191138.22769-2-hannes@cmpxchg.org> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 17, 2016 at 02:11:30PM -0500, Johannes Weiner wrote: > When a radix tree iteration drops the tree lock, another thread might > swoop in and free the node holding the current slot. The iteration > needs to do another tree lookup from the current index to continue. > > [kirill.shutemov@linux.intel.com: re-lookup for replacement] > Fixes: f3f0e1d2150b ("khugepaged: add support of collapse for tmpfs/shmem pages") > Signed-off-by: Johannes Weiner Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov