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

Commit 5ef64761 authored by Steven Rostedt's avatar Steven Rostedt Committed by Ingo Molnar
Browse files

pid: fix the do_each_pid_task() macro



Impact: macro side-effects fix

This patch adds parenthesis around 'pid' in the do_each_pid_task
macro to allow callers to pass in more complex parameters.

e.g.  do_each_pid_task(*pid, type, task)

Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 804a6851
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -147,9 +147,9 @@ pid_t pid_vnr(struct pid *pid);
#define do_each_pid_task(pid, type, task)				\
#define do_each_pid_task(pid, type, task)				\
	do {								\
	do {								\
		struct hlist_node *pos___;				\
		struct hlist_node *pos___;				\
		if (pid != NULL)					\
		if ((pid) != NULL)					\
			hlist_for_each_entry_rcu((task), pos___,	\
			hlist_for_each_entry_rcu((task), pos___,	\
				&pid->tasks[type], pids[type].node) {
				&(pid)->tasks[type], pids[type].node) {


			/*
			/*
			 * Both old and new leaders may be attached to
			 * Both old and new leaders may be attached to