Module Name: src Committed By: riastradh Date: Thu Jun 30 01:52:29 UTC 2022
Modified Files: src/sys/kern: kern_physio.c Log Message: physio(9): Include error in KASSERTMSG. May help to track down: https://syzkaller.appspot.com/bug?id=d57553ea3fc65cb7f11df947154795451b0dd3a8 To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/kern/kern_physio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/kern_physio.c diff -u src/sys/kern/kern_physio.c:1.100 src/sys/kern/kern_physio.c:1.101 --- src/sys/kern/kern_physio.c:1.100 Sun Mar 13 18:37:10 2022 +++ src/sys/kern/kern_physio.c Thu Jun 30 01:52:29 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_physio.c,v 1.100 2022/03/13 18:37:10 riastradh Exp $ */ +/* $NetBSD: kern_physio.c,v 1.101 2022/06/30 01:52:29 riastradh Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993 @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_physio.c,v 1.100 2022/03/13 18:37:10 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_physio.c,v 1.101 2022/06/30 01:52:29 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -180,7 +180,7 @@ physio_biodone(struct buf *bp) KASSERT(bp->b_bcount <= todo); KASSERT(bp->b_resid <= bp->b_bcount); if (done == todo) - KASSERT(bp->b_error == 0); + KASSERTMSG(bp->b_error == 0, "error=%d", bp->b_error); #endif /* defined(DIAGNOSTIC) */ workqueue_enqueue(physio_workqueue, &bp->b_work, NULL);