diff options
| author | Dan McDonald <danmcd@joyent.com> | 2018-05-14 13:05:18 -0400 |
|---|---|---|
| committer | Dan McDonald <danmcd@joyent.com> | 2018-05-14 13:05:18 -0400 |
| commit | 4d09c748e90aeb6deae3aa567d8dcf07d76f2db7 (patch) | |
| tree | dcc6834b20218ac86d946be20a8620b208e2ce56 /usr | |
| parent | 890c86716e81b6b22639ff07791007b82c26e6c5 (diff) | |
| download | illumos-joyent-4d09c748e90aeb6deae3aa567d8dcf07d76f2db7.tar.gz | |
9062 specfind() is not always zone aware
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr')
| -rw-r--r-- | usr/src/uts/common/fs/specfs/specsubr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/specfs/specsubr.c b/usr/src/uts/common/fs/specfs/specsubr.c index a5937dec2b..014bad1216 100644 --- a/usr/src/uts/common/fs/specfs/specsubr.c +++ b/usr/src/uts/common/fs/specfs/specsubr.c @@ -24,6 +24,7 @@ */ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2017 Joyent, Inc. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ @@ -416,8 +417,13 @@ specfind(dev_t dev, vtype_t type) nvp = STOV(st); if (nvp->v_type == type && st->s_commonvp != nvp) { VN_HOLD(nvp); - mutex_exit(&stable_lock); - return (nvp); + /* validate vnode is visible in the zone */ + if (nvp->v_path != NULL && + ZONE_PATH_VISIBLE(nvp->v_path, curzone)) { + mutex_exit(&stable_lock); + return (nvp); + } + VN_RELE(nvp); } } st = st->s_next; |
