login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
March
»
25
Re: [PATCH 16/16][BUG] PCI hotplug core: add missing lock for hotplug slot list (Not for mainline!)
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Alex Chiang
Subject:
Re: [PATCH 16/16][BUG] PCI hotplug core: add missing lock for hotplug slot list (Not for mainline!)
Date: Monday, March 24, 2008 - 8:31 pm
* Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:
quoted text
> Add missing lock for manipulating pci_hotplug_slot_list.
Nice work, thanks. I've merged it. /ac
quoted text
> > Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> > > --- > drivers/pci/hotplug/pci_hotplug_core.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > Index: linux-2.6.25-rc6/drivers/pci/hotplug/pci_hotplug_core.c > =================================================================== > --- linux-2.6.25-rc6.orig/drivers/pci/hotplug/pci_hotplug_core.c > +++ linux-2.6.25-rc6/drivers/pci/hotplug/pci_hotplug_core.c > @@ -61,6 +61,7 @@ static int debug; > ////////////////////////////////////////////////////////////////// > > static LIST_HEAD(pci_hotplug_slot_list); > +static DEFINE_SPINLOCK(pci_hotplug_slot_list_lock); > > /* these strings match up with the values in pci_bus_speed */ > static char *pci_bus_speed_strings[] = { > @@ -529,12 +530,16 @@ static struct hotplug_slot *get_slot_fro > struct hotplug_slot *slot; > struct list_head *tmp; > > + spin_lock(&pci_hotplug_slot_list_lock); > list_for_each (tmp, &pci_hotplug_slot_list) { > slot = list_entry (tmp, struct hotplug_slot, slot_list); > if (strcmp(slot->name, name) == 0) > - return slot; > + goto out; > } > - return NULL; > + slot = NULL; > +out: > + spin_unlock(&pci_hotplug_slot_list_lock); > + return slot; > } > > /** > @@ -584,7 +589,9 @@ int pci_hp_register(struct hotplug_slot > } > } > > + spin_lock(&pci_hotplug_slot_list_lock); > list_add(&slot->slot_list, &pci_hotplug_slot_list); > + spin_unlock(&pci_hotplug_slot_list_lock); > > result = fs_add_slot(pci_slot); > kobject_uevent(&pci_slot->kobj, KOBJ_ADD); > @@ -613,7 +620,9 @@ int pci_hp_deregister(struct hotplug_slo > if (temp != hotplug) > return -ENODEV; > > + spin_lock(&pci_hotplug_slot_list_lock); > list_del(&hotplug->slot_list); > + spin_unlock(&pci_hotplug_slot_list_lock); > > slot = hotplug->pci_slot; > fs_remove_slot(slot); > >
--
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 0/3, v10] PCI, ACPI: Physical PCI slot objects
, Alex Chiang
, (Tue Mar 18, 2:05 pm)
[PATCH 1/3] Construct one fakephp slot per pci slot
, Alex Chiang
, (Tue Mar 18, 2:08 pm)
[PATCH 2/3] Introduce pci_slot
, Alex Chiang
, (Tue Mar 18, 2:09 pm)
[PATCH 3/3] ACPI PCI slot detection driver
, Alex Chiang
, (Tue Mar 18, 2:09 pm)
Re: [PATCH 0/3, v10] PCI, ACPI: Physical PCI slot objects
, Matthew Wilcox
, (Tue Mar 18, 5:55 pm)
Re: [PATCH 0/3, v10] PCI, ACPI: Physical PCI slot objects
, Alex Chiang
, (Tue Mar 18, 6:52 pm)
Re: [PATCH 0/3, v10] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Tue Mar 18, 7:24 pm)
Re: [PATCH 0/3, v10] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Tue Mar 18, 7:34 pm)
Re: [PATCH 0/3, v10] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Thu Mar 20, 9:07 pm)
[PATCH 1/16][BUG] Export kobject_rename for pci_hotplug_c ...
, Kenji Kaneshige
, (Thu Mar 20, 9:09 pm)
[PATCH 2/16] ACPI pci_slot: Fix dmi table for Fujitsu PRI ...
, Kenji Kaneshige
, (Thu Mar 20, 9:10 pm)
[PATCH 3/16][BUG] ACPI pci_slot: Fix _STA evaluation (Not ...
, Kenji Kaneshige
, (Thu Mar 20, 9:11 pm)
[PATCH 4/16][BUG] PCI slot: Add missing semaphore for slo ...
, Kenji Kaneshige
, (Thu Mar 20, 9:12 pm)
[PATCH 5/16] PCI slot: Use list_head for pci slot list (N ...
, Kenji Kaneshige
, (Thu Mar 20, 9:13 pm)
[PATCH 6/16][BUG] ACPI pci_slot: Fix slot removal path (N ...
, Kenji Kaneshige
, (Thu Mar 20, 9:14 pm)
[PATCH 7/16][BUG] PCI slot: Remove compiler warnings (Not ...
, Kenji Kaneshige
, (Thu Mar 20, 9:14 pm)
[PATCH 8/16][BUG] PCI slot: Fix invalid memory access (No ...
, Kenji Kaneshige
, (Thu Mar 20, 9:15 pm)
[PATCH 9/16] PCI slot: Remove unused slot member from pci ...
, Kenji Kaneshige
, (Thu Mar 20, 9:16 pm)
[PATCH 10/16] PCI slot: Replace dbg with pr_debug (Not for ...
, Kenji Kaneshige
, (Thu Mar 20, 9:17 pm)
[PATCH 11/16] PCI slot: Remove useless release handler (No ...
, Kenji Kaneshige
, (Thu Mar 20, 9:18 pm)
[PATCH 12/16] PCI slot: Use .default_attrs for address fil ...
, Kenji Kaneshige
, (Thu Mar 20, 9:19 pm)
[PATCH 13/16] PCI slot: Fix return value of pci_create_slo ...
, Kenji Kaneshige
, (Thu Mar 20, 9:23 pm)
[PATCH 14/16] PCI slot: Change return value of pci_destroy ...
, Kenji Kaneshige
, (Thu Mar 20, 9:26 pm)
[PATCH 15/16] PCI slot: Trivial cleanups for slot.c (Not f ...
, Kenji Kaneshige
, (Thu Mar 20, 9:26 pm)
[PATCH 16/16][BUG] PCI hotplug core: add missing lock for ...
, Kenji Kaneshige
, (Thu Mar 20, 9:27 pm)
Re: [PATCH 0/3, v10] PCI, ACPI: Physical PCI slot objects
, Alex Chiang
, (Fri Mar 21, 8:53 am)
Re: [PATCH 1/16][BUG] Export kobject_rename for pci_hotpl ...
, Alex Chiang
, (Fri Mar 21, 8:56 am)
Re: [PATCH 2/16] ACPI pci_slot: Fix dmi table for Fujitsu ...
, Alex Chiang
, (Fri Mar 21, 9:04 am)
Re: [PATCH 1/16][BUG] Export kobject_rename for pci_hotpl ...
, Greg KH
, (Fri Mar 21, 9:15 am)
Re: [PATCH 3/16][BUG] ACPI pci_slot: Fix _STA evaluation ( ...
, Alex Chiang
, (Fri Mar 21, 9:17 am)
Re: [PATCH 1/16][BUG] Export kobject_rename for pci_hotpl ...
, Alex Chiang
, (Fri Mar 21, 9:45 am)
Re: [PATCH 4/16][BUG] PCI slot: Add missing semaphore for ...
, Alex Chiang
, (Fri Mar 21, 9:57 am)
Re: [PATCH 5/16] PCI slot: Use list_head for pci slot lis ...
, Alex Chiang
, (Fri Mar 21, 11:40 am)
Re: [PATCH 9/16] PCI slot: Remove unused slot member from ...
, Matthew Wilcox
, (Fri Mar 21, 12:30 pm)
Re: [PATCH 10/16] PCI slot: Replace dbg with pr_debug (Not ...
, Matthew Wilcox
, (Fri Mar 21, 12:30 pm)
Re: [PATCH 12/16] PCI slot: Use .default_attrs for address ...
, Matthew Wilcox
, (Fri Mar 21, 12:32 pm)
Re: [PATCH 14/16] PCI slot: Change return value of pci_des ...
, Matthew Wilcox
, (Fri Mar 21, 12:32 pm)
Re: [PATCH 15/16] PCI slot: Trivial cleanups for slot.c (N ...
, Matthew Wilcox
, (Fri Mar 21, 12:33 pm)
Re: [PATCH 6/16][BUG] ACPI pci_slot: Fix slot removal pat ...
, Alex Chiang
, (Fri Mar 21, 12:42 pm)
Re: [PATCH 7/16][BUG] PCI slot: Remove compiler warnings ( ...
, Alex Chiang
, (Fri Mar 21, 1:01 pm)
Re: [PATCH 8/16][BUG] PCI slot: Fix invalid memory access ...
, Alex Chiang
, (Fri Mar 21, 1:01 pm)
Re: [PATCH 10/16] PCI slot: Replace dbg with pr_debug (Not ...
, Alex Chiang
, (Fri Mar 21, 1:02 pm)
Re: [PATCH 9/16] PCI slot: Remove unused slot member from ...
, Alex Chiang
, (Mon Mar 24, 1:29 pm)
Re: [PATCH 11/16] PCI slot: Remove useless release handler ...
, Alex Chiang
, (Mon Mar 24, 8:08 pm)
Re: [PATCH 12/16] PCI slot: Use .default_attrs for address ...
, Alex Chiang
, (Mon Mar 24, 8:31 pm)
Re: [PATCH 13/16] PCI slot: Fix return value of pci_create ...
, Alex Chiang
, (Mon Mar 24, 8:31 pm)
Re: [PATCH 14/16] PCI slot: Change return value of pci_des ...
, Alex Chiang
, (Mon Mar 24, 8:31 pm)
Re: [PATCH 15/16] PCI slot: Trivial cleanups for slot.c (N ...
, Alex Chiang
, (Mon Mar 24, 8:31 pm)
Re: [PATCH 16/16][BUG] PCI hotplug core: add missing lock ...
, Alex Chiang
, (Mon Mar 24, 8:31 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Mel Gorman
Re: [PATCH 1/4] vmstat: remove zone->lock from walk_zones_in_node
Guenter Roeck
Re: [lm-sensors] Location for thermal drivers
David Woodhouse
Re: RFC: Moving firmware blobs out of the kernel.
Siddha, Suresh B
Re: [PATCH 2.6.21 review I] [11/25] x86: default to physical mode on hotplug CPU k...
Peter Zijlstra
Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)
git-commits-head
:
Linux Kernel Mailing List
[MIPS] Fix potential latency problem due to non-atomic cpu_wait.
Linux Kernel Mailing List
USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS
Linux Kernel Mailing List
lib/vsprintf.c: fix bug omitting minus sign of numbers (module_param)
Linux Kernel Mailing List
[Bluetooth] Initiate authentication during connection establishment
Linux Kernel Mailing List
[POWERPC] 4xx: Add ppc40x_defconfig
linux-netdev
:
MERCEDES
Your mail id has won 950,000.00 in the MERCEDES Benz Online Promo.for claims send:
David Miller
Re: [PATCH] xen/netfront: do not mark packets of length < MSS as GSO
David Miller
Re: skb_segment() questions
Shan Wei
[RFC PATCH net-next 2/5]IPv6:netfilter: Send an ICMPv6 "Fragment Reassembly Timeou...
Stanislaw Gruszka
[PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations
git
:
Nicolas Sebrecht
git-svn died of signal 11 (was "3 failures on test t9100 (svn)")
Junio C Hamano
Re: [PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
Martin Langhoff
Re: [PATCH] GIT commit statistics.
Alexandre Julliard
[PATCH] gitweb: Put back shortlog instead of graphiclog in the project list.
Josh Triplett
[PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
openbsd-misc
:
Taisto Qvist XX
Re: AMD GEODE LX-800 just works with kernel from install42.iso and kernelpanics wi...
Nico Meijer
Re: gOS Develop Kit with VIA pc-1 Processor Platform VIA C7-D
Andreas Bihlmaier
Re: jetway board sensors (Fintek F71805F)
admin
Drive a 2009 car from R799p/m
Antti Harri
Re: how to create a sha256 hash
Colocation donated by:
Syndicate