From: Akinobu Mita Date: Thu, 18 Oct 2007 10:05:16 +0000 (-0700) Subject: cpu hotplug: intel_cacheinfo: fix cpu hotplug error handling X-Git-Tag: v2.6.24-rc1~404 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef1d7151d2901295278d5aada39c547ed8601419;p=pandora-kernel.git cpu hotplug: intel_cacheinfo: fix cpu hotplug error handling - Fix resource leakage in error case within detect_cache_attributes() - Don't register hotcpu notifier when cache_add_dev() returns error - Introduce cache_dev_map cpumask to track whether cache interface for CPU is successfully added by cache_add_dev() or not. cache_add_dev() may fail with out of memory error. In order to avoid cache_remove_dev() with that uninitialized cache interface when CPU_DEAD event is delivered we need to have the cache_dev_map cpumask. (We cannot change cache_add_dev() from CPU_ONLINE event handler to CPU_UP_PREPARE event handler. Because cache_add_dev() needs to do cpuid and store the results with its CPU online.) [nix.or.die@googlemail.com: fix a section mismatch warning] Cc: Ashok Raj Signed-off-by: Akinobu Mita Cc: Gautham R Shenoy Cc: Oleg Nesterov Cc: Andi Kleen Cc: Jan Beulich Signed-off-by: Gabriel Craciunescu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed