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

!4805 CVE-2023-52451 backport to OLK-5.10 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/M3EO3H6CYIIULY23FMGL5VOT753OVE7N/ 

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/4805

 

Reviewed-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 7839b9d4 175ae185
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -481,7 +481,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) {
@@ -495,14 +495,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;
}
@@ -719,7 +720,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);
		}