mm: in_irq() cleanup
authorChangbin Du <changbin.du@gmail.com>
Wed, 8 Sep 2021 02:56:12 +0000 (19:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Sep 2021 18:50:24 +0000 (11:50 -0700)
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 <changbin.du@gmail.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com> [kmemleak]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/highmem.c
mm/kmemleak.c

index 4fb51d735aa6ae846b6c4678b0c7ab2073caaf0b..4212ad0e4a195f7ee16ecd9216b92c68fa855315 100644 (file)
@@ -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;
index 73d46d16d5755e2a1181e0b5ac19dc15e102af9f..b59f1761d817d631228a18d80c6c4899429f7c50 100644 (file)
@@ -598,7 +598,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
        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()) {