Re: 2.6.19-rc2-mm2

Anton Vorontsov
2006-10-20T13:30:58Z

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

Hi,

On Fri, Oct 20, 2006 at 01:39:49PM +0200, Mariusz Kozlowski wrote:
> Hello,
>
> I installed 2.6.19-rc2-mm2 without kernel debugging options enabled first.
> The output below is what I saw when the kernel started. Then I enabled
> debugging and system hangs with oops with no trace in the logs. It is not
> easily repeatable though. It happens from time to time.
>

Is that patch helps?

> Regards,
>
> Mariusz Kozlowski

-- Anton (irc: bd2)

[-- Attachment #2: pcmcia-fix.patch --]
[-- Type: text/plain, Size: 861 bytes --]

diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index 9ad18e6..72d92b4 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -601,6 +601,10 @@ static int ds_ioctl(struct inode * inode
ret = CS_BAD_ARGS;
else {
struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function);
+ if (!p_dev) {
+ err = -ENODEV;
+ break;
+ }
ret = pccard_get_configuration_info(s, p_dev, &buf->config);
pcmcia_put_dev(p_dev);
}
@@ -632,6 +636,10 @@ static int ds_ioctl(struct inode * inode
ret = CS_BAD_ARGS;
else {
struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function);
+ if (!p_dev) {
+ err = -ENODEV;
+ break;
+ }
ret = pccard_get_status(s, p_dev, &buf->status);
pcmcia_put_dev(p_dev);
}