From: Mahesh Salgaonkar Date: Thu, 21 Jan 2010 12:55:16 +0000 (+0530) Subject: hw_breakpoints: Release the bp slot if arch_validate_hwbkpt_settings() fails. X-Git-Tag: v2.6.33-rc7~49^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b23ff0e9330e4b11e18af984d50573598e10e7f9;p=pandora-kernel.git hw_breakpoints: Release the bp slot if arch_validate_hwbkpt_settings() fails. On a given architecture, when hardware breakpoint registration fails due to un-supported access type (read/write/execute), we lose the bp slot since register_perf_hw_breakpoint() does not release the bp slot on failure. Hence, any subsequent hardware breakpoint registration starts failing with 'no space left on device' error. This patch introduces error handling in register_perf_hw_breakpoint() function and releases bp slot on error. Signed-off-by: Mahesh Salgaonkar Cc: Ananth N Mavinakayanahalli Cc: K. Prasad Cc: Maneesh Soni LKML-Reference: <20100121125516.GA32521@in.ibm.com> Signed-off-by: Frederic Weisbecker --- Reading git-diff-tree failed