On Wed, 2007-10-03 at 22:59 +0900, Tetsuo Handa wrote:
You can indeed not sleep in an rcu_read_lock() section. However, you
could grab a reference on an item, stop the iteration, drop
rcu_read_lock. Do you thing, re-acquire rcu_read_lock(), drop the ref,
and continue the iteration.
Also, how do you avoid referencing dead data with your sll? I haven't
actually looked at your patches, but the simple scheme you outlined
didn't handle the iteration + concurrent removal scenario:
thread 1 thread 2
foo = ptr->next
< schedule >
killme = ptr->next (same item)
ptr->next = ptr->next->next;
kfree(killme)
< schedule >
foo->bar <-- *BANG*
-