Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1050561rwd; Wed, 7 Jun 2023 10:14:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5nWqh+SGKrAMGKDyjnky3Xo8rlcymwO+QK+zDe4fnFeXpBh11SJYPSAXsWMFFRRn+mr4Lz X-Received: by 2002:a05:6a00:21cc:b0:63d:24d0:2c32 with SMTP id t12-20020a056a0021cc00b0063d24d02c32mr7233367pfj.33.1686158076868; Wed, 07 Jun 2023 10:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686158076; cv=none; d=google.com; s=arc-20160816; b=FVAq5l9tu6k53AIQLYBjM2BVUtNdGvdFY1fA9a+cuHGxZowUGrRx/rs2TrdixyRNTB iGJ719HcXmNjv9VAHXk/S04Vh/WwEcNGtZ2xry1NGYpJ0/R7iWEMb0zFPUqWCKpNSr0v hK+TeW601PzMPoepFTwrrgk83Cx1Cb3DzplWeRCUXQib1WsvFz9JwyNpfbU6QQo1xIHS GhNwIv37dx2nK0bifbXTjNuOScyiA5g78MbxDkJCtaSrEBXCwscqHW8EZsUP42t2/bQh 2Iw+1K0OEbmSUv3tZQs50RTCKGEsPuFxbjH6EalpWLKzBJJclK11i+tcaRnSvtwnsXKP hVLw== 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=54+qi/h0dgjEiscE3jr8CCpbJikBz1EP/4AV4WdE4uA=; b=VDscKhR7YOYQkE0Zp7AUwAQGgLjSESW545KmbkvBMUdUjlOXntG8qzlMlGwx9jGEO+ bKQSRKtcAMOTb5wRYvxICAIezPvZ4LLLTD5f9nr3ducLRw1EGVq4Bh9wBixnBmHo7dpD XMbrYw0hYh222eO/welbY0WzKzh+n3sLjlRSvAIrZh5JwL92Jj68brb79kIqNWozyOrW geeTbC6O0GZ8daUeY/TItJurn9SaKpDi+bEfq/K1qZe/H1I3Ah85xOQLSEYG6kGxkt4X Z/4YcHdZ8gDdvvoV649eKzFJVpUUB80xOQDLgqKSDNKK/+ylqy5R9WCYwiuXxYii2I0W XLvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Y0KoLQYa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a185-20020a6390c2000000b0053467c7b635si3246951pge.85.2023.06.07.10.14.23; Wed, 07 Jun 2023 10:14:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Y0KoLQYa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230512AbjFGQyN (ORCPT + 99 others); Wed, 7 Jun 2023 12:54:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231224AbjFGQyL (ORCPT ); Wed, 7 Jun 2023 12:54:11 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D61011FE9; Wed, 7 Jun 2023 09:54:03 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-53fbb3a013dso6950723a12.1; Wed, 07 Jun 2023 09:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686156843; x=1688748843; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=54+qi/h0dgjEiscE3jr8CCpbJikBz1EP/4AV4WdE4uA=; b=Y0KoLQYaVs/x/uZp6sPOZL1DtjPxKsuHogteQgI7gi4ksgnssk/h5AP4Xqi7YXS4Du X0YYdyTW49qXUruen2a9EoNULB27nBj2CcCR7X2DZ3H1RaRpAEsqaCL23H3fIEMWm8Da GGB2+I4XzJxZFY94NjuHz2XMfuHYaXGAwAbgPD+1zRw33J4YOWC1EntopGcp/Mlnesld Y2OuAu5rjgEvMwcf9jgvfO02siSdQhKJlfMKczIykXGR32n8P2nQTFiTs2VAvNdJkrkn hhKWCcdNOkJVT/TVfR0uRpyW9d6UfOdxhzo1yeaoAYXj/6X5BA+TtuGdFNmKpSMOM+9f MebA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686156843; x=1688748843; 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=54+qi/h0dgjEiscE3jr8CCpbJikBz1EP/4AV4WdE4uA=; b=LrH2h9EJu00IkdiFlxkZkZbH5rFJOgqXqPXN5oD0pkPml35LhuuLGh++fm081N95cx CVPdhor9vXdgdHgQjxLPunDjN6UQwn7rjJQj03Nufc3Wx32Vd/sFe8/o9ZaMRhDhl2Km vFWnDkm+4UYM6txrHop4D8N5Ds2MFrO0zXahujy1IdZ7Z07qNUwv72sHVPHIUYd6IFv7 kGiZZ5Zw7qvXJQtPZnV4zmxouOv8DlgunG0UQzYGfLS9IV6lY2EZoHTpm+mOFWa8Z+15 nnbolBEFErJoXx7D+A/EgzGhYK1BNue5nfTFyecLv3CiIEi4TF1dCR1zFZoAZ1/U/0vG e2iQ== X-Gm-Message-State: AC+VfDzbfkAqjUUyg+U4HbLFAiOQ0KfeTNOGgMfmBqwc4EDwcsN1Amju ht1WnqtPMOTsCHqyiK1+xls= X-Received: by 2002:a17:903:41c6:b0:1b1:ac87:b47a with SMTP id u6-20020a17090341c600b001b1ac87b47amr6806648ple.65.1686156843148; Wed, 07 Jun 2023 09:54:03 -0700 (PDT) Received: from localhost (ec2-52-8-182-0.us-west-1.compute.amazonaws.com. [52.8.182.0]) by smtp.gmail.com with ESMTPSA id ik8-20020a170902ab0800b001ae0152d280sm10792502plb.193.2023.06.07.09.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 09:54:02 -0700 (PDT) Date: Thu, 1 Jun 2023 07:54:07 +0000 From: Bobby Eshleman To: Dan Carpenter Cc: Simon Horman , Bobby Eshleman , Stefan Hajnoczi , Stefano Garzarella , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Bryan Tan , Vishnu Dasa , VMware PV-Drivers Reviewers , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: Re: [PATCH RFC net-next v3 6/8] virtio/vsock: support dgrams Message-ID: References: <20230413-b4-vsock-dgram-v3-0-c2414413ef6a@bytedance.com> <20230413-b4-vsock-dgram-v3-6-c2414413ef6a@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,DATE_IN_PAST_96_XX, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 31, 2023 at 09:13:04PM +0300, Dan Carpenter wrote: > On Wed, May 31, 2023 at 06:09:11PM +0200, Simon Horman wrote: > > > @@ -102,6 +144,7 @@ virtio_transport_alloc_skb(struct virtio_vsock_pkt_info *info, > > > > Smatch that err may not be initialised in the out label below. > > > > Just above this context the following appears: > > > > if (info->vsk && !skb_set_owner_sk_safe(skb, sk_vsock(info->vsk))) { > > WARN_ONCE(1, "failed to allocate skb on vsock socket with sk_refcnt == 0\n"); > > goto out; > > } > > > > So I wonder if in that case err may not be initialised. > > > > Yep, exactly right. I commented out the goto and it silenced the > warning. I also initialized err to zero at the start hoping that it > would trigger a different warning but it didn't. :( > > regards, > dan carpenter > Thanks for checking that Dan. Fixed in the next rev. Best, Bobby