Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jun 2010 03:59:07 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r209278 - stable/8/sys/geom/multipath
Message-ID:  <201006180359.o5I3x7dt041257@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Fri Jun 18 03:59:07 2010
New Revision: 209278
URL: http://svn.freebsd.org/changeset/base/209278

Log:
  This is an MFC of 208082
  
  Make sure to check that the active provider pointer points to something before
  dereferencing the pointer.

Modified:
  stable/8/sys/geom/multipath/g_multipath.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/geom/multipath/g_multipath.c
==============================================================================
--- stable/8/sys/geom/multipath/g_multipath.c	Fri Jun 18 03:31:33 2010	(r209277)
+++ stable/8/sys/geom/multipath/g_multipath.c	Fri Jun 18 03:59:07 2010	(r209278)
@@ -795,7 +795,7 @@ g_multipath_ctl_getactive(struct gctl_re
 		return;
 	}
 	sc = gp->softc;
-	if (sc->cp_active) {
+	if (sc->cp_active && sc->cp_active->provider) {
 		sbuf_printf(sb, "%s\n", sc->cp_active->provider->name);
 	} else {
 		sbuf_printf(sb, "none\n");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006180359.o5I3x7dt041257>