From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 2376480E7E for ; Mon, 2 Nov 2026 17:46:51 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6A2HjXLA027755; Mon, 2 Nov 2026 20:45:34 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A2HjXLA027755 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1793641535; bh=atLYsVxsBbAJTWHdE0qkg86FBQH5KJn/I9NxTn3m/ck=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=GuQyYbJqs47ph5Cz6j65+QVssmrqWJH6tCoDqguKvTryC20RqdgpFrJw/169ehnaF mjxV903T7VPe8w7oEzMDGYuDZxzjyuOAC/HtSKH1N5Ri1fFOp2oq8YU2HNQrt3BMQk 7MBEcewaVXxBF3H4OhhMd/PtImV9/j3Y9ZTm807vc2RAx5J/XuKuwl48EwnFtYHrc/ cWxVPYM3y0S815Ou+u589ULQAHFJyev6tJY6XJwdMavjQEASUY6fUpTzjN0BKOcLEK JBqVTWb+uxrPWcDXWBNkB7yAXHQNe+71tIP1NQH6zMCpo3eyfr/3lrRnd1xzh+By9r e7HOGNXkRe0Ig== Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6A2HjVju027751 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 2 Nov 2026 20:45:31 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A2HjVju027751 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="ZsTIy58o" Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-6b1aa4d7162so3996756a12.1 for ; Mon, 02 Nov 2026 09:45:31 -0800 (PST) X-Gm-Message-State: APuU4Z/FDKVjaO0XCIVLsRtGeeNaME2IGQNoRzXDg8VO9GtxokE7jStb vjjBL5qPV3pF2hqzIIaDFnm0UMT9e4p3xgRhZCgxGavFCcqeSr6OnZvywTYUr/7HiWfFLnYAPdN M0EVBJZvpwUDZduYkNwL9yZmnBYAZJ0/IU/ulktAAzn2AKe2SeBZvDg== X-Gm-Gg: AYBFou3XuFCjlBElwaFfKqrx8sKDWc4/UQ/Aa3nMST1EVQabmUhNK66/G0H7Ud/fwvu QU5QyBwb4U/xKptBWlrHFp2RM+ccOLCj1e4UzhIjTbfl/ngBvX3FrT6u6dM+I+FXtqiWhpQzz+N +sfrliFa/x4+OCR4UMWnaiwH1LV5I/4qGkdWVEjpVmsaWoQh+5IBXaGFqJOWyPwiooIDGA1RLuk hcjH4zPOpbx54OCGhUlabIJY+L46Hb3VHSNhuPQYUZnWEhayUdks2wCaV3kkYYFuX3DR/04NJnR 1VvviucL5Q== X-Received: by 2002:a05:600c:6095:b0:49e:7c8c:361d with SMTP id 5b1f17b1804b1-4ac182dc30fmr219095845e9.22.1793639709533; Mon, 02 Nov 2026 09:15:09 -0800 (PST) X-Received: by 2002:a05:600c:6095:b0:49e:7c8c:361d with SMTP id 5b1f17b1804b1-4ac182dc30fmr219095255e9.22.1793639708986; Mon, 02 Nov 2026 09:15:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1793639708; cv=none; d=google.com; s=arc-20260327; b=nl83Fh7glm6s1lT+DkvjojKbXBHn7NxqhD0iGh9NWrkEfmDy6NYbdtV9xgw9WlYYfs Ng3kBvTtL8nTHn0uOWmuDHeIJY/IqmkcGVttTF4liyz8260NL7h29qEdHjrY1KVYqu9q QabRdu3/smK1YniCak09q7G9aOFCbgrtGdROlZH0082n4Ma8yg4XRTYTo9etHWmtNekm pa816ipnBMUIyfvJvyuos+VwjarhXLea4bQbHT9QSI59mkWCLJ2YOtEVebZRjJIhA40b N6WNuzcMdPdrx7wcUOh7Fr6QXR6ClsuGqIFbjrZ5zepuVi6CCA9tj5OVRVlTURUhLEIf zT5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=+3rPGbZYzFWPIdjvY31LrNrTMqZGi6lB9ffLLvvO6AM=; fh=ozrYJQ1t3QIP6s65KBq5xgJxiFM2qf+5wwn3ABTusyU=; b=V+ngtBK46jZLmFnWOU3v6FlQZ6Dqk8nCHgBlMqNucJ8wNGaYQ49TVcHolicn0NvQSU V7gToImP//TwVHLK0Zt9M4NJbTH9s5ul6GHqMsEE4MkVkogawAsR+7lf3kN1PCQQxrQZ LO0KCl3aWM1pAUC2kis58FP/DWw5PFMc3XOYjMxh7hBCkxtMRzZ0h/LiTKPsT59YC5ew Yi2QDhTDZ0xNyV9SHRFf8QUxVASPOoY9A16TETI/ia9fXX9KcKJKG/069XpoQ3vkUsVU zL8MQ7yvm+0IL1WMJzv/0nWe0aBDgAUvNXiOSPxxa+JEDC7/nh+48L5PykXUYlFyvjCW svAQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=ZsTIy58o; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:91db:48d7:7451:652a as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-48e6edf8646sor981790f8f.10.2026.11.02.09.15.08 for (Google Transport Security); Mon, 02 Nov 2026 09:15:08 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:91db:48d7:7451:652a as permitted sender) client-ip=2a06:5b06:b600:300:91db:48d7:7451:652a; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=ZsTIy58o; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:91db:48d7:7451:652a as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1793639708; x=1794244508; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=+3rPGbZYzFWPIdjvY31LrNrTMqZGi6lB9ffLLvvO6AM=; b=ZsTIy58oMRLyYR8hZSnwnSaKfxWQ8fwzpr44g5zW2rrbRmCyNWgGLABq6fb+sGBlIJ kV625W839g5hJt+9SKsXniAEwJKq7hUbha72wgd+l2Qm6NJjE1N4IA3CK+MIGEzSEZJw LzliVSvcakaG4G5eg/9ElL74Gm78vi49B9NMXZdjpFDxkg4KGhVx4ckzlpWEnP2H83hk MWqHtLh0kaRLBZDMnooUeSrmbBaiwVdjYTSZK6KoQV2cocEFsEmlmOZrNqHGfUBbjq3K 6zQwjL86tLxsukLQHsIn9gfLeTZx1KiGfnS1ONpO9GkQTwoonJ/Upd6ht9IYDNt8rWDN FoTw== X-Received: by 2002:a05:6000:2204:b0:48d:ffe8:ace6 with SMTP id ffacd0b85a97d-48e6e3004fcmr22886744f8f.42.1793639708548; Mon, 02 Nov 2026 09:15:08 -0800 (PST) Received: from athena.sw.ru ([2a06:5b06:b600:300:91db:48d7:7451:652a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e88876946sm2127084f8f.5.2026.11.02.09.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2026 09:15:07 -0800 (PST) From: "Denis V. Lunev" To: khorenko@virtuozzo.com Date: Mon, 2 Nov 2026 18:15:03 +0100 Message-ID: <20261102171504.3809155-2-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261102171504.3809155-1-den@openvz.org> References: <20261102171504.3809155-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 1/2] Revert "ve/vtty: fix console attach failing with EBUSY while the CT closes the tty" X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Denis V. Lunev This reverts commit 17cb7be7bfa3. Returning -EAGAIN for a pair the CT is still closing helps only a vzctl which retries. Every installed vzctl tries VE_CONFIGURE_OPEN_TTY once and now fails with Error opening CT tty: Resource temporarily unavailable instead of "Device or resource busy". The next patch waits for the closing pair inside vtty_open_master() instead, which needs no userspace change. https://virtuozzo.atlassian.net/browse/VSTOR-152365 Feature: tty: virtual Container console Signed-off-by: Denis V. Lunev --- drivers/tty/pty.c | 5 ++--- tools/testing/selftests/ve/ve_vtty_stress.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 6f6dabba96e2..14d46bb9c293 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -1100,15 +1100,14 @@ int vtty_open_master(envid_t veid, int idx) * user is gone and tty_release() has already committed to the final * close, release_tty() is only waiting for tty_mutex to free it. * Never hand out a reference to a tty which is about to be freed, - * report -EAGAIN so that the caller retries and allocates a fresh - * pair. -EBUSY above means a console is really attached. + * report -EBUSY so that the next attempt allocates a fresh pair. * * A pair we've just created above is exempt: it is not reachable by * anyone else yet and its zero count is merely the initial state, * vtty_install() gives its reference away to the master peer below. */ if (!created && slave->count == 0) { - ret = -EAGAIN; + ret = -EBUSY; goto err_unlock; } diff --git a/tools/testing/selftests/ve/ve_vtty_stress.c b/tools/testing/selftests/ve/ve_vtty_stress.c index d8d92ae54718..f4bdd81133b8 100644 --- a/tools/testing/selftests/ve/ve_vtty_stress.c +++ b/tools/testing/selftests/ve/ve_vtty_stress.c @@ -44,7 +44,7 @@ */ static bool expected_errno(int err) { - return err == EAGAIN || err == EBUSY || err == EIO || err == ENXIO; + return err == EBUSY || err == EIO || err == ENXIO; } /* A runner timeout must still reach the cleanup */ -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel