* [GFS2] Fix OOM error handling [3/5]
@ 2006-11-06 11:08 Steven Whitehouse
0 siblings, 0 replies; only message in thread
From: Steven Whitehouse @ 2006-11-06 11:08 UTC (permalink / raw)
To: cluster-devel, linux-kernel
>From 26d83dedf61d26d85f10bc34b92f4de7660fd746 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Mon, 30 Oct 2006 16:59:08 -0500
Subject: [PATCH] [GFS2] Fix OOM error handling
Fix the OOM error handling in inode.c where it was possible for
a NULL pointer to be dereferenced.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/inode.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 57c43ac..d470e52 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -157,6 +157,9 @@ struct inode *gfs2_inode_lookup(struct s
struct gfs2_glock *io_gl;
int error;
+ if (!inode)
+ return ERR_PTR(-ENOBUFS);
+
if (inode->i_state & I_NEW) {
struct gfs2_sbd *sdp = GFS2_SB(inode);
umode_t mode = DT2IF(type);
--
1.4.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-06 11:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-06 11:08 [GFS2] Fix OOM error handling [3/5] Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox