svn commit: r256834 - projects/camlock/sys/cam/ata

Alexander Motin mav at FreeBSD.org
Mon Oct 21 08:37:18 UTC 2013


Author: mav
Date: Mon Oct 21 08:37:17 2013
New Revision: 256834
URL: http://svnweb.freebsd.org/changeset/base/256834

Log:
  Don't access BIO pointer after we called bio_done().

Modified:
  projects/camlock/sys/cam/ata/ata_da.c

Modified: projects/camlock/sys/cam/ata/ata_da.c
==============================================================================
--- projects/camlock/sys/cam/ata/ata_da.c	Mon Oct 21 07:58:37 2013	(r256833)
+++ projects/camlock/sys/cam/ata/ata_da.c	Mon Oct 21 08:37:17 2013	(r256834)
@@ -1755,8 +1755,8 @@ adadone(struct cam_periph *periph, union
 			cam_periph_unlock(periph);
 			while ((bp1 = TAILQ_FIRST(&queue)) != NULL) {
 				TAILQ_REMOVE(&queue, bp1, bio_queue);
-				bp1->bio_error = bp->bio_error;
-				if (bp->bio_flags & BIO_ERROR) {
+				bp1->bio_error = error;
+				if (error != 0) {
 					bp1->bio_flags |= BIO_ERROR;
 					bp1->bio_resid = bp1->bio_bcount;
 				} else


More information about the svn-src-projects mailing list