summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2011-01-25 14:00:30 +0000
committerkib <kib@FreeBSD.org>2011-01-25 14:00:30 +0000
commit25f8e1e95f70a4292a8c2da783c0ce5dd0b6c3a1 (patch)
tree4ccf48ba8abc2882ea592fc930876fa350339487
parent72db8e56861a54e3d2ddfca3de0f5a7354e1df2f (diff)
downloadFreeBSD-src-25f8e1e95f70a4292a8c2da783c0ce5dd0b6c3a1.zip
FreeBSD-src-25f8e1e95f70a4292a8c2da783c0ce5dd0b6c3a1.tar.gz
Bio shall not be accessed after g_io_deliver(9).
Reported and tested by: pho Reviewed by: ae, phk MFC after: 1 week
-rw-r--r--sys/dev/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 835ec1a..c04f2a7 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -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);
}
}
}
OpenPOWER on IntegriCloud