Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1627689iog; Tue, 14 Jun 2022 09:41:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6QiDUoFrAI4zFWGLoM51MfelW3EJfnb7XUmUcZepX8LrU6/op3eKJlOOKzjaP2kGV10RK X-Received: by 2002:a05:6402:56:b0:431:6f7b:533 with SMTP id f22-20020a056402005600b004316f7b0533mr7156883edu.333.1655224912573; Tue, 14 Jun 2022 09:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655224912; cv=none; d=google.com; s=arc-20160816; b=q0J853SOrBDQM2VhZKkF8m01Mvhf8U/Fz0jbWdC7cxJ7s6z6IwPQHpc9Jqil/Js21V wUxcrzo0upB9+ody/oEh0kaylb5jRYXUV3fmTQsBWTtej/n+u57VsB/3UgYaf6e3QOX2 Xbxchywy9HFopV5g8npVrlI4HZbsHajRIbjr45uHfXCplN8rQB6Cvsc+AkkT2oTtmqKW CIQhVuNQUVwa3WKysHG6QT6SYDUfhuCDQyMoWRT+o0SGo964Erc6PP9MjHvg972/avip Ekgfu0Iy2Ku6wNDG/DPh6tW+Dc/gwSqCpk4M8BKiCkQV7Lr46xJI60rPxNZszz+GjTde JE7A== 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; bh=lhnRjCVzCEtDX7BaXxheQ8z9bWtDejfqeNsaCH8yAxI=; b=ZEc8kj6DlVGyeBSPBnyKsKVG1GhemdQhTV8/KFEIz+Vo2wenOt8Cx65qoHxEPqaWgR UtFGc9SgJ3afqDKUxSx8QSH7+rdzM4M9s3Vwp24z9ZYHLrjIJhZxLRPN6t4nWWVEaTBj Unr9aDZMI4yaI4qlBHoJOnBHUsExTk4Xun9e3dtt3dCnMulzwLqSsNOLkIHB4JRnTb9R 58qGmU8BbcL9gF4Ve2n0bt/hvVU1CN/D4WiYf01Padrk2X1hf6xfZJll8KsmxBCXmQTp yPIMgfbNU8WAmZJjqYf5bwjOJUUfaqqRwzMzliKDwJ5t6hMgFDS1hIV5wInmvHttuzHU fKuA== ARC-Authentication-Results: i=1; mx.google.com; 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=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e23-20020a170906749700b006ff9265af35si10709440ejl.404.2022.06.14.09.41.27; Tue, 14 Jun 2022 09:41:52 -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; 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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350926AbiFNP5J (ORCPT + 99 others); Tue, 14 Jun 2022 11:57:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244927AbiFNP5H (ORCPT ); Tue, 14 Jun 2022 11:57:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FDD12CC98 for ; Tue, 14 Jun 2022 08:57:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E8A4B6146E for ; Tue, 14 Jun 2022 15:57:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EC9DC3411B; Tue, 14 Jun 2022 15:57:05 +0000 (UTC) Date: Tue, 14 Jun 2022 16:57:01 +0100 From: Catalin Marinas To: Waiman Long Cc: 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=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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: Catalin Marinas