staging/lustre: fix misuse of current->parent.
authorNeilBrown <neilb@suse.de>
Fri, 18 Jul 2014 05:39:19 +0000 (15:39 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jul 2014 23:35:42 +0000 (16:35 -0700)
current->parent is used by ptrace to redirect some signal delivery
to the ptracer.  It should only be used by 'ptrace' or 'signal' code.
All other users should  use current->real_parent, which is the real
parent.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/lproc_llite.c

index e48f323c0d71f76ffe96d305000123c18bd2cd82..13586c55b5703f747cc2aad35358c7dd44f574a9 100644 (file)
@@ -910,7 +910,7 @@ void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count)
                 sbi->ll_stats_track_id == current->pid)
                lprocfs_counter_add(sbi->ll_stats, op, count);
        else if (sbi->ll_stats_track_type == STATS_TRACK_PPID &&
-                sbi->ll_stats_track_id == current->parent->pid)
+                sbi->ll_stats_track_id == current->real_parent->pid)
                lprocfs_counter_add(sbi->ll_stats, op, count);
        else if (sbi->ll_stats_track_type == STATS_TRACK_GID &&
                 sbi->ll_stats_track_id ==