Re: 2.6.19-rc2-mm2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
 	    }

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux