Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2033655rdf; Mon, 6 Nov 2023 02:47:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8+XuGdTiWulMViFRFZTdPVDfj4KyUVTXdExdDYvaEncYT0M/FUB7qG4tEXyqTy5dIR0FE X-Received: by 2002:a17:90b:1845:b0:280:963d:9cb with SMTP id mf5-20020a17090b184500b00280963d09cbmr13281490pjb.23.1699267657657; Mon, 06 Nov 2023 02:47:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699267657; cv=none; d=google.com; s=arc-20160816; b=DzNubo5tEsR6tTbHsNI9AODfLHB55IoJW/RBs6CjRaobr4NH0KLGR08S1lzeyt7mRw QTsl1XNxtmCbiAeL5hbV9/2PIoYZmnL499sInvzyXFNRYgCT6o3rIlCjuVFBn61NAq7Z BlOJ0S47FJDKZiXMO3Dxu06ylgY/Evauowu8bz0S+CQc08jGx8KqeuyiM2Dlo0QvZrVc 1obuTOMgAW0L3QvHHcKHmOvret8HY+00CuaWJuvmldK7qDAnVANlUnEKld+NsY6OD/fu 4mTR0oZqsyWX6WHduTn/yV3mMFYrwdChvax+ijuG2M7iOJ+HRoi2S3UbxLKKjpvL0/h2 2V3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Y6QcvY42P7J5f+1XN4Qoz7DTeNEAzvUSzxn7o+ZphKQ=; fh=fq0yFTT5Tt+YKMwOeiukJlK+nWHg7ThRkm5ylC69eH8=; b=YuEmeBQ8GwIznBlOHaErw2gxrB4LZ4GxZz6JrezAiMA/vP/+qeHrJEKUT2YYqJOSOA QxWe5xF58X2MNRUWrBqdw+OQJAJgtFtloXLnlljDJZmkSzv1JH74VT1MvpRp+U7sj5Ia yJZCYcPJzM70IQTOT1XVzfqUg4PQl1rmoe0At61G018CPKvq9lNephnqINEKzIQwdkys sPmV8V7uFsX8uZy54CEcdNjV7I238FTp5dFyJJiauBfRwhe+xfoWjTv8Y10IU357p97k DIO+Kaslz06bGa1OSfJ5RAruBd3HS2gpS/n6i6Lk7A9/KEsh+owX6YtwjdSs1BsyyufJ 5GCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UXuvy783; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id a18-20020a17090ad81200b0027d33155aefsi7695363pjv.99.2023.11.06.02.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 02:47:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UXuvy783; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 620BA8072832; Mon, 6 Nov 2023 02:47:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231175AbjKFKr2 (ORCPT + 99 others); Mon, 6 Nov 2023 05:47:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjKFKr1 (ORCPT ); Mon, 6 Nov 2023 05:47:27 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08934FA for ; Mon, 6 Nov 2023 02:46:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699267602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Y6QcvY42P7J5f+1XN4Qoz7DTeNEAzvUSzxn7o+ZphKQ=; b=UXuvy783ljVnl/qQxSadI5dwB9V4aYW04zp8wUkYemb1HI/KQMZhXihLbBIUuCD580pkZi w0WJGLtJ3MwgNtZ4m0g8UH2DYBrASvIZbZg3aVpi7sjCMthmoLe4PCt5xufBrmCCvqU59d i7iDruZ0wUB9lZqd0+UtBY7Qrs9jVtQ= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-251-oUQnfsfuM6ykOr0AqrLbqQ-1; Mon, 06 Nov 2023 05:46:41 -0500 X-MC-Unique: oUQnfsfuM6ykOr0AqrLbqQ-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7788fb069abso656304085a.0 for ; Mon, 06 Nov 2023 02:46:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699267600; x=1699872400; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Y6QcvY42P7J5f+1XN4Qoz7DTeNEAzvUSzxn7o+ZphKQ=; b=k0NHGK2UM1vDJn3CFdHiGYtk6yaCFIvVfiVNyx/na8iFVPGGa93jiMn2iU+Q2r/lkw AmLxMb/x6zjD5LSAjzy917Ol5UTbJFfySHtI120DPRfVlRtH3hWgvdnUjAugu7Mn8wQk ZfQsLp/M3ybUls5dGCM+zycJGt8gJD2hsk9WAFrNXcUGDAh0auPwu7XtFERL1VFcjpeA fL4v6rWYnddfLL8qnJJs7rp7niKE9nxgsCkxSTrAuHFD8Hfhv50MOCxd1OKuMFC8s/mK Bs4RnYx6Dh5Two5J6DtGIgGqk+IGL5AW6z01Dfi2kD9nBSMe4pZWDWGGSTKgnOXWWw3X XdHw== X-Gm-Message-State: AOJu0Yx9DCo7Si1uxmQftKv/bVIhFtRKZTFdNLUIFEPHjHwXS1EHwLnE qM41dQMyQDIGAhBGiGg+q8wyuEKzMr/I37kkr5iAhfaRP2F/Aw7LgizbUfPTx1ZMkaacaGwQkG3 jZpgdwcTjGs761dCB82QVNW0S X-Received: by 2002:a05:620a:4622:b0:779:cf70:8495 with SMTP id br34-20020a05620a462200b00779cf708495mr13042343qkb.22.1699267600590; Mon, 06 Nov 2023 02:46:40 -0800 (PST) X-Received: by 2002:a05:620a:4622:b0:779:cf70:8495 with SMTP id br34-20020a05620a462200b00779cf708495mr13042320qkb.22.1699267600334; Mon, 06 Nov 2023 02:46:40 -0800 (PST) Received: from sgarzare-redhat ([5.179.191.143]) by smtp.gmail.com with ESMTPSA id ay18-20020a05622a229200b004181c32dcc3sm3258973qtb.16.2023.11.06.02.46.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 02:46:39 -0800 (PST) Date: Mon, 6 Nov 2023 11:46:26 +0100 From: Stefano Garzarella To: f.storniolo95@gmail.com Cc: luigi.leonardi@outlook.com, kvm@vger.kernel.org, davem@davemloft.net, edumazet@google.com, mst@redhat.com, imbrenda@linux.vnet.ibm.com, kuba@kernel.org, asias@redhat.com, stefanha@redhat.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH net 2/4] test/vsock fix: add missing check on socket creation Message-ID: References: <20231103175551.41025-1-f.storniolo95@gmail.com> <20231103175551.41025-3-f.storniolo95@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20231103175551.41025-3-f.storniolo95@gmail.com> X-Spam-Status: No, score=0.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 02:47:35 -0800 (PST) On Fri, Nov 03, 2023 at 06:55:49PM +0100, f.storniolo95@gmail.com wrote: >From: Filippo Storniolo > >Add check on socket() return value in vsock_listen() >and vsock_connect() > >Co-developed-by: Luigi Leonardi >Signed-off-by: Luigi Leonardi >Signed-off-by: Filippo Storniolo >--- > tools/testing/vsock/util.c | 8 ++++++++ > 1 file changed, 8 insertions(+) If you need to resend the entire series, maybe you can remove "fix" from the commit title. But it's a minor thing, so I would only change it if there's something else that justifies sending a v2: Reviewed-by: Stefano Garzarella > >diff --git a/tools/testing/vsock/util.c b/tools/testing/vsock/util.c >index 92336721321a..698b0b44a2ee 100644 >--- a/tools/testing/vsock/util.c >+++ b/tools/testing/vsock/util.c >@@ -104,6 +104,10 @@ static int vsock_connect(unsigned int cid, unsigned int port, int type) > control_expectln("LISTENING"); > > fd = socket(AF_VSOCK, type, 0); >+ if (fd < 0) { >+ perror("socket"); >+ exit(EXIT_FAILURE); >+ } > > timeout_begin(TIMEOUT); > do { >@@ -158,6 +162,10 @@ static int vsock_accept(unsigned int cid, unsigned int port, > int old_errno; > > fd = socket(AF_VSOCK, type, 0); >+ if (fd < 0) { >+ perror("socket"); >+ exit(EXIT_FAILURE); >+ } > > if (bind(fd, &addr.sa, sizeof(addr.svm)) < 0) { > perror("bind"); >-- >2.41.0 >