From: Rasmus Andersen <rasmus@jaquet.dk>
To: dhinds@zen.stanford.edu
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)
Date: Sat, 23 Jun 2001 15:22:02 +0200 [thread overview]
Message-ID: <20010623152202.B840@jaquet.dk> (raw)
Hi.
The patch below adds a kmalloc check to drivers/pcmcmia/rsrc_mgr.c.
Against 245-ac16 but aplies to 256p6 also. Reported a while back
by the stanford team.
--- linux-245-ac16-clean/drivers/pcmcia/rsrc_mgr.c Sat May 19 20:59:21 2001
+++ linux-245-ac16/drivers/pcmcia/rsrc_mgr.c Sat Jun 23 15:06:54 2001
@@ -189,6 +189,11 @@
/* First, what does a floating port look like? */
b = kmalloc(256, GFP_KERNEL);
+ if (!b) {
+ printk(" -- aborting.\n");
+ printk(KERN_ERR "Out of memory.");
+ return;
+ }
memset(b, 0, 256);
for (i = base, most = 0; i < base+num; i += 8) {
if (check_io_resource(i, 8))
--
Regards,
Rasmus(rasmus@jaquet.dk)
"The obvious mathematical breakthrough would be development of an easy way
to factor large prime numbers."
-- Bill Gates, The Road Ahead, Viking Penguin (1995)
next reply other threads:[~2001-06-23 13:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-23 13:22 Rasmus Andersen [this message]
2001-06-23 17:09 ` [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16) Eric Lammerts
2001-06-23 17:30 ` Arnaldo Carvalho de Melo
2001-06-24 19:46 ` Rasmus Andersen
2001-06-24 20:52 ` Eric Lammerts
2001-06-24 21:01 ` Rasmus Andersen
2001-06-24 21:09 ` Eric Lammerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010623152202.B840@jaquet.dk \
--to=rasmus@jaquet.dk \
--cc=dhinds@zen.stanford.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox