From: Jan Beulich Date: Mon, 13 Sep 2010 10:11:05 +0000 (+0000) Subject: x86/hwmon: avoid deadlock on CPU removal in pkgtemp X-Git-Tag: v2.6.36-rc6~33^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9bca4358286584cc22f4261ee3a60cad01aa4d4;p=pandora-kernel.git x86/hwmon: avoid deadlock on CPU removal in pkgtemp pkgtemp_device_remove(), holding the list protecting mutex, calls pkgtemp_device_add(), which itself wants to acquire the same mutex. Holding the mutex over the entire loop body in pkgtemp_device_remove() isn't really necessary, as long as the loop gets exited after processing the matched CPU. Once exiting the loop after removing an eventual match, there's no need for using the "safe" list iterator anymore. Signed-off-by: Jan Beulich Cc: Fenghua Yu Signed-off-by: Guenter Roeck --- Reading git-diff-tree failed