Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp992825ybe; Fri, 13 Sep 2019 09:24:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9Ds6Z44JY8ArKKKye2jF6KIEH8GTVl6668G3lAivhfbf9zBhTIRKUqaGfnZ8ThNeiVIfq X-Received: by 2002:a50:fc08:: with SMTP id i8mr49544473edr.285.1568391893851; Fri, 13 Sep 2019 09:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568391893; cv=none; d=google.com; s=arc-20160816; b=s3eo9KPpBx2XBvjNcey2rFPffWQiXQOtNYGupuGRGosaaeUWUPu0DjpwcmrDNAvNEl NinmhDQyqmScynxvySOvjuFpMWypbQDWEktpNokqLi4lxoQI+tTFM9Paz0Q20RNpg+SM lsyLg1Sl5wFL+XUkp/U0J4SdG+2TAO5AezbJJlCi+9s+bw7z9LIMjfRKG4g7KuHb4T6c rvEvPXo7giZUZ3gbZlZvTp8QJkToXpLB/2GJTLyrMuE3gTkglOZ5MEymqy2mlWd4PtlH bzWO2T965I2qUfR1gcOq1OJccF1+AHZJymlUwNto1dp6GmlB+keKbN68Ngbn9s5tH2/i 8/LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=Goi0pBynSANamO6sTU161ewP9+QZv8oVwAm3jBmdO0U=; b=kuWsrpnEpYmSU7llQoWkp8SVpWQcvXMInJXULM04+DesS0Mzz3SzwT4+/0MF9oIH8+ ms5qjvzh2bm1066c3XIIcxt13C2ipFpHLzPmt+PHQEg6zZBMtngS0z9opC9/EdtxCii6 Evnb+3yw/uxrDyw9hZdVID4sT5vsGcmwovrzb/S78ZBzF6u8V4zsbDOpvFYC9d+tyhj6 kh8tNtGqDWQCpO/xS3oOW0VfXghZ6O7+3j2llJlsi1dHLDvmt+KMRualBv2c+NPw3urR xh9Py7QR0w73uVq9y6P11eTI0suoeEINnMfAfqo780pe54YCF0u3SS0iBlK5q2j15zzt ssuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=cWJEtaKY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si14851462edf.92.2019.09.13.09.24.29; Fri, 13 Sep 2019 09:24:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=cWJEtaKY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390151AbfIMO6x (ORCPT + 99 others); Fri, 13 Sep 2019 10:58:53 -0400 Received: from a9-92.smtp-out.amazonses.com ([54.240.9.92]:42196 "EHLO a9-92.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388734AbfIMO6x (ORCPT ); Fri, 13 Sep 2019 10:58:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1568386731; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=Goi0pBynSANamO6sTU161ewP9+QZv8oVwAm3jBmdO0U=; b=cWJEtaKYNZrlYAzqOAoWpjRP6vbJ+T2ICB8RBSUIcjzY8rfpYslXS94P4fm2+2um F8FykUozRy0/DelRQ0U2zHZsjxeTmxZwnfBkrzY926zHv2q5Ns5buB8tEaA0mr2V14l AdyviHsmn3NT3ijwlvQK4kxwlZ2lf2htFRpdF5Tc= Date: Fri, 13 Sep 2019 14:58:51 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Yu Zhao cc: Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "Kirill A . Shutemov" , Tetsuo Handa , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/4] mm: lock slub page when listing objects In-Reply-To: <20190912023111.219636-4-yuzhao@google.com> Message-ID: <0100016d2b224ef4-8660f7e9-3093-48fa-bc40-63d20e9f2444-000000@email.amazonses.com> References: <20190912004401.jdemtajrspetk3fh@box> <20190912023111.219636-1-yuzhao@google.com> <20190912023111.219636-4-yuzhao@google.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.09.13-54.240.9.92 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Sep 2019, Yu Zhao wrote: > Though I have no idea what the side effect of such race would be, > apparently we want to prevent the free list from being changed > while debugging the objects. process_slab() is called under the list_lock which prevents any allocation from the free list in the slab page. This means that new objects can be added to the freelist which occurs by updating the freelist pointer in the slab page with a pointer to the newly free object which in turn contains the old freelist pointr. It is therefore possible to safely traverse the objects on the freelist after the pointer has been retrieved NAK.