From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D426BC43334 for ; Tue, 14 Jun 2022 15:57:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 005DA6B00A5; Tue, 14 Jun 2022 11:57:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ED02B6B00A6; Tue, 14 Jun 2022 11:57:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D98B66B00A7; Tue, 14 Jun 2022 11:57:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id C3A656B00A5 for ; Tue, 14 Jun 2022 11:57:08 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 9C202E4E for ; Tue, 14 Jun 2022 15:57:08 +0000 (UTC) X-FDA: 79577295336.31.02452B4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf28.hostedemail.com (Postfix) with ESMTP id 1D885C00AF for ; Tue, 14 Jun 2022 15:57:07 +0000 (UTC) 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 E06716144D; 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> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655222228; a=rsa-sha256; cv=none; b=IbL/wl0yuOk+6tIhH/9655zn9P9L0z9+HMwBvBVKft8HwMztME01UetIz5reOIb/PYjjp4 Hf+9ofLIAYFiTs+2LXTVJ968Eiv8CyeJ/30yst9/E2hQIOs6paU1yMf6uRrF1qx2ZLRrhw FPahUvDSrxkN9JYpj2QQSpeqlKMGBpQ= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf28.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655222228; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lhnRjCVzCEtDX7BaXxheQ8z9bWtDejfqeNsaCH8yAxI=; b=lXJ41Yawvh/goqW4QM8T8YOuFRDJfX4Y2LWeyvGqHBw9ottDE1nsVZBKEhmB/WY5o0qZyP lOkpBbxmsMQVi9ccywZ/1Ebnmupxr+oWtv25ZFBQLOIsY2lGn6KbHs7VQmblfxLcsHVz5r HTlGrvoBhtCRA16vIBKGRr17G0xKIYg= X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 1D885C00AF X-Stat-Signature: 9o1jczicnxje6j4ujuw45k89ex4puq3n Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf28.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org X-Rspam-User: X-HE-Tag: 1655222227-461808 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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