This is always a bug, driver processes same buf twice. It can do harm. If the buf is reused for some other I/O, system can fail to store data, or claim to read data when it didn't.
Can you give full backtrace? Jaromir 2018-08-06 17:56 GMT+02:00 Emmanuel Dreyfus <m...@netbsd.org>: > Hello > > I have a Xen domU that now frequently panics with "biodone2 already". I > suspect it started after upgrading to NetBSD 8.0. > > The offending code is in src/sys/kern/vfs_bio.c (see below). I wonder if > we could not just release the mutex and exit in that case. Can it make > some harm? > > static void > biodone2(buf_t *bp) > { > void (*callout)(buf_t *); > > SDT_PROBE1(io, kernel, ,done, bp); > > BIOHIST_FUNC(__func__); > BIOHIST_CALLARGS(biohist, "bp=%#jx", (uintptr_t)bp, 0, 0, 0); > > mutex_enter(bp->b_objlock); > /* Note that the transfer is done. */ > if (ISSET(bp->b_oflags, BO_DONE)) > panic("biodone2 already"); > > Cou > > -- > Emmanuel Dreyfus > http://hcpnet.free.fr/pubz > m...@netbsd.org