[PATCH 28/32] stacktrace: Export stack_trace_save_tsk

Kent Overstreet posted 32 patches 2 years, 7 months ago
[PATCH 28/32] stacktrace: Export stack_trace_save_tsk
Posted by Kent Overstreet 2 years, 7 months ago
From: Christopher James Halse Rogers <raof@ubuntu.com>

The bcachefs module wants it, and there doesn't seem to be any
reason it shouldn't be exported like the other functions.

Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
 kernel/stacktrace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
index 9ed5ce9894..4f65824879 100644
--- a/kernel/stacktrace.c
+++ b/kernel/stacktrace.c
@@ -151,6 +151,7 @@ unsigned int stack_trace_save_tsk(struct task_struct *tsk, unsigned long *store,
 	put_task_stack(tsk);
 	return c.len;
 }
+EXPORT_SYMBOL_GPL(stack_trace_save_tsk);
 
 /**
  * stack_trace_save_regs - Save a stack trace based on pt_regs into a storage array
@@ -301,6 +302,7 @@ unsigned int stack_trace_save_tsk(struct task_struct *task,
 	save_stack_trace_tsk(task, &trace);
 	return trace.nr_entries;
 }
+EXPORT_SYMBOL_GPL(stack_trace_save_tsk);
 
 /**
  * stack_trace_save_regs - Save a stack trace based on pt_regs into a storage array
-- 
2.40.1
Re: [PATCH 28/32] stacktrace: Export stack_trace_save_tsk
Posted by Mark Rutland 2 years, 6 months ago
On Tue, May 09, 2023 at 12:56:53PM -0400, Kent Overstreet wrote:
> From: Christopher James Halse Rogers <raof@ubuntu.com>
> 
> The bcachefs module wants it, and there doesn't seem to be any
> reason it shouldn't be exported like the other functions.

What is the bcachefs module using this for?

Is that just for debug purposes? Assuming so, mentioning that in the commit
message would be helpful.

Thanks,
Mark.

> Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com>
> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
> ---
>  kernel/stacktrace.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
> index 9ed5ce9894..4f65824879 100644
> --- a/kernel/stacktrace.c
> +++ b/kernel/stacktrace.c
> @@ -151,6 +151,7 @@ unsigned int stack_trace_save_tsk(struct task_struct *tsk, unsigned long *store,
>  	put_task_stack(tsk);
>  	return c.len;
>  }
> +EXPORT_SYMBOL_GPL(stack_trace_save_tsk);
>  
>  /**
>   * stack_trace_save_regs - Save a stack trace based on pt_regs into a storage array
> @@ -301,6 +302,7 @@ unsigned int stack_trace_save_tsk(struct task_struct *task,
>  	save_stack_trace_tsk(task, &trace);
>  	return trace.nr_entries;
>  }
> +EXPORT_SYMBOL_GPL(stack_trace_save_tsk);
>  
>  /**
>   * stack_trace_save_regs - Save a stack trace based on pt_regs into a storage array
> -- 
> 2.40.1
> 
>
Re: [PATCH 28/32] stacktrace: Export stack_trace_save_tsk
Posted by Kent Overstreet 2 years, 6 months ago
On Mon, Jun 19, 2023 at 10:10:56AM +0100, Mark Rutland wrote:
> On Tue, May 09, 2023 at 12:56:53PM -0400, Kent Overstreet wrote:
> > From: Christopher James Halse Rogers <raof@ubuntu.com>
> > 
> > The bcachefs module wants it, and there doesn't seem to be any
> > reason it shouldn't be exported like the other functions.
> 
> What is the bcachefs module using this for?
> 
> Is that just for debug purposes? Assuming so, mentioning that in the commit
> message would be helpful.

Yes, the output ends up in debugfs.