Monthly Archives: July 2011

Stupid RCU Tricks: RCU-Protected Deletion

Consider the following code fragment:     1 rcu_read_lock(); 2 p = rcu_dereference(gp); 3 if (must_delete(p)) { 4 spin_lock(&my_lock); 5 if (must_delete(p)) { 6 kfree_rcu(p); 7 rcu_assign_pointer(gp, q); 8 already_deleted(p); 9 } 10 spin_unlock(&my_lock); 11 } else { 12 do_something_with(p); … Continue reading

Posted in Uncategorized | Tagged , | 8 Comments

Puzzle: How many unlock paths?

I was recently at dinner with some Linux kernel hackers who were showing off their smartphones. These phones have an interesting unlock mechanism: the phone displays an 3-by-3 array of circles, and the user traces out a path among the … Continue reading

Posted in Uncategorized | Tagged | 3 Comments