summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorlevi.yun <yeoreum.yun@arm.com>2024-07-04 16:02:26 +0100
committerSteven Rostedt (Google) <rostedt@goodmis.org>2024-07-15 15:07:14 -0400
commit7dc836187f7c6f70a82b4521503e9f9f96194581 (patch)
tree09b4350049d0ea5417de56a7eca7c0927d0d9b99 /kernel
parenta325742505f6f08141fd7a530a82a907780bfd2c (diff)
downloadlwn-7dc836187f7c6f70a82b4521503e9f9f96194581.tar.gz
lwn-7dc836187f7c6f70a82b4521503e9f9f96194581.zip
trace/pid_list: Change gfp flags in pid_list_fill_irq()
pid_list_fill_irq() runs via irq_work. When CONFIG_PREEMPT_RT is disabled, it would run in irq_context. so it shouldn't sleep while memory allocation. Change gfp flags from GFP_KERNEL to GFP_NOWAIT to prevent sleep in irq_work. This change wouldn't impact functionality in practice because the worst-size is 2K. Cc: stable@goodmis.org Fixes: 8d6e90983ade2 ("tracing: Create a sparse bitmask for pid filtering") Link: https://lore.kernel.org/20240704150226.1359936-1-yeoreum.yun@arm.com Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: levi.yun <yeoreum.yun@arm.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/pid_list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/pid_list.c b/kernel/trace/pid_list.c
index 19b271a12c99..4966e6bbdf6f 100644
--- a/kernel/trace/pid_list.c
+++ b/kernel/trace/pid_list.c
@@ -354,7 +354,7 @@ static void pid_list_refill_irq(struct irq_work *iwork)
while (upper_count-- > 0) {
union upper_chunk *chunk;
- chunk = kzalloc(sizeof(*chunk), GFP_KERNEL);
+ chunk = kzalloc(sizeof(*chunk), GFP_NOWAIT);
if (!chunk)
break;
*upper_next = chunk;
@@ -365,7 +365,7 @@ static void pid_list_refill_irq(struct irq_work *iwork)
while (lower_count-- > 0) {
union lower_chunk *chunk;
- chunk = kzalloc(sizeof(*chunk), GFP_KERNEL);
+ chunk = kzalloc(sizeof(*chunk), GFP_NOWAIT);
if (!chunk)
break;
*lower_next = chunk;