From: Catalin Marinas Date: Fri, 18 Sep 2009 22:27:05 +0000 (+0100) Subject: Clear the exclusive monitor when returning from an exception X-Git-Tag: v2.6.32-rc1~49^2~1^2~8^2~2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=200b812d0084f800bc52465e273b118ff5f8141f;p=pandora-kernel.git Clear the exclusive monitor when returning from an exception The patch adds a CLREX or dummy STREX to the exception return path. This is needed because several atomic/locking operations use a pair of LDREX/STREXEQ and the EQ condition may not always be satisfied. This would leave the exclusive monitor status set and may cause problems with atomic/locking operations in the interrupted code. With this patch, the atomic_set() operation can be a simple STR instruction (on SMP systems, the global exclusive monitor is cleared by STR anyway). Clearing the exclusive monitor during context switch is no longer needed as this is handled by the exception return path anyway. Signed-off-by: Catalin Marinas Reported-by: Jamie Lokier --- Reading git-diff-tree failed