Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Feb 2011 02:14:53 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r218207 - head/sys/dev/aac
Message-ID:  <201102030214.p132Er6s029933@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Thu Feb  3 02:14:53 2011
New Revision: 218207
URL: http://svn.freebsd.org/changeset/base/218207

Log:
  Revert part of r173264.  Both aac_ioctl_sendfib and aac_ioctl_send_raw_srb
  make use of the aac_ioctl_event callback, if aac_alloc_command fails.  This
  can end up in an infinite loop in the while loop in aac_release_command.
  
  Further investigation into the issue mentioned by Scott Long [1] will be
  necessary.
  
  [1] http://lists.freebsd.org/pipermail/freebsd-current/2007-October/078740.html

Modified:
  head/sys/dev/aac/aac.c

Modified: head/sys/dev/aac/aac.c
==============================================================================
--- head/sys/dev/aac/aac.c	Wed Feb  2 23:59:24 2011	(r218206)
+++ head/sys/dev/aac/aac.c	Thu Feb  3 02:14:53 2011	(r218207)
@@ -1415,11 +1415,7 @@ aac_release_command(struct aac_command *
 
 	aac_enqueue_free(cm);
 
-	/*
-	 * Dequeue all events so that there's no risk of events getting
-	 * stranded.
-	 */
-	while ((event = TAILQ_FIRST(&sc->aac_ev_cmfree)) != NULL) {
+	if ((event = TAILQ_FIRST(&sc->aac_ev_cmfree)) != NULL) {
 		TAILQ_REMOVE(&sc->aac_ev_cmfree, event, ev_links);
 		event->ev_callback(sc, event, event->ev_arg);
 	}



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