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

Commit cc650a7a authored by Kyle McMartin's avatar Kyle McMartin Committed by Kyle McMartin
Browse files

[PARISC] be more defensive in process.c::get_wchan



While debugging, I noticed we don't check the task_struct arg passed to
get_wchan, whereas everyone else does.

Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent 376e210b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -381,6 +381,10 @@ get_wchan(struct task_struct *p)
	struct unwind_frame_info info;
	unsigned long ip;
	int count = 0;

	if (!p || p == current || p->state == TASK_RUNNING)
		return 0;

	/*
	 * These bracket the sleeping functions..
	 */