projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a22195
)
[GFS2] Fix OOM error handling
author
Steven Whitehouse
<swhiteho@redhat.com>
Mon, 30 Oct 2006 21:59:08 +0000
(16:59 -0500)
committer
Steven Whitehouse
<swhiteho@redhat.com>
Mon, 6 Nov 2006 13:59:42 +0000
(08:59 -0500)
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
patch
|
blob
|
blame
|
history
diff --git
a/fs/gfs2/inode.c
b/fs/gfs2/inode.c
index 57c43ac47925dfd66ff39e3fa90f7662decaeb98..d470e5286ecd7715e0804a7fc54a6e34015c7559 100644
(file)
--- a/
fs/gfs2/inode.c
+++ b/
fs/gfs2/inode.c
@@
-157,6
+157,9
@@
struct inode *gfs2_inode_lookup(struct super_block *sb, struct gfs2_inum *inum,
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);