diff options
author | ns92644 <none@none> | 2005-10-27 02:12:39 -0700 |
---|---|---|
committer | ns92644 <none@none> | 2005-10-27 02:12:39 -0700 |
commit | 957c086d8a76c585defb15eb36814fde4952929f (patch) | |
tree | 59c63f298706e411846248fd068916618d1f3232 /usr/src | |
parent | 1dc065c6244eee1df6369ab3bd1535760762f8a0 (diff) | |
download | illumos-joyent-957c086d8a76c585defb15eb36814fde4952929f.tar.gz |
4531094 system hang occured due to deadlock of both xconsole and syslogd
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/iwscons.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/usr/src/uts/common/io/iwscons.c b/usr/src/uts/common/io/iwscons.c index 0d02ad8b24..9ef426ce58 100644 --- a/usr/src/uts/common/io/iwscons.c +++ b/usr/src/uts/common/io/iwscons.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -209,7 +209,7 @@ extern srvnops_t wscons_srvnops; static struct modldrv modldrv = { &mod_driverops, /* Type of module. This one is a pseudo driver */ - "Workstation Redirection driver 'iwscn' %I%", + "Workstation Redirection driver 'iwscn' 1.42", &iwscn_ops, /* driver ops */ }; @@ -409,12 +409,20 @@ static int iwscnread(dev_t dev, uio_t *uio, cred_t *cred) { wcd_data_t *wd; - int error; + int error; + vnode_t *vp; rw_enter(&iwscn_lock, RW_READER); wd = srilookup(getminor(dev)); - error = strread(wd->wd_list->wl_vp, uio, cred); + /* + * We don't need to hold iwscn_lock while waiting for the read to + * complete, but the vnode must not be destroyed. + */ + vp = wd->wd_list->wl_vp; + VN_HOLD(vp); rw_exit(&iwscn_lock); + error = strread(vp, uio, cred); + VN_RELE(vp); return (error); } |