Re: [PATCH v6 1/2] ftrace: disable preemption when recursion locked

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Oct 2021 10:34:13 +0800
王贇 <yun.wang@xxxxxxxxxxxxxxxxx> wrote:

> +/*
> + * Preemption will be enabled (if it was previously enabled).
> + */
>  static __always_inline void trace_clear_recursion(int bit)
>  {
> +	WARN_ON_ONCE(bit < 0);

Can you send a v7 without the WARN_ON.

This is an extremely hot path, and this will cause noticeable overhead.

If something were to call this with bit < 0, then it would crash and
burn rather quickly.

-- Steve


> +
> +	preempt_enable_notrace();
>  	barrier();
>  	trace_recursion_clear(bit);
>  }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux