Unverified Commit a336533d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4804 CVE-2023-52451 backport to 4.19 v2

Merge Pull Request from: @ci-robot 
 
PR sync from: Lin Yujun <linyujun809@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/WKYXKG4TL7KBNZEIZG2BUA3OUA64N4DM/ 
*** BLURB HERE ***

Laurent Dufour (1):
  powerpc/pseries/memhotplug: Quieten some DLPAR operations

Nathan Lynch (1):
  powerpc/pseries/memhp: Fix access beyond end of drmem array


-- 
2.34.1
 
https://gitee.com/src-openeuler/kernel/issues/I932VC 
 
Link:https://gitee.com/openeuler/kernel/pulls/4804

 

Reviewed-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parents 41d0180b cef65c7e
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -490,7 +490,7 @@ static int dlpar_memory_remove_by_index(u32 drc_index)
	int lmb_found;
	int rc;

	pr_info("Attempting to hot-remove LMB, drc index %x\n", drc_index);
	pr_debug("Attempting to hot-remove LMB, drc index %x\n", drc_index);

	lmb_found = 0;
	for_each_drmem_lmb(lmb) {
@@ -504,14 +504,15 @@ static int dlpar_memory_remove_by_index(u32 drc_index)
		}
	}

	if (!lmb_found)
	if (!lmb_found) {
		pr_debug("Failed to look up LMB for drc index %x\n", drc_index);
		rc = -EINVAL;

	if (rc)
		pr_info("Failed to hot-remove memory at %llx\n",
	} else if (rc) {
		pr_debug("Failed to hot-remove memory at %llx\n",
			 lmb->base_addr);
	else
		pr_info("Memory at %llx was hot-removed\n", lmb->base_addr);
	} else {
		pr_debug("Memory at %llx was hot-removed\n", lmb->base_addr);
	}

	return rc;
}
@@ -764,7 +765,7 @@ static int dlpar_memory_add_by_count(u32 lmbs_to_add)
			if (!drmem_lmb_reserved(lmb))
				continue;

			pr_info("Memory at %llx (drc index %x) was hot-added\n",
			pr_debug("Memory at %llx (drc index %x) was hot-added\n",
				 lmb->base_addr, lmb->drc_index);
			drmem_remove_lmb_reservation(lmb);
		}