From mboxrd@z Thu Jan 1 00:00:00 1970 From: linas@austin.ibm.com Date: Thu, 03 Jun 2004 18:50:44 +0000 Subject: Re: hotplug remove vs. device driver close Message-Id: <20040603135044.E17544@forte.austin.ibm.com> List-Id: References: <20040602181455.C17544@forte.austin.ibm.com> In-Reply-To: <20040602181455.C17544@forte.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, Jun 03, 2004 at 09:20:20AM -0700, Greg KH wrote: > On Thu, Jun 03, 2004 at 11:40:04AM +1000, Anton Blanchard wrote: > > > > > > We are hitting a situation where we are hot-plug removing a pci card > > > > before closing the device driver. This seems to lead to kernel > > > > memory leaks if not outright crashes. I'm trying to understand what > > > > the correct solution to this is supposed to be. > > > > > > To paraphrase from the PCI Hotplug spec, "DO NOT DO THAT!" > > > > How do you currently guarantee this on cardbus? > > We make no such guarantee. As I stated, the Cardbus/PCMCIA handle this > quite easily, so it is pretty simple to fix up a PCI driver to also > handle this. > > But the main answer is that the PCI Hotplug spec states that the OS does > NOT have to protect for this happening to regular PCI devices. So if I understand what you are saying: if the OS crashes because of a sysadmin error or a script error during pci hotplug remove, that's considered OK? I understand why the PCI spec would say that: they have no desire to over-burden already struggling OS developers: the PCI spec committee probably thinks in terms of "provide function not policy". That's normal and as it should be. But in the five-9's world of high availability, automatic failover, etc. etc. this sure sounds like a great way of putting executives on a warpath. I humbly suggest that the Linux kernel policy should be that we do better than th PCI spec, and attempt minimize damage due to operator error. If not all drivers or tools or subsystems adhere to this policy, so be it, but robustness should be a goal. --linas ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel