From: Eric Sesterhenn <snakebyte@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: joel.becker@oracle.com
Subject: [Patch] Possible NULL pointer dereference in fs/configfs/dir.c
Date: Thu, 23 Mar 2006 00:05:29 +0100 [thread overview]
Message-ID: <1143068729.27276.1.camel@alice> (raw)
hi,
this fixes coverity bug #845, if group is NULL,
we dereference it when setting up dentry.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.16/fs/configfs/dir.c.orig 2006-03-23 00:02:23.000000000 +0100
+++ linux-2.6.16/fs/configfs/dir.c 2006-03-23 00:03:49.000000000 +0100
@@ -500,7 +500,7 @@ static int create_default_group(struct c
static int populate_groups(struct config_group *group)
{
struct config_group *new_group;
- struct dentry *dentry = group->cg_item.ci_dentry;
+ struct dentry *dentry;
int ret = 0;
int i;
@@ -512,6 +512,8 @@ static int populate_groups(struct config
* parent to find us, let alone mess with our tree.
* That said, taking our i_mutex is closer to mkdir
* emulation, and shouldn't hurt. */
+ dentry = group->cg_item.ci_dentry;
+
mutex_lock(&dentry->d_inode->i_mutex);
for (i = 0; group->default_groups[i]; i++) {
next reply other threads:[~2006-03-22 23:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-22 23:05 Eric Sesterhenn [this message]
2006-03-22 23:27 ` [Patch] Possible NULL pointer dereference in fs/configfs/dir.c Joel Becker
2006-03-22 23:36 ` Eric Sesterhenn
2006-03-22 23:57 ` Joel Becker
2006-03-25 16:59 ` Adrian Bunk
2006-03-25 16:57 ` Adrian Bunk
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=1143068729.27276.1.camel@alice \
--to=snakebyte@gmx.de \
--cc=joel.becker@oracle.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