From: Panagiotis Issaris <panagiotis.issaris@gmail.com>
To: ipw2100-admin@linux.intel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] ipw2200: Missing kmalloc check
Date: Mon, 05 Sep 2005 04:14:10 +0200 [thread overview]
Message-ID: <1125886450.4017.14.camel@nyx> (raw)
The ipw2200 driver code in current GIT contains a kmalloc() followed by
a memset() without handling a possible memory allocation failure.
Signed-off-by: Panagiotis Issaris <panagiotis.issaris@gmail.com>
---
drivers/net/wireless/ipw2200.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
8e288419b49346fee512739acac446c951727d04
diff --git a/drivers/net/wireless/ipw2200.c
b/drivers/net/wireless/ipw2200.c
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -3976,6 +3976,10 @@ static struct ipw_rx_queue *ipw_rx_queue
int i;
rxq = (struct ipw_rx_queue *)kmalloc(sizeof(*rxq), GFP_KERNEL);
+ if (unlikely(!rxq)) {
+ IPW_ERROR("memory allocation failed\n");
+ return NULL;
+ }
memset(rxq, 0, sizeof(*rxq));
spin_lock_init(&rxq->lock);
INIT_LIST_HEAD(&rxq->rx_free);
next reply other threads:[~2005-09-05 2:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-05 2:14 Panagiotis Issaris [this message]
2005-09-05 11:53 ` [PATCH] ipw2200: Missing kmalloc check Jiri Slaby
2005-09-05 14:26 ` Takis
2005-10-28 20:57 ` Jeff Garzik
2005-11-07 18:32 ` Rolf Eike Beer
2005-11-07 20:35 ` Takis
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=1125886450.4017.14.camel@nyx \
--to=panagiotis.issaris@gmail.com \
--cc=ipw2100-admin@linux.intel.com \
--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