From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 765691922FE; Thu, 29 Aug 2024 16:17:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724948271; cv=none; b=Vf6DziHk4qX7Cmxq3bduxAaJXlMXJclZWi8AVd5VoB3MorO8I7KArN+RWcedA1jhd2d0Q9wN/eqrV2Y41d2zBkpCWrmgkGJcflVgvGdKW9MsOm/XD9quzteqV7v5Ahnu4wAF5yMvGxj+2grFdabDO6+8JO4ZpzGcGosKqrWL4gQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724948271; c=relaxed/simple; bh=jjnFKvczBENKiZiDjjEQLKForEKb+4c2ND9lOv0yeHw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GY1U1v+haN2QbA0C1lRMFrA2hqSlP0JJbVW2QvURt+35sTkDe8cbmQfdgNfZ900tFaC7De6xDoZqxu2cK16UtSfaRfvLuLb0ftmbrWOBtNLsDYXY928IjPRcXcI7TywK8K/n4dQLVFtQnLLy5V+6b2YEi6UdpMUFBQGfr1bNjnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9E2DEDA7; Thu, 29 Aug 2024 09:18:14 -0700 (PDT) Received: from bogus (e107155-lin.cambridge.arm.com [10.1.198.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B3ED83F762; Thu, 29 Aug 2024 09:17:46 -0700 (PDT) Date: Thu, 29 Aug 2024 17:17:44 +0100 From: Sudeep Holla To: Aleksandr Mishin Cc: Fu Wei , Lorenzo Pieralisi , Hanjun Guo , "Rafael J. Wysocki" , Len Brown , Mark Rutland , , , , Subject: Re: [PATCH] acpi/arm64: Adjust error handling procedure in gtdt_parse_timer_block() Message-ID: References: <20240827101239.22020-1-amishin@t-argos.ru> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240827101239.22020-1-amishin@t-argos.ru> On Tue, Aug 27, 2024 at 01:12:39PM +0300, Aleksandr Mishin wrote: > In case of error in gtdt_parse_timer_block() invalid 'gtdt_frame' > will be used in 'do {} while (i-- >= 0 && gtdt_frame--);' statement block > because do{} block will be executed even if 'i == 0'. > > Adjust error handling procedure by replacing 'i-- >= 0' with 'i-- > 0'. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > (For some reason I don't see the original email in my inbox, might have got blocked 🙁). Anyways LGTM, Acked-by: Aleksandr Mishin -- Regards, Sudeep