lkml.org 
[lkml]   [2008]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/3] fix the do_each_pid_task macro
    From: Steven Rostedt <srostedt@redhat.com>

    Impact: 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: Steven Rostedt <srostedt@redhat.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    ---
    include/linux/pid.h | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/include/linux/pid.h b/include/linux/pid.h
    index d7e98ff..bb206c5 100644
    --- a/include/linux/pid.h
    +++ b/include/linux/pid.h
    @@ -147,9 +147,9 @@ pid_t pid_vnr(struct pid *pid);
    #define do_each_pid_task(pid, type, task) \
    do { \
    struct hlist_node *pos___; \
    - if (pid != NULL) \
    + if ((pid) != NULL) \
    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
    --
    1.5.6.5
    --


    \
     
     \ /
      Last update: 2008-12-04 06:31    [W:4.094 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site