Re: [PATCH perf/core] uprobes: remove too strict lockdep_assert() condition in hprobe_expire()

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

 



On 02/25, Andrii Nakryiko wrote:
>
> --- a/kernel/events/uprobes.c
> +++ b/kernel/events/uprobes.c
> @@ -762,10 +762,14 @@ static struct uprobe *hprobe_expire(struct hprobe *hprobe, bool get)
>  	enum hprobe_state hstate;
>
>  	/*
> -	 * return_instance's hprobe is protected by RCU.
> -	 * Underlying uprobe is itself protected from reuse by SRCU.
> +	 * Caller should guarantee that return_instance is not going to be
> +	 * freed from under us. This can be achieved either through holding
> +	 * rcu_read_lock() or by owning return_instance in the first place.
> +	 *
> +	 * Underlying uprobe is itself protected from reuse by SRCU, so ensure
> +	 * SRCU lock is held properly.
>  	 */
> -	lockdep_assert(rcu_read_lock_held() && srcu_read_lock_held(&uretprobes_srcu));
> +	lockdep_assert(srcu_read_lock_held(&uretprobes_srcu));

Reviewed-by: Oleg Nesterov <oleg@xxxxxxxxxx>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux