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
| ||
|
Message-Id: <1192670742.12879.5.camel@pasglop> Date: Thu, 18 Oct 2007 11:25:42 +1000 From: Benjamin Herrenschmidt <benh@...nel.crashing.org> To: Linus Torvalds <torvalds@...ux-foundation.org> Cc: akpm <akpm@...ux-foundation.org>, Linux Kernel list <linux-kernel@...r.kernel.org>, linuxppc-dev list <linuxppc-dev@...abs.org> Subject: [PATCH] synchronize_irq needs a barrier synchronize_irq needs at the very least a compiler barrier and a read barrier on SMP, but there are enough cases around where a write barrier is also needed and it's not a hot path so I prefer using a full smp_mb() here. It will degrade to a compiler barrier on !SMP. Signed-off-by: Benjamin Herrenschmidt <benh@...nel.crashing.org> --- Index: linux-work/kernel/irq/manage.c =================================================================== --- linux-work.orig/kernel/irq/manage.c 2007-10-18 11:22:16.000000000 +1000 +++ linux-work/kernel/irq/manage.c 2007-10-18 11:22:20.000000000 +1000 @@ -33,6 +33,7 @@ void synchronize_irq(unsigned int irq) if (irq >= NR_IRQS) return; + smp_mb(); while (desc->status & IRQ_INPROGRESS) cpu_relax(); } - 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