Skip to content

Commit

Permalink
mm: in_irq() cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Changbin Du authored and Linus Torvalds committed Sep 8, 2021
1 parent 5138612 commit ea0eafe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion mm/kmemleak.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit ea0eafe

Please sign in to comment.