lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191209183313.GL2889@paulmck-ThinkPad-P72>
Date:   Mon, 9 Dec 2019 10:33:13 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     madhuparnabhowmik04@...il.com
Cc:     joel@...lfernandes.org, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] rculist.h: Add list_tail_rcu()

On Mon, Dec 09, 2019 at 01:20:43PM +0530, madhuparnabhowmik04@...il.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik04@...il.com>
> 
> This patch adds the macro list_tail_rcu() and document it.
> 
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@...il.com>

Queued with slight edits, thank you very much!

							Thanx, Paul

> ---
>  include/linux/rculist.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/include/linux/rculist.h b/include/linux/rculist.h
> index 4b7ae1bf50b3..9f21efa525ab 100644
> --- a/include/linux/rculist.h
> +++ b/include/linux/rculist.h
> @@ -40,6 +40,16 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
>   */
>  #define list_next_rcu(list)	(*((struct list_head __rcu **)(&(list)->next)))
>  
> +/**
> + * list_tail_rcu - returns the prev pointer of the head of the list
> + * @head: the head of the list
> + *
> + * Note: This should only be used with the list header,
> + * but only if list_del() and similar primitives are not
> + * also used on the list header.
> + */
> +#define list_tail_rcu(head)	(*((struct list_head __rcu **)(&(head)->prev)))
> +
>  /*
>   * Check during list traversal that we are within an RCU reader
>   */
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ