From eb22d3d5248b24c220b6d7b3ca66e67794fcc512 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 21 Jan 2022 14:44:00 +0000 Subject: [PATCH 13/36] specfs: Delete bogus comment about .d_open/.d_close at same time. Annoying as it is that .d_open and .d_close can run at the same time, it is also necessary for tty semantics, where open can block indefinitely, and it is the responsibility of close (called via revoke) necessary to interrupt it. --- sys/miscfs/specfs/spec_vnops.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 4244859095a5..d11c28587c2b 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -549,12 +549,6 @@ spec_open(void *v) * But first check whether it has been revoked -- if so, we * can't acquire more open references and we must fail * immediately with EBADF. - * - * XXX This races with revoke: once we release the vnode lock, - * the vnode may be revoked, and the .d_close callback run, at - * the same time as we're calling .d_open here. Drivers - * shouldn't have to contemplate this scenario; .d_open and - * .d_close should be prevented from running concurrently. */ switch (vp->v_type) { case VCHR: