* [PATCH] 8250 PCI Serial driver not always disabling PCI device
@ 2005-07-20 7:27 Rolf Eike Beer
2005-07-20 8:03 ` Russell King
0 siblings, 1 reply; 3+ messages in thread
From: Rolf Eike Beer @ 2005-07-20 7:27 UTC (permalink / raw)
To: rmk+serial; +Cc: linux-serial
Hi,
I found that pciserial_remove_one() only disables the device if it finds
private data. This looks suspicious to me. Patch attached.
Eike
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
--- linux-2.6.13-rc3/drivers/serial/8250_pci.c 2005-07-13 06:46:46.000000000
+0200
+++ linux-2.6.13-rc3-eike/drivers/serial/8250_pci.c 2005-07-20
09:16:28.000000000 +0200
@@ -1778,10 +1778,10 @@ static void __devexit pciserial_remove_o
if (quirk->exit)
quirk->exit(dev);
- pci_disable_device(dev);
-
kfree(priv);
}
+
+ pci_disable_device(dev);
}
static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 8250 PCI Serial driver not always disabling PCI device
2005-07-20 7:27 [PATCH] 8250 PCI Serial driver not always disabling PCI device Rolf Eike Beer
@ 2005-07-20 8:03 ` Russell King
2005-07-20 8:24 ` Rolf Eike Beer
0 siblings, 1 reply; 3+ messages in thread
From: Russell King @ 2005-07-20 8:03 UTC (permalink / raw)
To: Rolf Eike Beer; +Cc: linux-serial
On Wed, Jul 20, 2005 at 09:27:05AM +0200, Rolf Eike Beer wrote:
> I found that pciserial_remove_one() only disables the device if it finds
> private data. This looks suspicious to me. Patch attached.
Makes no difference. If we don't have the private data set, then
we have errored out during the initialisation, and we disabled the
device on the way out. Moreover, the exit function won't even be
called.
So we actually have the guarantee that there will always be private
data here.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 8250 PCI Serial driver not always disabling PCI device
2005-07-20 8:03 ` Russell King
@ 2005-07-20 8:24 ` Rolf Eike Beer
0 siblings, 0 replies; 3+ messages in thread
From: Rolf Eike Beer @ 2005-07-20 8:24 UTC (permalink / raw)
To: Russell King; +Cc: linux-serial
[-- Attachment #1: Type: text/plain, Size: 767 bytes --]
Am Mittwoch, 20. Juli 2005 10:03 schrieb Russell King:
>On Wed, Jul 20, 2005 at 09:27:05AM +0200, Rolf Eike Beer wrote:
>> I found that pciserial_remove_one() only disables the device if it finds
>> private data. This looks suspicious to me. Patch attached.
>
>Makes no difference. If we don't have the private data set, then
>we have errored out during the initialisation, and we disabled the
>device on the way out. Moreover, the exit function won't even be
>called.
>
>So we actually have the guarantee that there will always be private
>data here.
In this case we should just kill the test if the private data is present. If
something is seriously wrong this will oops and not hide the bug. This is
done in other places the same way.
Eike
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-20 8:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-20 7:27 [PATCH] 8250 PCI Serial driver not always disabling PCI device Rolf Eike Beer
2005-07-20 8:03 ` Russell King
2005-07-20 8:24 ` Rolf Eike Beer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).