Re: [PATCH 0/7] Fixups for duplicate slot names

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Kenji Kaneshige <kaneshige.kenji@...>
Cc: Matthew Wilcox <matthew@...>, Pierre Ossman <drzeus-list@...>, Jesse Barnes <jbarnes@...>, LKML <linux-kernel@...>, <linux-pci@...>
Date: Thursday, August 7, 2008 - 1:25 pm

* Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:

Hm, I didn't think this would be a problem. The sequence is:

	- controller allocates memory for slot name
	- if core detects a collision:
		- it frees the name
		- it allocates new memory for name
		- it assigns that memory to the name parameter
	- controller->release will eventually free the name

So it shouldn't matter if the core frees the original name
pointer and allocates new memory, because the core will change
the pointer for the controller.

This is why I had to change the interface of pci_create_slot()
from taking a const char *name to a char *name.

Is there something I'm missing?

/ac

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/7] Fixups for duplicate slot names, Alex Chiang, (Wed Aug 6, 1:07 am)
Re: [PATCH 0/7] Fixups for duplicate slot names, Kenji Kaneshige, (Thu Aug 7, 4:43 am)
Re: [PATCH 0/7] Fixups for duplicate slot names, Alex Chiang, (Thu Aug 7, 1:25 pm)
Re: [PATCH 0/7] Fixups for duplicate slot names, Kenji Kaneshige, (Sun Aug 10, 9:19 pm)