Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dkwedge dk(4): Fix lock assertion in size increase: ...
details: https://anonhg.NetBSD.org/src/rev/62d606dd4b5e
branches: trunk
changeset: 374503:62d606dd4b5e
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Apr 29 06:23:37 2023 +0000
description:
dk(4): Fix lock assertion in size increase: parent's, not wedge's.
Reported-by: syzbot+d4dc610473cacc5183dd%syzkaller.appspotmail.com@localhost
https://syzkaller.appspot.com/bug?id=e18ddae8283d6fab44cfb1ac7e3f8e791f8c0700
diffstat:
sys/dev/dkwedge/dk.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 11916938c3a2 -r 62d606dd4b5e sys/dev/dkwedge/dk.c
--- a/sys/dev/dkwedge/dk.c Sat Apr 29 03:36:55 2023 +0000
+++ b/sys/dev/dkwedge/dk.c Sat Apr 29 06:23:37 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dk.c,v 1.150 2023/04/22 13:11:50 riastradh Exp $ */
+/* $NetBSD: dk.c,v 1.151 2023/04/29 06:23:37 riastradh Exp $ */
/*-
* Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.150 2023/04/22 13:11:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.151 2023/04/29 06:23:37 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_dkwedge.h"
@@ -333,7 +333,7 @@ static void
dkwedge_size_increase(struct dkwedge_softc *sc, uint64_t size)
{
- KASSERT(mutex_owned(&sc->sc_dk.dk_openlock));
+ KASSERT(mutex_owned(&sc->sc_parent->dk_openlock));
rw_enter(&sc->sc_sizelock, RW_WRITER);
KASSERTMSG(size >= sc->sc_size,
Home |
Main Index |
Thread Index |
Old Index