On Tue, Jul 01, 2025 at 10:57:38AM +0800, Alan Huang wrote:
> exec_update_lock is used to check permissions, no need here.

Can you explain a bit more? How thoroughly did you audit the locking?

> 
> Signed-off-by: Alan Huang <mmpgour...@gmail.com>
> ---
>  fs/bcachefs/util.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c
> index 05b40debf211..7a4436fd4441 100644
> --- a/fs/bcachefs/util.c
> +++ b/fs/bcachefs/util.c
> @@ -299,17 +299,12 @@ int bch2_save_backtrace(bch_stacktrace *stack, struct 
> task_struct *task, unsigne
>       if (ret)
>               return ret;
>  
> -     if (!down_read_trylock(&task->signal->exec_update_lock))
> -             return -1;
> -
>       do {
>               nr_entries = stack_trace_save_tsk(task, stack->data, 
> stack->size, skipnr + 1);
>       } while (nr_entries == stack->size &&
>                !(ret = darray_make_room_gfp(stack, stack->size * 2, gfp)));
>  
>       stack->nr = nr_entries;
> -     up_read(&task->signal->exec_update_lock);
> -
>       return ret;
>  #else
>       return 0;
> -- 
> 2.48.1
> 

Reply via email to