Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6173185yba; Tue, 14 May 2019 03:04:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAkBN9/kzDZSHKano37wfR8WHTIfNzLXI8y/yrV9O0E/dqXcZUDMPnw5FbxvsEEd5EPkLB X-Received: by 2002:a62:470e:: with SMTP id u14mr40036877pfa.31.1557828263559; Tue, 14 May 2019 03:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557828263; cv=none; d=google.com; s=arc-20160816; b=pChWNA+L5vlSKUzr64MsiGwe/801dkZT71pExL0pHlZZ8AA5b/B11vmuErVT4he9lP 41pBishKFp6vS0k+Huh/3XAi1xEw91TqFt+s/nlvjs6Qfz3onQg3OXeCSUwFa3gKZPSZ hMQFopaDz8mt4eoQRfnVupdKsZFJyV6KQGIf6NN7HNysBHn30D4EtRhYV0KQYzDVvXvM X/qIKI/2u0UJ+s0Odxr0g2woqQRmQ9iRowRPmWbgcy2WQR3diSBEFf4bANaEQBZwPhQ9 mfwtq3K53WJ2bYv58Lkcz4jWeBFYnOz/oRDzRtbxrJU8sE88HLnh0G5boJ/nQerx9Agf 9CNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=kQvxYc/hKXKWCbBwnPuKNr69csIHRSMYGYOiSVVmIkA=; b=W3j5tk1yMbfyMaCkBFZWRNwu1ZxbJqxy7p0QnOj8EPtNvavxmYBDFo66Oo40kZoCH6 KVpsZw7R94h5eEIwsnAfWO6b0RqeVEdZxikg32OXiB8fppUf6S9PvKoZcJ6tEg01linL Jtd3lZ+k5Ilno/0SgYD2I+BqdCSA4SJG4cij5q6QBj24jmf53fiJ5C6Q9IR1fGPv3NBN xE/CHFhTrFCvoiAsvkzUMnQ1BqhE1wcBjyJpo9BJp32ytx6XM9o6sIyrsU2qXLaB8d4j yzWq9Z5Lsp5TCUyyoV/YwlzmLo0R7YZ7JjXpzFIHfYHqyuxpAWkbgM8bFDJ0FxrYFpZe d7lQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si19748578pgd.65.2019.05.14.03.04.07; Tue, 14 May 2019 03:04:23 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726513AbfENKCx (ORCPT + 99 others); Tue, 14 May 2019 06:02:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36718 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbfENKCx (ORCPT ); Tue, 14 May 2019 06:02:53 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8C74C30198BD; Tue, 14 May 2019 10:02:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96F1A63B8B; Tue, 14 May 2019 10:02:51 +0000 (UTC) Received: from zmail21.collab.prod.int.phx2.redhat.com (zmail21.collab.prod.int.phx2.redhat.com [10.5.83.24]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 412B818089C8; Tue, 14 May 2019 10:02:49 +0000 (UTC) Date: Tue, 14 May 2019 06:02:48 -0400 (EDT) From: Pankaj Gupta To: David Hildenbrand Cc: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-acpi@vger.kernel.org, qemu-devel@nongnu.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, dan j williams , zwisler@kernel.org, vishal l verma , dave jiang , mst@redhat.com, jasowang@redhat.com, willy@infradead.org, rjw@rjwysocki.net, hch@infradead.org, lenb@kernel.org, jack@suse.cz, tytso@mit.edu, adilger kernel , darrick wong , lcapitulino@redhat.com, kwolf@redhat.com, imammedo@redhat.com, jmoyer@redhat.com, nilal@redhat.com, riel@surriel.com, stefanha@redhat.com, aarcange@redhat.com, david@fromorbit.com, cohuck@redhat.com, xiaoguangrong eric , pbonzini@redhat.com, kilobyte@angband.pl, yuval shaia , jstaron@google.com Message-ID: <919431491.28558886.1557828168896.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20190510155202.14737-1-pagupta@redhat.com> <20190510155202.14737-3-pagupta@redhat.com> <752392764.28554139.1557826022323.JavaMail.zimbra@redhat.com> <86298c2c-cc7c-5b97-0f11-335d7da8c450@redhat.com> <712871093.28555872.1557827242385.JavaMail.zimbra@redhat.com> Subject: Re: [PATCH v8 2/6] virtio-pmem: Add virtio pmem driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.65.16.148, 10.4.195.1] Thread-Topic: virtio-pmem: Add virtio pmem driver Thread-Index: TcH/fzTmTGlr7ZcMfiu1eOEXog6lYw== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 14 May 2019 10:02:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > >> > >> I think you should do the same here, vdev->priv is allocated in > >> virtio_pmem_probe. > >> > >> But maybe I am missing something important here :) > > > > Because virtio_balloon use "kzalloc" for allocation and needs to be freed. > > But virtio pmem uses "devm_kzalloc" which takes care of automatically > > deleting > > the device memory when associated device is detached. > > Hehe, thanks, that was the part that I was missing! Thank you for the review. Best regards, Pankaj > > -- > > Thanks, > > David / dhildenb >