Fix use-after-free that sometimes results in a garbage returned

instead of right error code after requests to SINGLE/CONCAT volumes, f.e:

# dd if=/dev/raid/r0 bs=512 of=/dev/null
dd: /dev/raid/r0: Unknown error: -559038242

Reviewed by:	avg (mentor), mav (mentor)
MFC after:	3 days
This commit is contained in:
Eugene Grosbein 2017-12-07 05:55:18 +00:00
parent f53d97231b
commit 01a51aba38

View File

@ -341,7 +341,7 @@ g_raid_tr_iodone_concat(struct g_raid_tr_object *tr,
pbp->bio_inbed++;
if (pbp->bio_children == pbp->bio_inbed) {
pbp->bio_completed = pbp->bio_length;
g_raid_iodone(pbp, bp->bio_error);
g_raid_iodone(pbp, pbp->bio_error);
}
}