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

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

parents 7ddc52ba 58b000b7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -483,6 +483,11 @@ int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm,
	if (ret <= 0)
		goto put_old;

	if (is_zero_page(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;