diff options
author | anton <anton@cvs.openbsd.org> | 2019-02-20 17:54:35 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2019-02-20 17:54:35 +0000 |
commit | a850d55262986a85c85793efdd961accc757bf36 (patch) | |
tree | 28315a8588b6927b52290f7955aeeda0b3675474 /sys/dev | |
parent | f5e19f3798829f5713e8586fd24cd44d4c752c58 (diff) |
When adding a wsmux device to an existing wsmux device using
ioctl(WSMUXIO_ADD_DEVICE), two distinct locks of the same type are
acquired. Thus, witness will emit warning. Since acquiring two different
locks of the same type is harmless in this context, relax the witness
check by flagging the locks as RWL_DUPOK.
ok visa@
Reported-by: syzbot+249e483406a1f7843915@syzkaller.appspotmail.com
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/wscons/wsmux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/wscons/wsmux.c b/sys/dev/wscons/wsmux.c index e5a72f2dd26..f1458d3b636 100644 --- a/sys/dev/wscons/wsmux.c +++ b/sys/dev/wscons/wsmux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmux.c,v 1.41 2019/02/19 07:03:29 anton Exp $ */ +/* $OpenBSD: wsmux.c,v 1.42 2019/02/20 17:54:34 anton Exp $ */ /* $NetBSD: wsmux.c,v 1.37 2005/04/30 03:47:12 augustss Exp $ */ /* @@ -608,7 +608,7 @@ wsmux_create(const char *name, int unit) if (sc == NULL) return (NULL); TAILQ_INIT(&sc->sc_cld); - rw_init(&sc->sc_lock, "wsmuxlk"); + rw_init_flags(&sc->sc_lock, "wsmuxlk", RWL_DUPOK); snprintf(sc->sc_base.me_dv.dv_xname, sizeof sc->sc_base.me_dv.dv_xname, "%s%d", name, unit); sc->sc_base.me_dv.dv_unit = unit; |