lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1337249709-7346-1-git-send-email-yong.zhang0@gmail.com>
Date:	Thu, 17 May 2012 18:15:09 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	ralf@...ux-mips.org, david.daney@...ium.com, tglx@...utronix.de
Subject: [PATCH -rt] MIPS: Octeon: convert smp_reserve_lock to raw spinlock

From: Yong Zhang <yong.zhang@...driver.com>

Because __cpu_disable is called in atomic context and spinlock
is a mutex on -rt.

Signed-off-by: Yong Zhang <yong.zhang0@...il.com>
---
 arch/mips/cavium-octeon/smp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index ef9c34a..473c72b 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -257,7 +257,7 @@ DEFINE_PER_CPU(int, cpu_state);
 
 extern void fixup_irqs(void);
 
-static DEFINE_SPINLOCK(smp_reserve_lock);
+static DEFINE_RAW_SPINLOCK(smp_reserve_lock);
 
 static int octeon_cpu_disable(void)
 {
@@ -266,7 +266,7 @@ static int octeon_cpu_disable(void)
 	if (cpu == 0)
 		return -EBUSY;
 
-	spin_lock(&smp_reserve_lock);
+	raw_spin_lock(&smp_reserve_lock);
 
 	set_cpu_online(cpu, false);
 	cpu_clear(cpu, cpu_callin_map);
@@ -277,7 +277,7 @@ static int octeon_cpu_disable(void)
 	flush_cache_all();
 	local_flush_tlb_all();
 
-	spin_unlock(&smp_reserve_lock);
+	raw_spin_unlock(&smp_reserve_lock);
 
 	return 0;
 }
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ