From nobody Sun Sep 28 17:47:07 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=yandex-team.ru Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1757582554369207.77629668117834; Thu, 11 Sep 2025 02:22:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uwdUG-0004bS-Bp; Thu, 11 Sep 2025 05:21:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uwdU6-0004XN-9A; Thu, 11 Sep 2025 05:20:55 -0400 Received: from forwardcorp1b.mail.yandex.net ([178.154.239.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uwdTu-0008S2-Op; Thu, 11 Sep 2025 05:20:53 -0400 Received: from mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net (mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net [IPv6:2a02:6b8:c23:36c1:0:640:5f85:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTPS id 6BEAB8073A; Thu, 11 Sep 2025 12:20:28 +0300 (MSK) Received: from vsementsov-lin.. (unknown [2a02:6bf:8080:b3c::1:2f]) by mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id QKHlUI0GnCg0-lMqrowMG; Thu, 11 Sep 2025 12:20:28 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1757582428; bh=R6e0i0RCU5/rDm2lQb0AHhlVPVqeQVMwIA198Fa+J7M=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=Kn/fLgVwidJHbTGcU1dXVAqPTg9mzz+jrdjd1hz9p/bf8FjA3Z4AfHFIwKNu71R/5 1eVUPWq8Ue77PGRmn1kNjsYJQgJPmjj+J5n8DxWwFmNpx8BNuOBA12d/EQerNGeeYl CnzfLs1z7J7QbNMC+zmWIP3cNKSITh7qVQ0hnBFo= Authentication-Results: mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: berrange@redhat.com Cc: qemu-devel@nongnu.org, peterx@redhat.com, qemu-block@nongnu.org, vsementsov@yandex-team.ru, leiyang@redhat.com, marcandre.lureau@redhat.com, Paolo Bonzini Subject: [PATCH v2 1/8] char-socket: tcp_chr_recv(): drop extra _set_(block, cloexec) Date: Thu, 11 Sep 2025 12:19:59 +0300 Message-ID: <20250911092007.1370002-2-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250911092007.1370002-1-vsementsov@yandex-team.ru> References: <20250911092007.1370002-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.154.239.136; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1b.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1757582556243116601 Content-Type: text/plain; charset="utf-8" qio_channel_readv_full() guarantees BLOCKING and CLOEXEC states for incoming descriptors, no reason to call extra ioctls. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Daniel P. Berrang=C3=A9 --- chardev/char-socket.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 1e8313915b..b1ce5d01c7 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -307,20 +307,6 @@ static ssize_t tcp_chr_recv(Chardev *chr, char *buf, s= ize_t len) s->read_msgfds_num =3D msgfds_num; } =20 - for (i =3D 0; i < s->read_msgfds_num; i++) { - int fd =3D s->read_msgfds[i]; - if (fd < 0) { - continue; - } - - /* O_NONBLOCK is preserved across SCM_RIGHTS so reset it */ - qemu_socket_set_block(fd); - -#ifndef MSG_CMSG_CLOEXEC - qemu_set_cloexec(fd); -#endif - } - if (ret =3D=3D QIO_CHANNEL_ERR_BLOCK) { errno =3D EAGAIN; ret =3D -1; --=20 2.48.1