svn commit: r256622 - projects/camlock/sys/cam

Alexander Motin mav at FreeBSD.org
Wed Oct 16 12:13:20 UTC 2013


Author: mav
Date: Wed Oct 16 12:13:20 2013
New Revision: 256622
URL: http://svnweb.freebsd.org/changeset/base/256622

Log:
  Prohibit sleeping in CAM completion threads.  We have limited number of them
  same as interrupt threads.  We don't want somebody carelessly blocked all
  CAM subsystem by arbitrary sleep.

Modified:
  projects/camlock/sys/cam/cam_xpt.c

Modified: projects/camlock/sys/cam/cam_xpt.c
==============================================================================
--- projects/camlock/sys/cam/cam_xpt.c	Wed Oct 16 11:53:03 2013	(r256621)
+++ projects/camlock/sys/cam/cam_xpt.c	Wed Oct 16 12:13:20 2013	(r256622)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/conf.h>
 #include <sys/fcntl.h>
 #include <sys/interrupt.h>
+#include <sys/proc.h>
 #include <sys/sbuf.h>
 #include <sys/smp.h>
 #include <sys/taskqueue.h>
@@ -5264,6 +5265,7 @@ xpt_done_td(void *arg)
 	STAILQ_HEAD(, ccb_hdr)	doneq;
 
 	STAILQ_INIT(&doneq);
+	THREAD_NO_SLEEPING();
 	mtx_lock(&queue->cam_doneq_mtx);
 	while (1) {
 		while (STAILQ_EMPTY(&queue->cam_doneq)) {


More information about the svn-src-projects mailing list