From 4d09c748e90aeb6deae3aa567d8dcf07d76f2db7 Mon Sep 17 00:00:00 2001 From: Dan McDonald Date: Mon, 14 May 2018 13:05:18 -0400 Subject: 9062 specfind() is not always zone aware Reviewed by: Robert Mustacchi Reviewed by: Richard Lowe Approved by: Dan McDonald --- usr/src/uts/common/fs/specfs/specsubr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'usr') 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; -- cgit v1.2.3