Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp689075ybb; Thu, 28 Mar 2019 10:12:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqylKsiS/EetNNWNjU2k3j010vWO3lWgyWZ+GemtXVeihWcV9WUAdGZXTqX93cjJF+3tlmBH X-Received: by 2002:a17:902:7084:: with SMTP id z4mr43499521plk.305.1553793141976; Thu, 28 Mar 2019 10:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553793141; cv=none; d=google.com; s=arc-20160816; b=AybbBIgvY/0IGu4NzM6TP68G339851es6UAPxjapekv5RTgcZFC6DhD3yoR4gU3Q7e udMsuy2RASXaLVAr+epl6yYybx+noblPqKYiANkxUFyJlCdM0s3Jol1sL1y+mZX2gWku DFxgO+aQcEY3Ay9b+XeVV57KEOkm0ZsuNqSu7OIRsOVIyV9ORtCHAJv/GAlGwosnX4AG gyZwWaBed7VqLB1Xp7SnFavSvQ2lF9dYpqstZEWhNGmptzrjtadUeKGvhr5z3IL9St+8 Bx6uOdi4VeciE+6Ns19jdncKsqDI/eoYkhWF8Sm8eyhJyES9yZaFvOlFNjU7zhwIJdm/ 5v/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=qRYwax0kQAHs7i/AToycFYMMekLbKQthj/x21KvD3wA=; b=VAuDrZ74uENQnlxIeyzEcknQaNd/lql2ya2PICOElZcgIKpp/WjwlW0HFD2RHFUVW3 P1pmp0ik13BFNeV37Dbla088iowJBSjEbgF6ixpBuC1bU7g12pI6NJ+s6oBM/zm3b0A4 5UrB8v8WIAuk5A8/PFgi1OZZGXzUTNiNrXjaw2NZxEzF9IMmdXr9XGtO4+kw6mje8q60 xafjUR/0Y9PzqcpOcS2Z+/iYJOhCcdD4C1ER+5kiHXRO4T3iEZvUpwp/Fyw403oD562j zheCZUu5PXEBGCnwAC8uqWDFj6LTFQ4S0ghjD8bE6B/mdSF7WeohuMp5VOJ8Le5Kdh8m +/cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sUkexObA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si11285109plm.25.2019.03.28.10.12.05; Thu, 28 Mar 2019 10:12:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sUkexObA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727442AbfC1RLR (ORCPT + 99 others); Thu, 28 Mar 2019 13:11:17 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:41698 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC1RLR (ORCPT ); Thu, 28 Mar 2019 13:11:17 -0400 Received: by mail-qt1-f193.google.com with SMTP id w30so23964539qta.8 for ; Thu, 28 Mar 2019 10:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qRYwax0kQAHs7i/AToycFYMMekLbKQthj/x21KvD3wA=; b=sUkexObACcAfZD2urDVfEId6jq5nRGOxa7kyNdanirygu+PAyM6xKqmwIxl8PxXrtN 2Yxde0AuSyYlmUv2DXfwJ5qLGzS9psriTZkUBSyUlQKWfJCM1E7tSrB15ZMNtz+U3TlB /S6Mw1VVrppcBwTG9ktcxLXlHdBAs0k9P61SP0Q3Jsj+4+Xq9OwToYf1MJukd73gEp1Y +0IUOaFrzmCGuhmAMSQXZYyso7ARy4jONEaiShhZyrSRMikyVIiGx0ieuxpnh1/IIRsg YgiPjUR2R2xJtzyeZxP9YVvw7cCq0pX/YGHZqbLRTeZPNfv7vkAldyv37IobhGSWYXuJ W/+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qRYwax0kQAHs7i/AToycFYMMekLbKQthj/x21KvD3wA=; b=W8iE0VTE/QnZrvv98Hy3Yo9JG+IswRGEN6vU6oAoS9+MJff1c7fRzLFE1XR0u0SbK4 ryZgpo5ZHbDZwgmGfUgLZAbFmTtUOUtQSoeY1pc4LQTsAutKPOY8p7e9vyzEmGu6dazE IVh3drZUWEoHrve3fUnZmnMl3v3TE/TP3Ln2HK2hjVD5f5ebc2qYBu/NTStBKOzuzUHX vLAkC5XPU48QhAapqdgfTICA7K2iD99PwNrTNtdyJU15RR3PrNHuzVHo6LAI54LyFe8Q tvZApEUlHniskOlkVUOM/b2V875ptPub6yogw9Gda0dzILTb00siyAPqUx9sKxEiNYSu QyjQ== X-Gm-Message-State: APjAAAXf4Q1HpvSLds75o0KB0O83Ab1gpWJHl55KTrs07f1cG18miAy4 JpRgIFawT9nAa56P0JbbCUY= X-Received: by 2002:a0c:d2b9:: with SMTP id q54mr36617006qvh.196.1553793076404; Thu, 28 Mar 2019 10:11:16 -0700 (PDT) Received: from gravicappa.gravicappa.info (pool-72-74-132-209.bstnma.fios.verizon.net. [72.74.132.209]) by smtp.gmail.com with ESMTPSA id r53sm5386988qtr.80.2019.03.28.10.11.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 10:11:15 -0700 (PDT) From: Vitaly Mayatskikh To: Stefan Hajnoczi Cc: linux-kernel@vger.kernel.org Subject: [PATCH] vhost/vsock: initialize vhost_vsock->hash Date: Thu, 28 Mar 2019 13:10:57 -0400 Message-Id: <1553793057-24002-1-git-send-email-v.mayatskih@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's no current valid use case when uninitialized hash can be read before being written, however let's keep every vhost_vsock field initialized just for clarity. Signed-off-by: Vitaly Mayatskikh --- drivers/vhost/vsock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index bb5fc0e..f43f4ed 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -537,6 +537,7 @@ static int vhost_vsock_dev_open(struct inode *inode, struct file *file) spin_lock_init(&vsock->send_pkt_list_lock); INIT_LIST_HEAD(&vsock->send_pkt_list); vhost_work_init(&vsock->send_pkt_work, vhost_transport_send_pkt_work); + INIT_HLIST_NODE(&vsock->hash); return 0; out: -- 1.8.3.1