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>] [day] [month] [year] [list]
Date:	Wed, 28 Mar 2007 18:16:28 +0900
From:	Hisashi Hifumi <hifumi.hisashi@....ntt.co.jp>
To:	akpm@...l.org, linux-kernel@...r.kernel.org
Subject: [PATCH] replace spin_lock_irqsave with spin_lock


IRQ is already disabled through local_irq_disable().
So spin_lock_irqsave() can be replaced with spin_lock().

Thanks.

Signed-off-by :Hisashi Hifumi <hifumi.hisashi@....ntt.co.jp>

--- linux-2.6.21-rc5.org/arch/i386/kernel/reboot.c	2007-02-05 
03:44:54.000000000 +0900
+++ linux-2.6.21-rc5-test/arch/i386/kernel/reboot.c	2007-03-28 
17:57:56.000000000 +0900
@@ -197,8 +197,6 @@ static unsigned char jump_to_bios [] =
   */
  void machine_real_restart(unsigned char *code, int length)
  {
-	unsigned long flags;
-
  	local_irq_disable();

  	/* Write zero to CMOS register number 0x0f, which the BIOS POST
@@ -211,9 +209,9 @@ void machine_real_restart(unsigned char
  	   safe side.  (Yes, CMOS_WRITE does outb_p's. -  Paul G.)
  	 */

-	spin_lock_irqsave(&rtc_lock, flags);
+	spin_lock(&rtc_lock);
  	CMOS_WRITE(0x00, 0x8f);
-	spin_unlock_irqrestore(&rtc_lock, flags);
+	spin_unlock(&rtc_lock);

  	/* Remap the kernel at virtual address zero, as well as offset zero
  	   from the kernel segment.  This assumes the kernel segment starts at

-
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