ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: ceph-devel@vger.kernel.org
Cc: sage@inktank.com, dan.carpenter@oracle.com, "Yan,
	Zheng" <zheng.z.yan@intel.com>
Subject: [PATCH 2/2] ceph: fix use-after-free bug
Date: Sat, 28 Sep 2013 20:34:45 +0800	[thread overview]
Message-ID: <1380371685-11577-2-git-send-email-zheng.z.yan@intel.com> (raw)
In-Reply-To: <1380371685-11577-1-git-send-email-zheng.z.yan@intel.com>

From: "Yan, Zheng" <zheng.z.yan@intel.com>

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
 fs/ceph/inode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 6f0a35c..2ae1381 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -779,6 +779,7 @@ no_change:
 			rb_node = rb_next(rb_node);
 			rb_erase(&frag->node, &ci->i_fragtree);
 			kfree(frag);
+			frag = NULL;
 		}
 		if (!frag) {
 			frag = __get_or_create_frag(ci, id);
-- 
1.8.1.4


  reply	other threads:[~2013-09-28 12:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-28 12:34 [PATCH 1/2] ceph: check rinfo->dir_dir before dereferencing it Yan, Zheng
2013-09-28 12:34 ` Yan, Zheng [this message]
2013-09-30 21:55 ` Sage Weil

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=1380371685-11577-2-git-send-email-zheng.z.yan@intel.com \
    --to=zheng.z.yan@intel.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=sage@inktank.com \
    /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;
as well as URLs for NNTP newsgroup(s).