From: Florin Malita <fmalita@gmail.com>
To: zippel@linux-m68k.org
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] affs: possible null pointer dereference in affs_rename()
Date: Wed, 24 May 2006 00:29:16 -0400 [thread overview]
Message-ID: <4473E11C.6050305@gmail.com> (raw)
If affs_bread() fails, the exit path calls mark_buffer_dirty_inode()
with a NULL argument.
Coverity CID: 312.
Signed-off-by: Florin Malita <fmalita@gmail.com>
---
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index d4c2d63..a42143c 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -416,10 +416,9 @@ affs_rename(struct inode *old_dir, struc
return retval;
}
- retval = -EIO;
bh = affs_bread(sb, old_dentry->d_inode->i_ino);
if (!bh)
- goto done;
+ return -EIO;
/* Remove header from its parent directory. */
affs_lock_dir(old_dir);
reply other threads:[~2006-05-24 4:24 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=4473E11C.6050305@gmail.com \
--to=fmalita@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zippel@linux-m68k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.