On Thu, Jun 12, 2003 at 09:18:11AM -0700, Linus Torvalds wrote:
>
> On Thu, 12 Jun 2003, Linus Torvalds wrote:
> >
> > If you depend on not re-initializing the pointers, you should not use the
> > "xxx_del()" function, and you should document it.
>
> Besides, the code doesn't actually depend on not re-initializing the
> pointers, it depends on the _forward_ pointers still being walkable in
> case some other CPU is traversing the list just as we remove the entry.
>
> Which means that I think the proper patch is to (a) document this and also
> (b) poison the back pointer.
That should work. However, I do have once concern. At the generic
list macro level, we don't know if the lockfree traversal is being
done in forward or backward direction. So, I am not sure if
list_del_rcu() should poison the backward pointer or atleast
document the fact that RCU-based traversal would not work on
backward pointers. hlist_del_rcu() can indeed poison pprev.
>
> A patch like the attached, in short.
Since we are at it, I can submit a patch documenting the rest of
hlist functions, if you like.
Thanks
Dipankar
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:32 EST