public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rsrc_mgr.c - null ptr fix for 2.4.4
@ 2001-05-24  7:35 Praveen Srinivasan
  2001-05-24  8:29 ` Seiichi Nakashima
  2001-05-24 16:09 ` David Hinds
  0 siblings, 2 replies; 3+ messages in thread
From: Praveen Srinivasan @ 2001-05-24  7:35 UTC (permalink / raw)
  To: torvalds; +Cc: dhinds, linux-kernel, alan

Hi,
This fixes an unchecked ptr bug in the resource manager code for the PCMCIA 
driver (rsrc_mgr.c).

Praveen Srinivasan and Frederick Akalin

--- ../linux/./drivers/pcmcia/rsrc_mgr.c	Tue Mar  6 19:28:32 2001
+++ ./drivers/pcmcia/rsrc_mgr.c	Mon May  7 22:09:09 2001
@@ -189,6 +189,11 @@
     
     /* First, what does a floating port look like? */
     b = kmalloc(256, GFP_KERNEL);
+
+    if(b == NULL){
+      return;
+    }
+
     memset(b, 0, 256);
     for (i = base, most = 0; i < base+num; i += 8) {
 	if (check_io_resource(i, 8))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rsrc_mgr.c - null ptr fix for 2.4.4
  2001-05-24  7:35 [PATCH] rsrc_mgr.c - null ptr fix for 2.4.4 Praveen Srinivasan
@ 2001-05-24  8:29 ` Seiichi Nakashima
  2001-05-24 16:09 ` David Hinds
  1 sibling, 0 replies; 3+ messages in thread
From: Seiichi Nakashima @ 2001-05-24  8:29 UTC (permalink / raw)
  To: linux-kernel

Now, I found that many null ptr fix add in linux-2.4.4.
Do other kernels ( 2.2.x or 2.0.x ) affect them. 

Praveen Srinivasan wrote
>Hi,
>This fixes an unchecked ptr bug in the resource manager code for the PCMCIA 
>driver (rsrc_mgr.c).
>
>Praveen Srinivasan and Frederick Akalin
>

------------------------------
 Name   : Seiichi Nakashima
 E-Mail : nakasei@msynet.gr.jp
------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rsrc_mgr.c - null ptr fix for 2.4.4
  2001-05-24  7:35 [PATCH] rsrc_mgr.c - null ptr fix for 2.4.4 Praveen Srinivasan
  2001-05-24  8:29 ` Seiichi Nakashima
@ 2001-05-24 16:09 ` David Hinds
  1 sibling, 0 replies; 3+ messages in thread
From: David Hinds @ 2001-05-24 16:09 UTC (permalink / raw)
  To: Praveen Srinivasan, torvalds; +Cc: linux-kernel, alan

On Thu, May 24, 2001 at 12:35:17AM -0700, Praveen Srinivasan wrote:
> Hi,
> This fixes an unchecked ptr bug in the resource manager code for the PCMCIA 
> driver (rsrc_mgr.c).

I would instead suggest:

--- ../linux/./drivers/pcmcia/rsrc_mgr.c	Tue Mar  6 19:28:32 2001
+++ ./drivers/pcmcia/rsrc_mgr.c	Mon May  7 22:09:09 2001
@@ -189,6 +189,12 @@
     
     /* First, what does a floating port look like? */
     b = kmalloc(256, GFP_KERNEL);
+
+    if(b == NULL){
+      printk(" kmalloc failed!\n");
+      return;
+    }
+
     memset(b, 0, 256);
     for (i = base, most = 0; i < base+num; i += 8) {
 	if (check_io_resource(i, 8))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-24 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-24  7:35 [PATCH] rsrc_mgr.c - null ptr fix for 2.4.4 Praveen Srinivasan
2001-05-24  8:29 ` Seiichi Nakashima
2001-05-24 16:09 ` David Hinds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox