From: Thomas Gleixner Date: Wed, 19 Aug 2009 09:26:09 +0000 (+0200) Subject: clocksource: Protect the watchdog rating changes with clocksource_mutex X-Git-Tag: v2.6.32-rc1~168^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0981a1b21a03866c8da7f44e35e389c2e0d6061;p=pandora-kernel.git clocksource: Protect the watchdog rating changes with clocksource_mutex Martin pointed out that commit 6ea41d2529 (clocksource: Call clocksource_change_rating() outside of watchdog_lock) has a theoretical reference count problem. The calls to clocksource_change_rating() are now done outside of the clocksource mutex and outside of the watchdog lock. A concurrent clocksource_unregister() could remove the clock. Split out the code which changes the rating from clocksource_change_rating() into __clocksource_change_rating(). Protect the clocksource_watchdog_work() code sequence with the clocksource_mutex() and call __clocksource_change_rating(). LKML-Reference: Signed-off-by: Thomas Gleixner Cc: Martin Schwidefsky --- Reading git-diff-tree failed