Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp333426ybt; Wed, 17 Jun 2020 02:04:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgdMaezb2WNFb1Yn/wSbERuLv0hUvFvXzIqY1Wi7l1s+2cokgktYz3HsvyAzq+wKUTs2n2 X-Received: by 2002:a50:fb0b:: with SMTP id d11mr6499490edq.118.1592384642720; Wed, 17 Jun 2020 02:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592384642; cv=none; d=google.com; s=arc-20160816; b=ususeCGKBppRCZaXzKYAxwxJHrIwYoSg8ThPhliYSG1uy36AAWRrrutxlpJoxJQz2Y JAcDZLT4OIHasa619qedjCHkUBJb1ETZErxMj9zaN+5Mdv3VjFRQhhw8RP7YIE12pkPd q2HrYiMCjSuu3S3VsRDmsI8u3sfkXd0GB34/tyNd2l4hOh9BelVEnSALzPC3S02kKrSB Z865BTh4g4JUhywEKWGiwctH1ZcMYIG5KGkT9uoTDWfJmwUFgougLbdVcz8Vtevzk95e Dc/IoO7bGG+OWQZ4r7IhBGJ8T+no6DNRQflSZr64NpkaYywJ4TJCYSI4NUccSIR7w+dc +xLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=XUMYIMgktV47hO1apTnAbkFkfbXSCLELlq+7VFExrRw=; b=JojIVinIhpxVqlLTW7O43sh/sTJSrBkowOS2MUPUKwNW+lPKY/8U+a8siOARFTuVQY 7IroyUmKav+/zVgFtBVD7aRD0Tc3j+tbVFXeOwEUBPCuSjHdVhdCWQS9gBzSBL8atUeG pmd9wAduiZ0lx1PhzWmrRGDujHmBye6Z2nvFIaNqjxFlSRBPaBB/nqg7JbtiqnSPgIUq 8E2OzwxKzodMPtX3vuF4Lv9cdNG4dZuBKzQ4kySP/PlePfhiQKzd7Lt6WYBPsFCoFCVj /9J6Z3LP1F0Q4imSZ5LPasUgpRkCHOo6Q/sxWvVD+bLF2FWR/KUd/4TvZ52Wip17K7re l4Mw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z18si12688564ejb.75.2020.06.17.02.03.39; Wed, 17 Jun 2020 02:04:02 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726275AbgFQJBO (ORCPT + 99 others); Wed, 17 Jun 2020 05:01:14 -0400 Received: from mga11.intel.com ([192.55.52.93]:29411 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725846AbgFQJBO (ORCPT ); Wed, 17 Jun 2020 05:01:14 -0400 IronPort-SDR: gx/nfCAFI5A7yr97/E4VC+Lza9Unxfmd/LJ16odFuY/OhuPPDtf7aSDnHbXFNzN5Z+FBF+Tg65 lJ4sgFpAa8Dw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2020 02:01:13 -0700 IronPort-SDR: 1EHO5A9ZzltPr6eUbyfMxiVDw5XQvHbkIJrhUmlOcYEY2ZpTZfSsRcFaOjpKCrk/N8UQUga00W QewxJ2djxM2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,522,1583222400"; d="scan'208";a="383134636" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001.fm.intel.com with ESMTP; 17 Jun 2020 02:01:09 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1jlTwV-00E1Aj-KM; Wed, 17 Jun 2020 12:01:11 +0300 Date: Wed, 17 Jun 2020 12:01:11 +0300 From: Andy Shevchenko To: Bjorn Helgaas Cc: Shiju Jose , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, bp@alien8.de, james.morse@arm.com, lenb@kernel.org, tony.luck@intel.com, dan.carpenter@oracle.com, zhangliguang@linux.alibaba.com, wangkefeng.wang@huawei.com, jroedel@suse.de, yangyicong@hisilicon.com, jonathan.cameron@huawei.com, tanxiaofei@huawei.com Subject: Re: [PATCH v9 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe controller errors Message-ID: <20200617090111.GC2428291@smile.fi.intel.com> References: <20200615101552.802-3-shiju.jose@huawei.com> <20200616232019.GA1987909@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200616232019.GA1987909@bjorn-Precision-5520> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 16, 2020 at 06:20:19PM -0500, Bjorn Helgaas wrote: > On Mon, Jun 15, 2020 at 11:15:52AM +0100, Shiju Jose wrote: > > From: Yicong Yang > > + if (!guid_equal((guid_t *)gdata->section_type, &hisi_pcie_sec_type) || > > + error_data->socket_id != socket) > > + return NOTIFY_DONE; > > I think you have to verify the GUID first before you can even safely > extract a struct hisi_pcie_error_private from the payload: > > if (!guid_equal(...)) > return NOTIFY_DONE; I just also noticed the ugly cast there. So, please import GUID first (import_guid() I think is what you need). -- With Best Regards, Andy Shevchenko