lkml.org 
[lkml]   [2006]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.19-rc2-mm2
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)
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);
}
\
 
 \ /
  Last update: 2006-10-20 15:33    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site