Re: [PATCH] State limits to safety of _safe iterators

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

 



On Wed, 2007-09-12 at 18:01 -0700, Paul E. McKenney wrote:
> The _safe list iterators make a blanket statement about how they are
> safe against removal.  This patch, inspired by private conversations
> with people who unwisely but perhaps understandably took this blanket
> statement at its word, adds comments stating limits to this safety.
> 
> Signed-off-by: Paul E. McKenney <[email protected]>
> ---
> 
>  list.h |   42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
> 
> diff -urpNa -X dontdiff linux-2.6.22/include/linux/list.h linux-2.6.22-safedoc/include/linux/list.h
> --- linux-2.6.22/include/linux/list.h	2007-07-08 16:32:17.000000000 -0700
> +++ linux-2.6.22-safedoc/include/linux/list.h	2007-09-12 17:45:38.000000000 -0700
> @@ -472,6 +472,12 @@ static inline void list_splice_init_rcu(
>   * @pos:	the &struct list_head to use as a loop cursor.
>   * @n:		another &struct list_head to use as temporary storage
>   * @head:	the head for your list.
> + *
> + * Please note that this is safe only against removal by the code in

I'm not trying to be snarky but how far should we go before expecting
folks to read the macros? Depending on the answer you may also want to
mention that without additional additional code it's safe only against
removal of the list element at pos.

<snip>

Cheers,
	-Matt Helsley

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux