Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2015 22:03:23 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r278598 - head/sys/cam/ctl
Message-ID:  <201502112203.t1BM3NfU048603@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Feb 11 22:03:23 2015
New Revision: 278598
URL: https://svnweb.freebsd.org/changeset/base/278598

Log:
  Do not dereference NULL clearing UA that was not set in r277917.
  
  MFC after:	3 days

Modified:
  head/sys/cam/ctl/ctl.c

Modified: head/sys/cam/ctl/ctl.c
==============================================================================
--- head/sys/cam/ctl/ctl.c	Wed Feb 11 20:51:58 2015	(r278597)
+++ head/sys/cam/ctl/ctl.c	Wed Feb 11 22:03:23 2015	(r278598)
@@ -11712,7 +11712,8 @@ ctl_clear_ua(struct ctl_softc *ctl_softc
 	STAILQ_FOREACH(lun, &ctl_softc->lun_list, links) {
 		mtx_lock(&lun->lun_lock);
 		pu = lun->pending_ua[initidx / CTL_MAX_INIT_PER_PORT];
-		pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua_type;
+		if (pu != NULL)
+			pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua_type;
 		mtx_unlock(&lun->lun_lock);
 	}
 }



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