Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1224499

[PATCH 06/19] staging/lustre/lmv: fix potential null pointer dereference

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From green@linuxhacker.ru
Newsgroups linux.kernel
Subject [PATCH 06/19] staging/lustre/lmv: fix potential null pointer dereference
Date Tue, 15 Sep 2015 00:50:02 +0200
Message-ID <q8KJs-36x-11@gated-at.bofh.it> (permalink)
References <q8KJs-36x-3@gated-at.bofh.it>
X-Original-To Greg Kroah-Hartman <gregkh@linuxfoundation.org>, devel@driverdev.osuosl.org, Andreas Dilger <andreas.dilger@intel.com>
X-Mailer git-send-email 2.1.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 42
Organization linux.* mail to news gateway
X-Original-Cc Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Oleg Drokin <oleg.drokin@intel.com>
X-Original-Date Mon, 14 Sep 2015 18:41:22 -0400
X-Original-Message-ID <1442270495-1655259-7-git-send-email-green@linuxhacker.ru>
X-Original-References <1442270495-1655259-1-git-send-email-green@linuxhacker.ru>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1224499

Show key headers only | View raw


From: Oleg Drokin <oleg.drokin@intel.com>

In lmv_disconnect_mdc do procfs removal only if we actually know the name.

Reviewed-on: http://review.whamcloud.com/14605
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6517
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
 drivers/staging/lustre/lustre/lmv/lmv_obd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
index 0fc0b61..cebbacf 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
@@ -593,11 +593,11 @@ static int lmv_disconnect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
 		mdc_obd->obd_force = obd->obd_force;
 		mdc_obd->obd_fail = obd->obd_fail;
 		mdc_obd->obd_no_recov = obd->obd_no_recov;
-	}
 
-	if (lmv->lmv_tgts_kobj)
-		sysfs_remove_link(lmv->lmv_tgts_kobj,
-				  mdc_obd->obd_name);
+		if (lmv->lmv_tgts_kobj)
+			sysfs_remove_link(lmv->lmv_tgts_kobj,
+					  mdc_obd->obd_name);
+	}
 
 	rc = obd_fid_fini(tgt->ltd_exp->exp_obd);
 	if (rc)
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 06/19] staging/lustre/lmv: fix potential null pointer dereference green@linuxhacker.ru - 2015-09-15 00:50 +0200
  Re: [PATCH 06/19] staging/lustre/lmv: fix potential null pointer  dereference Trevor Woerner <twoerner@gmail.com> - 2015-09-15 15:30 +0200
    Re: [PATCH 06/19] staging/lustre/lmv: fix potential null pointer dereference Oleg Drokin <green@linuxhacker.ru> - 2015-09-15 16:00 +0200

csiph-web