[PATCH] fix SAL info mutex handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Using up() on a mutex that wasn't necessarily acquired seems wrong.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

---
 arch/ia64/kernel/salinfo.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.30-rc4/arch/ia64/kernel/salinfo.c	2009-04-30 09:42:36.000000000 +0200
+++ 2.6.30-rc4-ia64-salinfo-lock/arch/ia64/kernel/salinfo.c	2009-05-04 11:31:45.000000000 +0200
@@ -192,8 +192,8 @@ struct salinfo_platform_oemdata_parms {
 static void
 salinfo_work_to_do(struct salinfo_data *data)
 {
-	down_trylock(&data->mutex);
-	up(&data->mutex);
+	if (down_trylock(&data->mutex) == 0)
+		up(&data->mutex);
 }
 
 static void



--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux