svn commit: r278598 - head/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Wed Feb 11 22:03:24 UTC 2015


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);
 	}
 }


More information about the svn-src-all mailing list