* [PATCH] mm: in_irq() cleanup
@ 2021-08-13 14:52 Changbin Du
2021-08-20 18:40 ` Catalin Marinas
0 siblings, 1 reply; 2+ messages in thread
From: Changbin Du @ 2021-08-13 14:52 UTC (permalink / raw)
To: Andrew Morton; +Cc: Catalin Marinas, linux-mm, linux-kernel, Changbin Du
Replace the obsolete and ambiguos macro in_irq() with new
macro in_hardirq().
Signed-off-by: Changbin Du <changbin.du@gmail.com>
---
mm/highmem.c | 2 +-
mm/kmemleak.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/highmem.c b/mm/highmem.c
index 4fb51d735aa6..4212ad0e4a19 100644
--- a/mm/highmem.c
+++ b/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;
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 228a2fbe0657..98d0be54628d 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -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()) {
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: in_irq() cleanup
2021-08-13 14:52 [PATCH] mm: in_irq() cleanup Changbin Du
@ 2021-08-20 18:40 ` Catalin Marinas
0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2021-08-20 18:40 UTC (permalink / raw)
To: Changbin Du; +Cc: Andrew Morton, linux-mm, linux-kernel
On Fri, Aug 13, 2021 at 10:52:45PM +0800, Changbin Du wrote:
> Replace the obsolete and ambiguos macro in_irq() with new
> macro in_hardirq().
>
> Signed-off-by: Changbin Du <changbin.du@gmail.com>
For kmemleak:
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-20 18:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 14:52 [PATCH] mm: in_irq() cleanup Changbin Du
2021-08-20 18:40 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).