login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
June
»
10
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Kenji Kaneshige
Subject:
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
Date: Monday, June 9, 2008 - 8:12 pm
Kenji Kaneshige wrote:
quoted text
> Alex Chiang wrote: >> * Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:
(snip.)
quoted text
> Thank you for explanation. I understood. > > But I have one concern about the behavior when pci slot driver is not > loaded. My patch (a86161b3134465f) prevents the kernel trace dump > because of duplicate kobject add that would happen in the following two > cases, though (b) is not described in the header of the patch (sorry). > > (a) multiple driver attempt to handle the same slot. > > (b) one or more driver attempt to register multiple slots with the > same name (This can happen if broken platform assigns the same > slot number to multiple hotplug slots, for example). > > With your patch, duplicate kobject add in case (b) is not prevented. > That is my concern. > > I made a below patch to prevent (b), please take a look. And could you > please consider merging it to "[PATCH 2/3] Introduce pci_slot" in your > latest series. > > Thanks, > Kenji Kaneshige > > > --- > drivers/pci/hotplug/pci_hotplug_core.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > Index: 20080610/drivers/pci/hotplug/pci_hotplug_core.c > =================================================================== > --- 20080610.orig/drivers/pci/hotplug/pci_hotplug_core.c > +++ 20080610/drivers/pci/hotplug/pci_hotplug_core.c > @@ -555,6 +555,7 @@ int pci_hp_register(struct hotplug_slot > { > int result; > struct pci_slot *pci_slot; > + struct hotplug_slot *tmp; > > if (slot == NULL) > return -ENODEV; > @@ -567,6 +568,21 @@ int pci_hp_register(struct hotplug_slot > } > > /* > + * Prevent registering multiple hotplug slots with the same name. > + */ > + spin_lock(&pci_hotplug_slot_list_lock); > + list_for_each_entry(tmp, &pci_hotplug_slot_list, slot_list) { > + pci_slot = tmp->pci_slot; > + if (pci_slot->bus == bus && pci_slot->number == slot_nr) > + continue; > + if (!strcmp(tmp->name, slot->name)) { > + spin_unlock(&pci_hotplug_slot_list_lock); > + return -EEXIST; > + } > + } > + spin_unlock(&pci_hotplug_slot_list_lock); > + > + /* > * No problems if we call this interface from both ACPI_PCI_SLOT > * driver and call it here again. If we've already created the > * pci_slot, the interface will simply bump the refcount. > >
Please note that I made this patch against linux-next with your latest three patches applied. Thanks, Kenji Kaneshige --
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/4, v14] PCI, ACPI: Physical PCI slot objects
, Alex Chiang
, (Wed Jun 4, 1:08 pm)
[PATCH] fakephp: Construct one fakephp slot per PCI slot
, Alex Chiang
, (Wed Jun 4, 1:14 pm)
[PATCH] kobject: Export kobject_rename for pci_hotplug_core
, Alex Chiang
, (Wed Jun 4, 1:16 pm)
[PATCH] PCI: Introduce pci_slot
, Alex Chiang
, (Wed Jun 4, 1:16 pm)
[PATCH] ACPI: PCI slot detection driver
, Alex Chiang
, (Wed Jun 4, 1:18 pm)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ...
, Greg KH
, (Wed Jun 4, 4:55 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Wed Jun 4, 7:32 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Alex Chiang
, (Wed Jun 4, 8:07 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Wed Jun 4, 8:20 pm)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ...
, Andrew Morton
, (Wed Jun 4, 10:48 pm)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ...
, Kenji Kaneshige
, (Wed Jun 4, 11:05 pm)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ...
, Andrew Morton
, (Wed Jun 4, 11:33 pm)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ...
, Alex Chiang
, (Thu Jun 5, 8:11 am)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ...
, Benjamin Herrenschmidt
, (Thu Jun 5, 9:07 pm)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ...
, Alex Chiang
, (Thu Jun 5, 9:51 pm)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ...
, Benjamin Herrenschmidt
, (Fri Jun 6, 4:20 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Mon Jun 9, 1:08 am)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Alex Chiang
, (Mon Jun 9, 3:11 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Mon Jun 9, 8:04 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Mon Jun 9, 8:12 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Alex Chiang
, (Tue Jun 10, 10:34 am)
Re: [PATCH] ACPI: PCI slot detection driver
, Len Brown
, (Tue Jun 10, 11:24 am)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Jesse Barnes
, (Tue Jun 10, 12:24 pm)
Re: [PATCH] ACPI: PCI slot detection driver
, Alex Chiang
, (Tue Jun 10, 2:17 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Alex Chiang
, (Tue Jun 10, 2:19 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Tue Jun 10, 6:48 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Alex Chiang
, (Tue Jun 10, 7:53 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects
, Kenji Kaneshige
, (Tue Jun 10, 11:29 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Chuck Ebbert
Re: PCI: Unable to reserve mem region problem
Linus Torvalds
Linux 2.6.34-rc4
Mingming Cao
Re: [RFC 1/4] Large Blocksize support for Ext2/3/4
git
:
Ralf Wildenhues
[PATCH] Fix typos in the documentation
Len Brown
Re: fatal: unable to create '.git/index': File exists
Adeodato
Bazaar's patience diff as GIT_EXTERNAL_DIFF
Denis Bueno
Git clone error
Johannes Schindelin
Re: [PATCH 2/4] Add functions get_relative_cwd() and is_inside_dir()
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
V4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630. - set the color ga...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Sam Fourman Jr.
Re: Help with Altell PC6700
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
linux-netdev
:
Kurt Van Dijck
Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
David Miller
Re: [PATCH v2] net: typos in comments in include/linux/igmp.h
Colocation donated by:
Syndicate