From: Jeremiah Mahler <jmmahler@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: fuse-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
Jeremiah Mahler <jmmahler@gmail.com>
Subject: [PATCH] fuse: avoid clobbering fc->release with fuse_conn_init(fc)
Date: Sun, 31 May 2015 18:31:04 -0700 [thread overview]
Message-ID: <1433122264-6702-1-git-send-email-jmmahler@gmail.com> (raw)
In-Reply-To: <20150531235259.GA4620@hudson.localdomain>
fuse_conn_init(fc) zeros the entire fc structure before it assigns
specific values. Since fc->release is set before fuse_conn_init(fc)
is called, the value gets set to zero, which results in a NULL pointer
deference when fc->release() is called. Fix the problem by assigning
fc->release after calling fuse_conn_init(fc) instead of before.
Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Fixes: daccc092d1a2 ("fuse: initialize fc->release before calling it")
---
fs/fuse/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 01ff55d..2913db2 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1076,8 +1076,8 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
if (!fc)
goto err_fput;
- fc->release = fuse_free_conn;
fuse_conn_init(fc);
+ fc->release = fuse_free_conn;
fud = fuse_dev_alloc(fc);
if (!fud)
--
2.1.4
next prev parent reply other threads:[~2015-06-01 1:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-30 8:03 BUG: update-grub, unable to handle kernel NULL pointer dereference Jeremiah Mahler
2015-05-31 23:52 ` Jeremiah Mahler
2015-06-01 1:31 ` Jeremiah Mahler [this message]
2015-06-01 12:03 ` [PATCH] fuse: avoid clobbering fc->release with fuse_conn_init(fc) Miklos Szeredi
2015-06-01 17:28 ` Jeremiah Mahler
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=1433122264-6702-1-git-send-email-jmmahler@gmail.com \
--to=jmmahler@gmail.com \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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®