From 1e71f10f38d2ad09ee854b7e926a63744a1883e1 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Sun, 5 Dec 2010 12:03:49 -0800 Subject: [PATCH] tunneling: Add missing rcu_dereference() to cache cleaner. The cleaner for the header caching accesses the tunnel port table without holding any locks. However, it doesn't have a read memory barrier, so there is no guarantee that the contents of the table have made it to the right CPU. Found by sparse. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- datapath/tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 271651bf..aae3f3d9 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -818,7 +818,7 @@ static void cache_cleaner(struct work_struct *work) schedule_cache_cleaner(); rcu_read_lock(); - tbl_foreach(port_table, cache_cleaner_cb, NULL); + tbl_foreach(rcu_dereference(port_table), cache_cleaner_cb, NULL); rcu_read_unlock(); } -- 2.30.2