[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] device-tree: fix infinite loop issue in 'assign_shared_memory()'


  • To: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 1 Sep 2025 12:51:18 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=p+Yxk7jc3b5WPUKFLYqIYBiG+mHtJeAvRcajD3ti/Xo=; b=em6tY4iTJxpft5lO5Jx1FyNGWgSJxrb0PNzEZEXG36f9MVT1Sx4n3CaKlosCLwEm7ih6+dTk20KcwjlyGVNbgwElwGMwFQQUeDC6bLsgf0Ax4np++POqagRLww1NYnaSZjN1BwnA+r0gbGdNYuR9XsRWtIXCTHJmEVTE00vKo8OEP2y8Ov5rS/MqIeGrHfWu10l0uqj9N086VdsdLZr+st/3ssXCbof715yAtlx78HBqKpDmn6I8pR1GQDh8IrinfX3uMhi5IqIxgRfASTVUL8CbWDL3G0DnsFLuaniTdVGcdx3L7ZVcK2vNT+2pzGxnyHga3/NICJlGQDNPTuNR9Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=P2+qwlO2ejaTL5JkaafZkvPpwpzIKc8Rw/Kk5iWMt6aDhGoRX++HoLXFHn0ps366onzcxixKlwQrdn1h1DoFAYURnAdavHwpbjmgZxRMTC7aIoql/lx/O+YYaHW2ivHMjlH4m66Zk46YgAlEDl73XMsGjq0ag712Edoa33oWIETwKzEdLIiKuhguybFns9G54xfHWevyariQNUqpwKL6sWDm9bvYMlWis2YCK57EfMpFuvWuo/mB2ERk9QyNEi008SSPx6MC7ugmjgt2YtEskATnAyEsxMRoKic2VNsIUbTiNrparKNEoZcH6lX4MPP5WU9XplA15HtLBw9858yHHg==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Delivery-date: Mon, 01 Sep 2025 10:51:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 01/09/2025 11:26, Dmytro Prokopchuk1 wrote:
> Fix an issue in the 'fail:' cleanup path of the 'assign_shared_memory()'
> function where the use of an unsigned long 'i' with the condition
> '--i >= 0' caused an infinite loop. Update the loop to use 'i--',
> ensuring correct loop termination.
> 
> This change adheres to MISRA C Rule 14.3: "Controlling expressions shall
> not be invariant."
> 
> Fixes: 041957bad382 ("xen/arm: Add additional reference to owner domain when 
> the owner is allocated")
> Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx>
Acked-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.