public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Driver Core patches for 2.6.6
Date: Fri, 14 May 2004 16:07:22 -0700	[thread overview]
Message-ID: <10845760423849@kroah.com> (raw)
In-Reply-To: <10845760422513@kroah.com>

ChangeSet 1.1587.5.20, 2004/05/05 14:40:43-07:00, greg@kroah.com

Driver core: handle error if we run out of memory in kmap code


 drivers/base/map.c |    7 +++++++
 1 files changed, 7 insertions(+)


diff -Nru a/drivers/base/map.c b/drivers/base/map.c
--- a/drivers/base/map.c	Fri May 14 15:57:59 2004
+++ b/drivers/base/map.c	Fri May 14 15:57:59 2004
@@ -138,6 +138,13 @@
 	struct kobj_map *p = kmalloc(sizeof(struct kobj_map), GFP_KERNEL);
 	struct probe *base = kmalloc(sizeof(struct probe), GFP_KERNEL);
 	int i;
+
+	if ((p == NULL) || (base == NULL)) {
+		kfree(p);
+		kfree(base);
+		return NULL;
+	}
+
 	memset(base, 0, sizeof(struct probe));
 	base->dev = 1;
 	base->range = ~0;


  reply	other threads:[~2004-05-14 23:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-14 23:06 [BK PATCH] Driver Core patches for 2.6.6 Greg KH
2004-05-14 23:07 ` [PATCH] " Greg KH
2004-05-14 23:07   ` Greg KH
2004-05-14 23:07     ` Greg KH
2004-05-14 23:07       ` Greg KH
2004-05-14 23:07         ` Greg KH
2004-05-14 23:07           ` Greg KH
2004-05-14 23:07             ` Greg KH
2004-05-14 23:07               ` Greg KH
2004-05-14 23:07                 ` Greg KH
2004-05-14 23:07                   ` Greg KH [this message]
2004-05-14 23:07                     ` Greg KH
2004-05-14 23:07                       ` Greg KH
2004-05-14 23:07                         ` Greg KH
2004-05-14 23:07                           ` Greg KH
2004-05-14 23:07                             ` Greg KH
2004-05-14 23:07                               ` Greg KH
2004-05-14 23:07                                 ` Greg KH
2004-05-14 23:07                                   ` Greg KH
2004-05-14 23:07                                     ` Greg KH
2004-05-14 23:24                                   ` zombies with AMD64 and 32 bit userspace with 2.6 David Lang

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=10845760423849@kroah.com \
    --to=greg@kroah.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