Author: kib
Date: Tue Jan 25 14:00:30 2011
New Revision: 217823
URL: http://svn.freebsd.org/changeset/base/217823

Log:
  Bio shall not be accessed after g_io_deliver(9).
  
  Reported and tested by:       pho
  Reviewed by:  ae, phk
  MFC after:    1 week

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

Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c        Tue Jan 25 13:41:48 2011        (r217822)
+++ head/sys/dev/md/md.c        Tue Jan 25 14:00:30 2011        (r217823)
@@ -731,9 +731,9 @@ md_kthread(void *arg)
 
                if (error != -1) {
                        bp->bio_completed = bp->bio_length;
-                       g_io_deliver(bp, error);
                        if ((bp->bio_cmd == BIO_READ) || (bp->bio_cmd == 
BIO_WRITE))
                                devstat_end_transaction_bio(sc->devstat, bp);
+                       g_io_deliver(bp, error);
                }
        }
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to