* + mm-smaps_rollup-return-empty-file-for-kthreads-instead-of-esrch.patch added to -mm tree
@ 2022-04-13 21:29 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-04-13 21:29 UTC (permalink / raw)
To: mm-commits, alex_y_xu, akpm
The patch titled
Subject: mm/smaps_rollup: return empty file for kthreads instead of ESRCH
has been added to the -mm tree. Its filename is
mm-smaps_rollup-return-empty-file-for-kthreads-instead-of-esrch.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-smaps_rollup-return-empty-file-for-kthreads-instead-of-esrch.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-smaps_rollup-return-empty-file-for-kthreads-instead-of-esrch.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
Subject: mm/smaps_rollup: return empty file for kthreads instead of ESRCH
This restores the behavior prior to 258f669e7e88 ("mm:
/proc/pid/smaps_rollup: convert to single value seq_file"), making it once
again consistent with maps and smaps, and allowing patterns like awk
'$1=="Anonymous:"{x+=$2}END{print x}' /proc/*/smaps_rollup to work.
Searching all Debian packages for "smaps_rollup" did not find any programs
which would be affected by this change.
Link: https://lkml.kernel.org/r/20220413211357.26938-1-alex_y_xu@yahoo.ca
Fixes: 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value seq_file")
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
--- a/fs/proc/task_mmu.c~mm-smaps_rollup-return-empty-file-for-kthreads-instead-of-esrch
+++ a/fs/proc/task_mmu.c
@@ -883,10 +883,8 @@ static int show_smaps_rollup(struct seq_
return -ESRCH;
mm = priv->mm;
- if (!mm || !mmget_not_zero(mm)) {
- ret = -ESRCH;
+ if (!mm || !mmget_not_zero(mm))
goto out_put_task;
- }
memset(&mss, 0, sizeof(mss));
_
Patches currently in -mm which might be from alex_y_xu@yahoo.ca are
mm-smaps_rollup-return-empty-file-for-kthreads-instead-of-esrch.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-13 21:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13 21:29 + mm-smaps_rollup-return-empty-file-for-kthreads-instead-of-esrch.patch added to -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.