--------
In message <cba9c9bf-97ad-e3ae-e209-ea91e49b5...@freebsd.org>, Andriy Gapon 
writes:
>
>I've seen a situation where g_disk_done() was called on a bio after the
>corresponding disk had been already destroyed via g_disk_destroy().
>That call resulted in a crash here:
>       devstat_end_transaction_bio_bt(sc->dp->d_devstat, bp, &now);
>because sc->dp was NULL.
>
>Is it a bug that we do not check for dp being NULL (or dp->d_destroyed being
>set) in g_disk_done() ?
>Or is it a bug that a controller driver called biodone() for that bio having
>earlier called disk_destroy() ?

It is a driver bug to call disk_destroy() before purging all in-flight bios
with biodone()

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
p...@freebsd.org         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
freebsd-geom@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "freebsd-geom-unsubscr...@freebsd.org"

Reply via email to