Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp686687ybb; Thu, 28 Mar 2019 10:09:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsUDwspZr3mQO3XzriVWOfASRC5loL8iozlI7Q0e7Gf0xiQ0KhR4q21uqEJy1NrKWf4Q5h X-Received: by 2002:a65:648c:: with SMTP id e12mr26397852pgv.346.1553792996789; Thu, 28 Mar 2019 10:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553792996; cv=none; d=google.com; s=arc-20160816; b=s9TNDfhD6hXnQLYL6U9rFn3N3FgFDW7UqeFRYiE8Wd2bQ6XlB/30DtK2hed4P38G1i QojUcz11Y+JuuzakkkSbz348MU6vszO+6hNj6DHT3I/RjbAsy6DXOGDHzR+u9mat2ZrM bQhcC0qU4P5lUEplxzEzM+cW+CR/wd3H7dVN/rIxXLuWxxS30zthHVfgk+gtssvPQN2F 6TKLnIC8yaGgN6D68zcBFss4Ksf3CE3eUWNTEubFHI0wVcqnf1YZFWq8kZCVB1rFE85l xEcBvZu/3lf+u5mVB7knGxKavTkGC1pcyxPWPXc+lOUJmArascPl03zFwN1+RPEa80Ra yyKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Qd0t00eC2iONuirdaj+w0zePjQU67FNRgdalc2QG/ew=; b=JZtC8h/qrLZhjlVGZnuMF2WcZ7Lngqtn1Mes4Lz93IFP6YpxBHu4+Xg+Bl0JZ67B2w Jo1pDPZut3iuiyjIv1IobT8inNB07l7lSfo0gfOZ/YY7ZEXJLQV/x/Nz3akWyo1TQryF clUfplC9ggLh0SiWDxlSSP9xoZD6ci7sPaTSlwh0F4sQ6i3am+AradE4o79hW+j+mf1D 1tGEpFSpg8YvrHGJ1LLT6i79dc49IImD57jBBfD5aZGVdUnY+yoRw9vFTdJSVcZqmriR LF4iHyMO3WLC4TEQDEseQ1cZTpZyj/nV3mDiADwU5/3J8kjDUm/uqeOHBlRvE7o4Y5bH VYfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=smkGQZIf; 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 r12si11341034pfn.135.2019.03.28.10.09.41; Thu, 28 Mar 2019 10:09:56 -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=smkGQZIf; 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 S1727572AbfC1RIu (ORCPT + 99 others); Thu, 28 Mar 2019 13:08:50 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:44424 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfC1RIs (ORCPT ); Thu, 28 Mar 2019 13:08:48 -0400 Received: by mail-qt1-f193.google.com with SMTP id w5so23909622qtb.11 for ; Thu, 28 Mar 2019 10:08:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Qd0t00eC2iONuirdaj+w0zePjQU67FNRgdalc2QG/ew=; b=smkGQZIfUdf8DLhjPEu/U/ToZj4WmH6Z8k2l4BH3th9CJAbRIhUVJRvoZN4qITUR2q PwmOMtkwqpHrW+a7aqtk1ZYNaWhQE333A17h4eDgSB47wS41uquXV7p9sm9SjFbwMkb+ lBqhXm6f3KEC+ROYcljg24f9nJm/n18Y88sjaIZNugcIRR2xyVje8x0OjtKTZNnnZ+N9 Oq4+4S8DPKjqc+9g0Wfo1aB5N3vuaQD7adPUUPNcI9/NE1lcWhNEfIuk4D8cLUY6ZDjN kScEIaIALkqpFy01q6JnmgjIDv3xuKe6rp98M8wJLtdA8RPVK7QzLhQmnvga2RbK6aX3 HFTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qd0t00eC2iONuirdaj+w0zePjQU67FNRgdalc2QG/ew=; b=JemP4TDJmHI04BM38eLlORMQKkgNbj1UQB4CMCN1tCEWme/PqvRLbM3P6wX2TpKVYg w6ihLIhpPL3VYpboby2wQ/kPYhMGfCQ9XFUbYIvotboWEfda95Vu+WpqXtzi/4y3aXxC oasH34Gg81wRecy+Ww+830+gjtlQ13lcQT8oRoEefb777cPWrF7bKKWrKEUtLAuiMHGT g9mfqmJoXOJe0iBPCKoR63oA8qFxBILXRs/CgkuPKLYB/GIFYweNLe5LsWGjke/2mSYL pq1hM9pBlZV9OhOY+qi2xYmJPhcv/aM1QmWPsLeLdKry2FWAsEJ3x3JVlmqp/jFswY/5 X6WA== X-Gm-Message-State: APjAAAXSMCb1KpzGKaEKfOvy+MdFIQ2tMH5Qu5VU+QDv/ltcO9piYWKK //0Prm2u0I4WeS/OaQRsucbH9LZHb/b2yZTZPOk= X-Received: by 2002:a0c:bec4:: with SMTP id f4mr2459467qvj.17.1553792927732; Thu, 28 Mar 2019 10:08:47 -0700 (PDT) MIME-Version: 1.0 References: <1553648174-24913-1-git-send-email-v.mayatskih@gmail.com> <20190327164914.GE27283@stefanha-x1.localdomain> <20190328163647.GE18536@stefanha-x1.localdomain> In-Reply-To: <20190328163647.GE18536@stefanha-x1.localdomain> From: Vitaly Mayatskih Date: Thu, 28 Mar 2019 13:08:36 -0400 Message-ID: Subject: Re: [PATCH] vhost: zero vhost_vsock memory on allocation To: Stefan Hajnoczi Cc: Michal Hocko , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 28, 2019 at 12:36 PM Stefan Hajnoczi wrote: > vsock->hash is only read if vsock->guest_cid has already been set and > hence vsock->hash has been initialized too. I don't see where the > problem is. > > Was your tree missing commit a72b69dc083a931422cc8a5e33841aff7d5312f2 > ("vhost/vsock: fix uninitialized vhost_vsock->guest_cid")? > > Are you sure the crash can be reproduced on linux.git/master? You are right: we hit it on 4.14.91 while the guest_cid fix was backported in 4.14.93. Thus not a real issue. Sorry for confusion, vhost is something still new to me. > Sounds good. Please send a v2 that also removes the explicit zero > initialization since it's no longer needed with zalloc. I changed my mind, all the rest is initialized explicitly, let's keep it that way. Will send the patch shortly. -- wbr, Vitaly