Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Feb 2009 10:59:48 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r189158 - in stable/7/sys: . cam contrib/pf dev/ath/ath_hal dev/cxgb
Message-ID:  <200902281059.n1SAxmV6006936@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Sat Feb 28 10:59:48 2009
New Revision: 189158
URL: http://svn.freebsd.org/changeset/base/189158

Log:
  MFC r187650:
  
  Guard against NULL pointer dereference.
  
  Reviewed by:	scottl
  Approved by:	rwatson (mentor)
  Sponsored by:	FreeBSD Foundation
  Found with:	Coverity Prevent(tm)
  CID:		1847

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/cam/cam_xpt.c
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/cam/cam_xpt.c
==============================================================================
--- stable/7/sys/cam/cam_xpt.c	Sat Feb 28 10:53:20 2009	(r189157)
+++ stable/7/sys/cam/cam_xpt.c	Sat Feb 28 10:59:48 2009	(r189158)
@@ -4177,7 +4177,10 @@ xpt_path_string(struct cam_path *path, c
 {
 	struct sbuf sb;
 
-	mtx_assert(path->bus->sim->mtx, MA_OWNED);
+#ifdef INVARIANTS
+	if (path != NULL && path->bus != NULL && path->bus->sim != NULL)
+		mtx_assert(path->bus->sim->mtx, MA_OWNED);
+#endif
 
 	sbuf_new(&sb, str, str_len, 0);
 



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