svn commit: r249008 - head/sys/cam

Edward Tomasz Napierala trasz at FreeBSD.org
Tue Apr 2 09:38:05 UTC 2013


Author: trasz
Date: Tue Apr  2 09:38:04 2013
New Revision: 249008
URL: http://svnweb.freebsd.org/changeset/base/249008

Log:
  Fix panic in the error path caused by recursive acquisition of XPT topology
  lock.
  
  Reviewed by:	ken

Modified:
  head/sys/cam/cam_periph.c

Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c	Tue Apr  2 09:33:22 2013	(r249007)
+++ head/sys/cam/cam_periph.c	Tue Apr  2 09:38:04 2013	(r249008)
@@ -218,9 +218,9 @@ cam_periph_alloc(periph_ctor_t *periph_c
 	}
 	if (*p_drv == NULL) {
 		printf("cam_periph_alloc: invalid periph name '%s'\n", name);
+		xpt_unlock_buses();
 		xpt_free_path(periph->path);
 		free(periph, M_CAMPERIPH);
-		xpt_unlock_buses();
 		return (CAM_REQ_INVALID);
 	}
 	periph->unit_number = camperiphunit(*p_drv, path_id, target_id, lun_id);


More information about the svn-src-head mailing list