From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, zhaochongxi2019@email.szu.edu.cn,
zhangyinan2019@email.szu.edu.cn, yejiajian2018@email.szu.edu.cn,
hanshenghong2019@email.szu.edu.cn,
caoyixuan2019@email.szu.edu.cn, akpm@linux-foundation.org
Subject: + mm-page_ownerc-use-get_task_comm-to-record-task-command-name-with-the-protection-of-task_lock.patch added to -mm tree
Date: Wed, 20 Apr 2022 14:47:51 -0700 [thread overview]
Message-ID: <20220420214752.738F3C385A1@smtp.kernel.org> (raw)
The patch titled
Subject: mm/page_owner.c: use get_task_comm() to record task command name with the protection of task_lock()
has been added to the -mm tree. Its filename is
mm-page_ownerc-use-get_task_comm-to-record-task-command-name-with-the-protection-of-task_lock.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-page_ownerc-use-get_task_comm-to-record-task-command-name-with-the-protection-of-task_lock.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-page_ownerc-use-get_task_comm-to-record-task-command-name-with-the-protection-of-task_lock.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: Yixuan Cao <caoyixuan2019@email.szu.edu.cn>
Subject: mm/page_owner.c: use get_task_comm() to record task command name with the protection of task_lock()
I noticed that it is advised to access task command name with
[gs]et_task_comm() in the comment of task_struct->comm, which is safer
with the protection of task_lock().
Relative comment in include/linux/sched.h is as follows:
/*
* executable name, excluding path.
*
* - normally initialized setup_new_exec()
* - access it with [gs]et_task_comm()
* - lock it with task_lock()
*/
Link: https://lkml.kernel.org/r/20220420122817.67181-1-caoyixuan2019@email.szu.edu.cn
Signed-off-by: Yixuan Cao <caoyixuan2019@email.szu.edu.cn>
Cc: Yinan Zhang <zhangyinan2019@email.szu.edu.cn>
Cc: Jiajian Ye <yejiajian2018@email.szu.edu.cn>
Cc: Shenghong Han <hanshenghong2019@email.szu.edu.cn>
Cc: Chongxi Zhao <zhaochongxi2019@email.szu.edu.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/page_owner.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/mm/page_owner.c~mm-page_ownerc-use-get_task_comm-to-record-task-command-name-with-the-protection-of-task_lock
+++ a/mm/page_owner.c
@@ -168,8 +168,7 @@ static inline void __set_page_owner_hand
page_owner->pid = current->pid;
page_owner->tgid = current->tgid;
page_owner->ts_nsec = local_clock();
- strlcpy(page_owner->comm, current->comm,
- sizeof(page_owner->comm));
+ get_task_comm(page_owner->comm, current);
__set_bit(PAGE_EXT_OWNER, &page_ext->flags);
__set_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags);
_
Patches currently in -mm which might be from caoyixuan2019@email.szu.edu.cn are
tools-vm-page_owner_sortc-provide-allocator-labelling-and-update-cull-and-sort-options.patch
tools-vm-page_owner_sortc-avoid-repeated-judgments.patch
mm-page_ownerc-use-get_task_comm-to-record-task-command-name-with-the-protection-of-task_lock.patch
mm-vmalloc-fix-a-comment.patch
reply other threads:[~2022-04-20 21:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220420214752.738F3C385A1@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=caoyixuan2019@email.szu.edu.cn \
--cc=hanshenghong2019@email.szu.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=yejiajian2018@email.szu.edu.cn \
--cc=zhangyinan2019@email.szu.edu.cn \
--cc=zhaochongxi2019@email.szu.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.