Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a81ce79b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull arm64 ptrace fix from Catalin Marinas.

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: ptrace: avoid using HW_BREAKPOINT_EMPTY for disabled events
parents df36ac1b cdc27c27
Loading
Loading
Loading
Loading
+18 −20
Original line number Diff line number Diff line
@@ -214,10 +214,10 @@ static int ptrace_hbp_fill_attr_ctrl(unsigned int note_type,
{
	int err, len, type, disabled = !ctrl.enabled;

	if (disabled) {
		len = 0;
		type = HW_BREAKPOINT_EMPTY;
	} else {
	attr->disabled = disabled;
	if (disabled)
		return 0;

	err = arch_bp_generic_fields(ctrl, &len, &type);
	if (err)
		return err;
@@ -234,11 +234,9 @@ static int ptrace_hbp_fill_attr_ctrl(unsigned int note_type,
	default:
		return -EINVAL;
	}
	}

	attr->bp_len	= len;
	attr->bp_type	= type;
	attr->disabled	= disabled;

	return 0;
}