From: Eric Dumazet Date: Tue, 5 Jun 2012 03:00:18 +0000 (+0000) Subject: inetpeer: fix a race in inetpeer_gc_worker() X-Git-Tag: v3.5-rc3~22^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55432d2b543a4b6dfae54f5c432a566877a85d90;p=pandora-kernel.git inetpeer: fix a race in inetpeer_gc_worker() commit 5faa5df1fa2024 (inetpeer: Invalidate the inetpeer tree along with the routing cache) added a race : Before freeing an inetpeer, we must respect a RCU grace period, and make sure no user will attempt to increase refcnt. inetpeer_invalidate_tree() waits for a RCU grace period before inserting inetpeer tree into gc_list and waking the worker. At that time, no concurrent lookup can find a inetpeer in this tree. Signed-off-by: Eric Dumazet Cc: Steffen Klassert Acked-by: Steffen Klassert Signed-off-by: David S. Miller --- Reading git-diff-tree failed