Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp208533iog; Mon, 13 Jun 2022 00:23:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTcEQpsW4Sg19+SPCI+BtKsWyaGTADIzBnIOdbSBojFILI7kHoJiaUbKbP8S02ntgqhIYd X-Received: by 2002:a17:906:7786:b0:712:3c92:4335 with SMTP id s6-20020a170906778600b007123c924335mr10089125ejm.610.1655105022672; Mon, 13 Jun 2022 00:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655105022; cv=none; d=google.com; s=arc-20160816; b=QJp4SmMBS3lR7KKcmDGcQVvnYVGbki9wseM/FbGoCiOop+ffSwDrtXOrvoSVIOURk3 +J4gU7UkHiTgJlvfOQLx/V5OkSNI+v6eNl4E/QRz1oDB2OR2wQ+2Vmoe8LtsfaRwX8P5 lSXFRiT6zPlk+G77YJ3xjGAzCGPs82AGjUKhocPCvIsIbMcrOugnqpsppJXE0GqSc5gp kHAcfHOB91v+GnQwXLbGuHA26ZLVVsYJ64bknUbEFmqirGRP1ZcH6m5I3zKXBKHU3L0Y +P+M1wHR67s2q292Lx83TOCt7Nx+tFtbhm1A+ogMD9veHmvt8cGISPfuMvzZZjyTwdyO 1Mgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ryeH9bTEtbNft6a8+l0Ww/QD0tPIB9O2GIzjchd0JQ8=; b=kSAVvyOu7fknqlNik1SzPXve4QJNNG9DJ+5y7oub5p9VTXE6a3YipTAttxKFDrcNAj j/Mf8x8N/QrYWunOiUKbWXq8wyL1Fcd7k8HTqsOHDrM35YRW5sm1UEqhtKt3uP3SZWNT bU7+sdzUqF08uahmzN8REzIKF3iXWcSBt+44zhqmXwSV4WqIhCpprK7KO6yCBN3QccQE vBrfGNKxXseyD59mc6pOaO5dLP97jCJtB+U0MW9WnauvYXIvbSY1+cEZtN9e9H9TYDxk 3Wg16yO5hSyL/S9KTHJ0QU0YkQTXth/QfFX3T/yB9hM8OCjy8b2Gt+8QTFLNYAHcuz4H eDWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=7Z2m+Uan; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs38-20020a1709072d2600b00711dc331bfasi8077223ejc.765.2022.06.13.00.23.14; Mon, 13 Jun 2022 00:23:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=7Z2m+Uan; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238948AbiFMHPI (ORCPT + 99 others); Mon, 13 Jun 2022 03:15:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235615AbiFMHPH (ORCPT ); Mon, 13 Jun 2022 03:15:07 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 375491A3A6 for ; Mon, 13 Jun 2022 00:15:06 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id bo5so5001345pfb.4 for ; Mon, 13 Jun 2022 00:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ryeH9bTEtbNft6a8+l0Ww/QD0tPIB9O2GIzjchd0JQ8=; b=7Z2m+UanT7leluCE0awhNxUgN/zvt+QgLX41xEJAkZ+hZl9VI2EHpDcYFUppZ9BKoY 50fge9XUhht5/9Jy98ZmwWcEyX6y0D12e8O+OcFKcGMtINA54VotW1Re/vgDyk53Ukdm IHxc1+r+vMC9HH0wgZhf2TJdBx5q2rbxsUSIztrzJbjkJ804j6UTeS5RqqRNrRkuRW6M zyXgQD365z1Sc+96lW/fEZVdEBCWAefn+rXwdENfblHqcGEtDQrRctODB4Opn2iWL40a 99tK75i+ilgO4NFf/w7KwY3VOplAn0WgtizKYpUhR3effzvDCve7a3XIeOS6hX6DqZzx pZMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ryeH9bTEtbNft6a8+l0Ww/QD0tPIB9O2GIzjchd0JQ8=; b=JFwQnpVegLwpleVxFtHu/RZZ4a073GHAr8NTyuGOZN0PEK44RaOgfMPSgNyA4MKpgo CfCxp4Dqkae9SogZe8uB4m85EmUsHUgHgxbzSEbp5dEH0vWx6Z2+PWYKa1y3JmyOOHTo YzLln7ATzMevlroJObQ+ine8dDEfoQ+cmdPzGzpqhqw/J7UdFAntqKsCXn+29ZcMotXf 7Cl3fexOgQk0VChP+u5hN2r+lt3feDAAXtfXzkVFIE5ggui+8JhsLNDR5yInOYgu743X HPFbTX6lZsn1pY0qY63grU6ZFCSiJydHCGj3Lkg2COgJd9dE6BK3qJnjdSTHK3yqeBI8 8Q2Q== X-Gm-Message-State: AOAM531T/UO1KFbpeZC76nuV5mhVHsyUb46karGfqHrCr0zWLfzBeia+ 5b26qL5gmQ55VihI8DfkV6I/LQ== X-Received: by 2002:a63:4853:0:b0:3fa:dc6:7ac2 with SMTP id x19-20020a634853000000b003fa0dc67ac2mr50831303pgk.298.1655104505694; Mon, 13 Jun 2022 00:15:05 -0700 (PDT) Received: from localhost ([139.177.225.255]) by smtp.gmail.com with ESMTPSA id s2-20020a17090302c200b00168d9630b49sm2205628plk.307.2022.06.13.00.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 00:15:05 -0700 (PDT) Date: Mon, 13 Jun 2022 15:15:02 +0800 From: Muchun Song To: Waiman Long Cc: Catalin Marinas , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] mm/kmemleak: Use _irq lock/unlock variants in kmemleak_scan/_clear() Message-ID: References: <20220612183301.981616-1-longman@redhat.com> <20220612183301.981616-2-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220612183301.981616-2-longman@redhat.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 12, 2022 at 02:32:59PM -0400, Waiman Long wrote: > The kmemleak_scan() function is called only from the kmemleak scan > thread or from write to the kmemleak debugfs file. Both are in task > context and so we can directly use the simpler _irq() lock/unlock calls > instead of the more complex _irqsave/_irqrestore variants. > > Similarly, kmemleak_clear() is called only from write to the kmemleak > debugfs file. The same change can be applied. > > Signed-off-by: Waiman Long Reviewed-by: Muchun Song Thanks.