From: stephen hemminger Date: Thu, 22 Jul 2010 18:45:04 +0000 (+0000) Subject: net sched: fix race in mirred device removal X-Git-Tag: v2.6.35~25^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b87956ea645fb4de7e59c7d0aa94de04be72615;p=pandora-kernel.git net sched: fix race in mirred device removal This fixes hang when target device of mirred packet classifier action is removed. If a mirror or redirection action is configured to cause packets to go to another device, the classifier holds a ref count, but was assuming the adminstrator cleaned up all redirections before removing. The fix is to add a notifier and cleanup during unregister. The new list is implicitly protected by RTNL mutex because it is held during filter add/delete as well as notifier. Signed-off-by: Stephen Hemminger Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- Reading git-diff-tree failed