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

!15760 uprobes: Reject the shared zeropage in uprobe_write_opcode()

parents 99e8874a 888374a0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -488,6 +488,11 @@ int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm,
	if (ret <= 0)
		goto put_old;

	if (is_zero_pfn(page_to_pfn(old_page))) {
		ret = -EINVAL;
		goto put_old;
	}

	if (WARN(!is_register && PageCompound(old_page),
		 "uprobe unregister should never work on compound page\n")) {
		ret = -EINVAL;