login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
19
Re: [PATCH] synchronize_irq needs a barrier
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Benjamin Herrenschmidt
Subject:
Re: [PATCH] synchronize_irq needs a barrier
Date: Thursday, October 18, 2007 - 9:58 pm
On Fri, 2007-10-19 at 12:48 +0800, Herbert Xu wrote:
quoted text
> [IRQ]: Fix synchronize_irq races with IRQ handler > > As it is some callers of synchronize_irq rely on memory barriers > to provide synchronisation against the IRQ handlers. For example, > the tg3 driver does > > tp->irq_sync = 1; > smp_mb(); > synchronize_irq(); > > and then in the IRQ handler: > > if (!tp->irq_sync) > netif_rx_schedule(dev, &tp->napi); > > Unfortunately memory barriers only work well when they come in > pairs. Because we don't actually have memory barriers on the > IRQ path, the memory barrier before the synchronize_irq() doesn't > actually protect us. > > In particular, synchronize_irq() may return followed by the > result of netif_rx_schedule being made visible. > > This patch (mostly written by Linus) fixes this by using spin > locks instead of memory barries on the synchronize_irq() path. > > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Good for me. Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cheers, Ben. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Wed Oct 17, 6:25 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Andrew Morton
, (Wed Oct 17, 6:45 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Wed Oct 17, 6:55 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Linus Torvalds
, (Wed Oct 17, 7:12 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Wed Oct 17, 7:40 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Wed Oct 17, 7:57 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Herbert Xu
, (Thu Oct 18, 7:35 am)
Re: [PATCH] synchronize_irq needs a barrier
, Herbert Xu
, (Thu Oct 18, 7:56 am)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Thu Oct 18, 2:35 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Thu Oct 18, 3:05 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Linus Torvalds
, (Thu Oct 18, 3:52 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Thu Oct 18, 4:17 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Linus Torvalds
, (Thu Oct 18, 4:39 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Thu Oct 18, 4:52 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Herbert Xu
, (Thu Oct 18, 7:32 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Nick Piggin
, (Thu Oct 18, 7:52 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Linus Torvalds
, (Thu Oct 18, 7:55 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Linus Torvalds
, (Thu Oct 18, 8:26 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Herbert Xu
, (Thu Oct 18, 8:28 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Thu Oct 18, 9:11 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Herbert Xu
, (Thu Oct 18, 9:20 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Thu Oct 18, 9:26 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Thu Oct 18, 9:29 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Thu Oct 18, 9:35 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Herbert Xu
, (Thu Oct 18, 9:48 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Nick Piggin
, (Thu Oct 18, 9:49 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Thu Oct 18, 9:58 pm)
[NET]: Fix possible dev_deactivate race condition
, Herbert Xu
, (Thu Oct 18, 10:36 pm)
Re: [NET]: Fix possible dev_deactivate race condition
, David Miller
, (Thu Oct 18, 10:38 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Herbert Xu
, (Thu Oct 18, 10:53 pm)
Re: [NET]: Fix possible dev_deactivate race condition
, Peter Zijlstra
, (Fri Oct 19, 12:35 am)
Re: [NET]: Fix possible dev_deactivate race condition
, Herbert Xu
, (Fri Oct 19, 2:29 am)
Re: [PATCH] synchronize_irq needs a barrier
, Maxim Levitsky
, (Fri Oct 19, 7:02 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Linus Torvalds
, (Fri Oct 19, 7:25 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Maxim Levitsky
, (Fri Oct 19, 8:10 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Herbert Xu
, (Fri Oct 19, 8:37 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Fri Oct 19, 8:56 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Fri Oct 19, 9:04 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Fri Oct 19, 9:06 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Fri Oct 19, 9:09 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Maxim Levitsky
, (Fri Oct 19, 9:24 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Fri Oct 19, 10:04 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Maxim Levitsky
, (Fri Oct 19, 10:36 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Fri Oct 19, 10:46 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Maxim Levitsky
, (Fri Oct 19, 11:06 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Fri Oct 19, 11:13 pm)
Re: [PATCH] synchronize_irq needs a barrier
, Benjamin Herrenschmidt
, (Sun Oct 21, 2:10 pm)
[IRQ]: Fix synchronize_irq races with IRQ handler
, Herbert Xu
, (Mon Oct 22, 8:26 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate