Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8200411ybi; Tue, 23 Jul 2019 04:34:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwelUurML1F3K1GAglFSqlZyw24uZiUDOmStFK10OqjdQThTjCewkUlFNCh3Y9pENYPVID+ X-Received: by 2002:a63:24c1:: with SMTP id k184mr77767417pgk.120.1563881665979; Tue, 23 Jul 2019 04:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563881665; cv=none; d=google.com; s=arc-20160816; b=fUjiC9fyHbu+sVQAEgxG2cSe/nA/UvRJpWJ25+21P1lIuovTkHFDFXHUdVNeoOpY3R PHuav8ci0L5n/SGht4Eo7n+c9tBIqpWzfjteB49/zcIa9a0aK9pR85Sw/wWID1Y5zQSs XC45dPAwtL5uRF1xTcd5NhForYgINVztfMCGWCIkzvYTST7sYMaou3jLQB6E4yVSweWa HV3wiGGOcTVlVfCsI813/HaFw4XbsAmnS5Le7nBDybqM1kCxCXa6ZYM9OiuHRg2zp2Dj uQmDJ2CaE6TdY06wLVzQ2TenuxHv445mHTzjKAmdFMZdGEu2T22INj+/gnm0yATIX4y/ dFng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Ijry39RXjtDc/kv4lMyO5yIauJT7yYEm5siLpZYR69I=; b=jurMjjVzVdQ09wClw3eUlloJWX4qn1OmScBPER0tJc2PbmCXfX9G9guxf/yam+By19 UPUn0AxV7hU0cMYd/rU2gT3TTWtjR3Hj5BdAp4XuVAKmtRkutrZTQwqmihKKE9wE/2Jt Fq232fX4bgBbuG5QrH0Xq9v7uwF6Zbe/l+9cEnWQxzCAtja3FGlq3fIA/4Zmn0koIee2 qI+SprYSQPmk8DzSYEjgwVZ656JmVI7qs9TSDjYtBf2uwIELZN6zKfWBPktdRKGAlYJu AZ8uR4By0d5aO6gAES9AC19MzMYdI6VZezC7x+4yJ01GsgnTtxK4v33ir52PuPm3uERH Pd6g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20si11515614pgg.565.2019.07.23.04.34.09; Tue, 23 Jul 2019 04:34:25 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731934AbfGWBtJ (ORCPT + 99 others); Mon, 22 Jul 2019 21:49:09 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:36442 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731922AbfGWBtI (ORCPT ); Mon, 22 Jul 2019 21:49:08 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3523DDCD025E4E7C7BA0; Tue, 23 Jul 2019 09:49:07 +0800 (CST) Received: from [127.0.0.1] (10.177.223.23) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Jul 2019 09:49:02 +0800 Subject: Re: [PATCH] ACPI/IORT: Fix off-by-one check in iort_dev_find_its_id() To: Lorenzo Pieralisi , CC: Dan Carpenter , Will Deacon , Sudeep Holla , Catalin Marinas , Robin Murphy , LKML , LAKML References: <20190722162548.23610-1-lorenzo.pieralisi@arm.com> From: Hanjun Guo Message-ID: <1d18ce4f-ecd5-4295-60ea-aff5a0d83cb2@huawei.com> Date: Tue, 23 Jul 2019 09:48:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20190722162548.23610-1-lorenzo.pieralisi@arm.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.223.23] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/7/23 0:25, Lorenzo Pieralisi wrote: > Static analysis identified that index comparison against ITS entries in > iort_dev_find_its_id() is off by one. > > Update the comparison condition and clarify the resulting error > message. > > Fixes: 4bf2efd26d76 ("ACPI: Add new IORT functions to support MSI domain handling") > Link: https://lore.kernel.org/linux-arm-kernel/20190613065410.GB16334@mwanda/ > Reported-by: Dan Carpenter > Signed-off-by: Lorenzo Pieralisi > Cc: Dan Carpenter > Cc: Will Deacon > Cc: Hanjun Guo > Cc: Sudeep Holla > Cc: Catalin Marinas > Cc: Robin Murphy Reviewed-by: Hanjun Guo