mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Aloni <da-x@gmx.net>
To: linux-kernel@vger.kernel.org
Cc: trivial@rustcorp.com.au
Subject: [PATCH] fix NULL dereferencing in dcache.c
Date: Fri, 31 May 2002 19:32:19 +0300	[thread overview]
Message-ID: <20020531163219.GA27443@callisto.yi.org> (raw)

Unrelated to my first dcache patch, this is something more crucial
and should be applied first. 

fs/dcache.c:
 - handle d_alloc() returning NULL.

--- linux-2.5.19/fs/dcache.c	Thu May 30 22:35:37 2002
+++ linux-2.5.19/fs/dcache.c	Fri May 31 19:19:18 2002
@@ -755,6 +755,9 @@
 	}
 
 	tmp = d_alloc(NULL, &(const struct qstr) {"",0,0});
+	if (!tmp)
+		return NULL;
+
 	tmp->d_parent = tmp; /* make sure dput doesn't croak */
 	
 	spin_lock(&dcache_lock);


-- 
Dan Aloni
da-x@gmx.net

                 reply	other threads:[~2002-05-31 16:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020531163219.GA27443@callisto.yi.org \
    --to=da-x@gmx.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®