Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3962164pxb; Mon, 1 Feb 2021 08:58:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/QUlfRxGQz832A2m1WiDOANW7549yWNgrpZ9ONnruxy8KQN3VJkRRAzTXBrPtmDRB98G4 X-Received: by 2002:a17:906:a00e:: with SMTP id p14mr18839504ejy.532.1612198728050; Mon, 01 Feb 2021 08:58:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612198728; cv=none; d=google.com; s=arc-20160816; b=0d4t2PGOtbUtqgbi1gqncRIppE4TEBpBm6uje1l700LBE8s//hMp7P9ayBKJgZvDPI AUrp7LvZeW0vEQrHadU9tKJ+AKSUGxG0wM6LEuNfp8HpkGIQwwE9CNScoAFB+7e2wkly S4kgpJR48LCyDC15U335TRtbqKpjQwzh4XGkHx4rVqqTs5uQbi8f6DKQnZ7rFUGs2cCr 9LMlAx55jgiI7X7AKS2/0BtF6JiPpa4jbQR7ZWm5dprAYpc5nUcEaZx6BbXJzrzRrA2F qFgFc6GfFzG7w8YSnTmnc/AWr0oGFzcIjN7DD11GHkrRvLdbZRYpqUqUVt9vCXnyslWc iNlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=gk2/jVFcOiHNETdBynXJ/yTxuiyuRTVxnfL8YgjYp6s=; b=rpy1gEmzOzDWMlTkqj3IK/L27abMRpWCujj7bLem6z6xvmXlZNva7Hvrm8ZW7bdQll xA4BfkvNaoEYnOvzEjzHmtcq301NFYHwzLYCIKA2v+uGmqWoGodOjcUw+XRzodpWmNBH tFDiDGgzWk+IV0DK081aippXfreT1FGneQX1O3majBZysc2xPCdRMQJt3gcoRCykCDCa 9a6ja7pOqtAvkX4uAM9cpdxMyNQSDiWSSsGbpULMWlkTGNxIeAtj5vgCEXvyiNoLbl3i rN453qSgzcWDfRZ8IfvjFRlr8mBe4/hU09wqW09r+YQaVAGqTSHnFAxh933HK954bjF5 psAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CJVPnRUl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j4si814553ejv.17.2021.02.01.08.58.22; Mon, 01 Feb 2021 08:58:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CJVPnRUl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231929AbhBAQ5d (ORCPT + 99 others); Mon, 1 Feb 2021 11:57:33 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:56742 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231175AbhBAQyQ (ORCPT ); Mon, 1 Feb 2021 11:54:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612198369; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gk2/jVFcOiHNETdBynXJ/yTxuiyuRTVxnfL8YgjYp6s=; b=CJVPnRUlZIN/DIAfSv2ZEWdAPMpqJz2ma3VhxJ+cqQunSnQl7QKz6xeA32VsJFdv/ykS19 vA60i9dMVzBCz/BFu9J0cky3uWQxHcoqM6jUDaHigHMeuOGTdQ15wNPC52m7VOeRAxDS7u B4sFPB6Oba1TymZE2vRqrDNjG67s/B8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-257-qlwRDgIzPtCBXhCiapM7Kw-1; Mon, 01 Feb 2021 11:52:45 -0500 X-MC-Unique: qlwRDgIzPtCBXhCiapM7Kw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1FBEA1006292; Mon, 1 Feb 2021 16:52:21 +0000 (UTC) Received: from gondolin (ovpn-113-126.ams2.redhat.com [10.36.113.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A4CA60C66; Mon, 1 Feb 2021 16:52:17 +0000 (UTC) Date: Mon, 1 Feb 2021 17:52:14 +0100 From: Cornelia Huck To: Max Gurtovoy Cc: , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 6/9] vfio-pci/zdev: fix possible segmentation fault issue Message-ID: <20210201175214.0dc3ba14.cohuck@redhat.com> In-Reply-To: <20210201162828.5938-7-mgurtovoy@nvidia.com> References: <20210201162828.5938-1-mgurtovoy@nvidia.com> <20210201162828.5938-7-mgurtovoy@nvidia.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Feb 2021 16:28:25 +0000 Max Gurtovoy wrote: > In case allocation fails, we must behave correctly and exit with error. > > Signed-off-by: Max Gurtovoy Fixes: e6b817d4b821 ("vfio-pci/zdev: Add zPCI capabilities to VFIO_DEVICE_GET_INFO") Reviewed-by: Cornelia Huck I think this should go in independently of this series. > --- > drivers/vfio/pci/vfio_pci_zdev.c | 4 ++++ > 1 file changed, 4 insertions(+)