From: Mr. NeilBrown Date: Mon, 15 Nov 2021 19:16:54 +0000 (-0500) Subject: LU-12511 llite: fix misuse of current->parent. X-Git-Tag: 2.14.56~52 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=4e4618ced462abe18d9fef9409f6e6e49ed1fda1 LU-12511 llite: fix misuse of current->parent. 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. Change-Id: I3212fd9f3db9935b8144dba8af82eb2f387a5c45 Signed-off-by: Mr. NeilBrown Signed-off-by: Greg Kroah-Hartman Reviewed-on: https://review.whamcloud.com/45580 Tested-by: jenkins Reviewed-by: Patrick Farrell Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c index e17effd..4b4d270 100644 --- a/lustre/llite/lproc_llite.c +++ b/lustre/llite/lproc_llite.c @@ -1768,7 +1768,7 @@ void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, long 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 ==