Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3914486ybe; Mon, 16 Sep 2019 03:36:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqw88rSrRktwZemuFDTGwSi0WorfjWGSqH5iIQrgM11cvxUDQekChiReb9i4g1h9gXO+1o+w X-Received: by 2002:a50:e886:: with SMTP id f6mr28157190edn.199.1568630197038; Mon, 16 Sep 2019 03:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568630197; cv=none; d=google.com; s=arc-20160816; b=I3g3KbhQ/g1mEulOgu1zbcllkfX38e36xbFQNKbpiB+NX+/ADl6YDbVZ+itqqI5km2 cQ1AYt4g9iRRN0J9Y21O1sbiBVOoZe5cbT/UY9/EybRR3UGA/Zydi9RaNfBxWyAyWEJr A72CM5lUI4p0AgSsli1cN7vUxpzK75tDDGqsMqCV1I8HwOmM54f15xQGolVYyMop80tM hd07NJHTtTrAcAxM1YhE2IegrO+FEEsyNesL4hsleq0TFitG6dks36JCocVRzSQcNcUR dTK65SRNhYFd0E5xo5IhPSdYhBDg5cgNLubCz3tSLnHDavioqCPT+wSvK0lXhQW2mhrs 3+fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hwAolnsZsEE90RFUUFXiPfKI8w9qoMR+b3uin2XlILY=; b=KIrysaz3kcqnwU6YcehO1W1KRurlWCpgTrDfVAPO3E/KhzhFm+3yS3/BzyGyFLySz9 FZAdUSfu/qVnIT2WQi0Ud/VJuNHrfK2cIRsIwWa2eR4YL9RetpzV1BCLUfhKa32teDbV a8obB9SrdrK1kGu4LBLSOx24kBl1yhQ9LPBGnvxeEmrV7xhJmtkXckNM4Sp7urwAtFiT ntWIek1FTzeK2a6Fn/3Zt5avkq4x+eGaLuLojPfehiPmo34WSBGnMhSYyaTEofudPzzB uDftbH/T6wciMsE7QnpJSLebwI2Tfl/iwUV2PSoL7AQxpRcg+gmAMAYhCpj61dpAAM/M kkWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=a4pCvoEV; 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 n16si18811434ejh.165.2019.09.16.03.36.13; Mon, 16 Sep 2019 03:36:37 -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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=a4pCvoEV; 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 S1731119AbfIPIjY (ORCPT + 99 others); Mon, 16 Sep 2019 04:39:24 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:43751 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfIPIjY (ORCPT ); Mon, 16 Sep 2019 04:39:24 -0400 Received: by mail-ed1-f65.google.com with SMTP id r9so3549155edl.10 for ; Mon, 16 Sep 2019 01:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hwAolnsZsEE90RFUUFXiPfKI8w9qoMR+b3uin2XlILY=; b=a4pCvoEVsOfSuq7jjr5OIe0A/DVYNN0JDDPlmDLEICk17UysrGPoPCdnEP2ZOO8TeT 4yq8w8LXsZUAvE3O87UQLIk769o0/NtRLi7+RSZYa0bsUIXFwba4iBRWiZPeBoVD/WRY hxGyCz+HHWxe635XqQRGqJyzmwoIuQ1b4XcbHckEb78I7YYBjzPSWMxkSf1KINW3wOLm EhhQsXngRx9q2mhqF280g4deG+XKdWdnTr1j8s9mleazbR7zq0Ixr8zidRv2Ww3OG2HX r4qsyI9Zv51wyaCboJZBEkUCL2O3D5H5ruy6Nnib+6tqpGMFzqfJMqXvmQSIfLP+aiuR eplg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hwAolnsZsEE90RFUUFXiPfKI8w9qoMR+b3uin2XlILY=; b=QaFBnRKO82+YkkCyC5DNbZmHrkYrWQRQvbyXLDNqSjUloq40PgyAWGz1g669qzufKO 28yrljywsIPt60PPjWslzElBUm7B1zyLDggb69JgcErpdHx35i7QEgtPR4eGOLYaY9OO bpcdhziSR6M2CTS6ShLdyp03dnxwfaqkwHveBqO5LlB0LwERr6jhaPXig7K316bpzNv4 gZpD5vPMTrno68Jp7XjRDvuwTMjGpKQdQPRORSz9viv7pW7RZ1t1Kj5vJrJYa4t2B+XK +UOlYbP9T1MVHhQvz33K1a/Wp5Y7eyDUzgddu2YTSriXhUQbApmubycDQtjIWqG+kYkj ikrA== X-Gm-Message-State: APjAAAV3d43RBjcYfiCJBOE9KlxdDmCDl/thv7gwzXGV+T8TKkLKjvt/ wqV+uC8qgLh7T9mfrUwCZcLP/g== X-Received: by 2002:a17:906:1197:: with SMTP id n23mr51749838eja.122.1568623162322; Mon, 16 Sep 2019 01:39:22 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id v8sm1900279edl.74.2019.09.16.01.39.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Sep 2019 01:39:21 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 432F1104174; Mon, 16 Sep 2019 11:39:23 +0300 (+03) Date: Mon, 16 Sep 2019 11:39:23 +0300 From: "Kirill A. Shutemov" To: Yu Zhao Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Tetsuo Handa , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] mm: clean up validate_slab() Message-ID: <20190916083923.u45azgtdvaaxo2w3@box.shutemov.name> References: <20190912023111.219636-1-yuzhao@google.com> <20190914000743.182739-1-yuzhao@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190914000743.182739-1-yuzhao@google.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 13, 2019 at 06:07:42PM -0600, Yu Zhao wrote: > The function doesn't need to return any value, and the check can be > done in one pass. > > There is a behavior change: before the patch, we stop at the first > invalid free object; after the patch, we stop at the first invalid > object, free or in use. This shouldn't matter because the original > behavior isn't intended anyway. > > Signed-off-by: Yu Zhao Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov