From patchwork Wed Sep 8 02:56:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12479905 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34CF8C433F5 for ; Wed, 8 Sep 2021 02:56:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 08FB560E52 for ; Wed, 8 Sep 2021 02:56:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 08FB560E52 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9E1F094000B; Tue, 7 Sep 2021 22:56:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 992BC900003; Tue, 7 Sep 2021 22:56:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8594194000B; Tue, 7 Sep 2021 22:56:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0229.hostedemail.com [216.40.44.229]) by kanga.kvack.org (Postfix) with ESMTP id 7156A900003 for ; Tue, 7 Sep 2021 22:56:14 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3AA2E8249980 for ; Wed, 8 Sep 2021 02:56:14 +0000 (UTC) X-FDA: 78562892268.17.7A3EDF3 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf21.hostedemail.com (Postfix) with ESMTP id EFB57D02CD7B for ; Wed, 8 Sep 2021 02:56:13 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 194BF60555; Wed, 8 Sep 2021 02:56:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1631069773; bh=ivNpzlW2A1uyW/sfBXcXZ3ASaB34QnCZ07tbwoeVSrE=; h=Date:From:To:Subject:In-Reply-To:From; b=vPZmAvpg6u80QqXGJd+DhPGWFjyOjFN6BF2S2Dj9ZI+nnJr+qgCdOJ7v2zEQ16MF7 OX7eFpOl3rVYopwMOH04hHwKJnYhi28vMOJS5s27iCAIagjNtXn76IMwxVjApl9lZE 04GpEesQ/C58Ffaq2+yaJ50nIUo4/nBoQHYzwktI= Date: Tue, 07 Sep 2021 19:56:12 -0700 From: Andrew Morton To: akpm@linux-foundation.org, catalin.marinas@arm.com, changbin.du@gmail.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 058/147] mm: in_irq() cleanup Message-ID: <20210908025612.HIrVK1YBi%akpm@linux-foundation.org> In-Reply-To: <20210907195226.14b1d22a07c085b22968b933@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=vPZmAvpg; spf=pass (imf21.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: EFB57D02CD7B X-Stat-Signature: w9jrmsh8yprzyqf5tj898bhen56cyp7e X-HE-Tag: 1631069773-242388 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: From: Changbin Du Subject: mm: in_irq() cleanup Replace the obsolete and ambiguos macro in_irq() with new macro in_hardirq(). Link: https://lkml.kernel.org/r/20210813145245.86070-1-changbin.du@gmail.com Signed-off-by: Changbin Du Acked-by: Catalin Marinas [kmemleak] Signed-off-by: Andrew Morton --- mm/highmem.c | 2 +- mm/kmemleak.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/mm/highmem.c~mm-in_irq-cleanup +++ a/mm/highmem.c @@ -436,7 +436,7 @@ EXPORT_SYMBOL(zero_user_segments); static inline int kmap_local_idx_push(void) { - WARN_ON_ONCE(in_irq() && !irqs_disabled()); + WARN_ON_ONCE(in_hardirq() && !irqs_disabled()); current->kmap_ctrl.idx += KM_INCR; BUG_ON(current->kmap_ctrl.idx >= KM_MAX_IDX); return current->kmap_ctrl.idx - 1; --- a/mm/kmemleak.c~mm-in_irq-cleanup +++ a/mm/kmemleak.c @@ -598,7 +598,7 @@ static struct kmemleak_object *create_ob object->checksum = 0; /* task information */ - if (in_irq()) { + if (in_hardirq()) { object->pid = 0; strncpy(object->comm, "hardirq", sizeof(object->comm)); } else if (in_serving_softirq()) {