From patchwork Sat Sep 28 12:34:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 2957781 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 35C9E9F288 for ; Sat, 28 Sep 2013 12:35:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 878E12034A for ; Sat, 28 Sep 2013 12:35:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BC9F52024A for ; Sat, 28 Sep 2013 12:35:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753578Ab3I1Mf0 (ORCPT ); Sat, 28 Sep 2013 08:35:26 -0400 Received: from mga14.intel.com ([143.182.124.37]:53954 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753535Ab3I1MfQ (ORCPT ); Sat, 28 Sep 2013 08:35:16 -0400 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 28 Sep 2013 05:35:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,999,1371106800"; d="scan'208";a="300491724" Received: from unknown (HELO zyan5-mobl.ccr.corp.intel.com) ([10.255.20.216]) by AZSMGA002.ch.intel.com with ESMTP; 28 Sep 2013 05:34:54 -0700 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org Cc: sage@inktank.com, dan.carpenter@oracle.com, "Yan, Zheng" Subject: [PATCH 2/2] ceph: fix use-after-free bug Date: Sat, 28 Sep 2013 20:34:45 +0800 Message-Id: <1380371685-11577-2-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1380371685-11577-1-git-send-email-zheng.z.yan@intel.com> References: <1380371685-11577-1-git-send-email-zheng.z.yan@intel.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Yan, Zheng" Signed-off-by: Yan, Zheng --- 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);