* [PATCH RESEND] kernel/fork: Update obsolete use_mm references to kthread_use_mm
@ 2026-01-06 7:05 mingzhu.wang(王明珠)
2026-01-06 9:26 ` Michal Hocko
0 siblings, 1 reply; 5+ messages in thread
From: mingzhu.wang(王明珠) @ 2026-01-06 7:05 UTC (permalink / raw)
To: kees@kernel.org, mingo@redhat.com, peterz@infradead.org,
akpm@linux-foundation.org, david@redhat.com
Cc: dietmar.eggemann@arm.com, mgorman@suse.de, vbabka@suse.cz,
rppt@kernel.org, surenb@google.com, mhocko@suse.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jiazi Li
The comment for get_task_mm() in kernel/fork.c incorrectly references the deprecated function `use_mm()`, which has been renamed to `kthread_use_mm()` in kernel/kthread.c.
This patch updates the documentation to reflect the current function names, ensuring accuracy when developers refer to the kernel thread memory context API.
No functional changes were introduced.
Signed-off-by: mingzhu.wang <mingzhu.wang@transsion.com>
---
kernel/fork.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/fork.c b/kernel/fork.c index c4ada32598bd..64e228c541bc 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1312,7 +1312,7 @@ struct file *get_task_exe_file(struct task_struct *task)
* @task: The task.
*
* Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning
- * this kernel workthread has transiently adopted a user mm with use_mm,
+ * this kernel workthread has transiently adopted a user mm with
+ kthread_use_mm,
* to do its AIO) is not set and if so returns a reference to it, after
* bumping up the use count. User must release the mm via mmput()
* after use. Typically used by /proc and ptrace.
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] kernel/fork: Update obsolete use_mm references to kthread_use_mm
2026-01-06 7:05 [PATCH RESEND] kernel/fork: Update obsolete use_mm references to kthread_use_mm mingzhu.wang(王明珠)
@ 2026-01-06 9:26 ` Michal Hocko
2026-01-06 9:29 ` David Hildenbrand (Red Hat)
0 siblings, 1 reply; 5+ messages in thread
From: Michal Hocko @ 2026-01-06 9:26 UTC (permalink / raw)
To: mingzhu.wang(王明珠)
Cc: kees@kernel.org, mingo@redhat.com, peterz@infradead.org,
akpm@linux-foundation.org, david@redhat.com,
dietmar.eggemann@arm.com, mgorman@suse.de, vbabka@suse.cz,
rppt@kernel.org, surenb@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Jiazi Li
On Tue 06-01-26 07:05:28, mingzhu.wang(王明珠) wrote:
> The comment for get_task_mm() in kernel/fork.c incorrectly references the deprecated function `use_mm()`, which has been renamed to `kthread_use_mm()` in kernel/kthread.c.
> This patch updates the documentation to reflect the current function names, ensuring accuracy when developers refer to the kernel thread memory context API.
> No functional changes were introduced.
>
> Signed-off-by: mingzhu.wang <mingzhu.wang@transsion.com>
> ---
> kernel/fork.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/fork.c b/kernel/fork.c index c4ada32598bd..64e228c541bc 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -1312,7 +1312,7 @@ struct file *get_task_exe_file(struct task_struct *task)
> * @task: The task.
> *
> * Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning
> - * this kernel workthread has transiently adopted a user mm with use_mm,
> + * this kernel workthread has transiently adopted a user mm with
> + kthread_use_mm,
Please do not wrap the line here.
> * to do its AIO) is not set and if so returns a reference to it, after
> * bumping up the use count. User must release the mm via mmput()
> * after use. Typically used by /proc and ptrace.
> --
> 2.34.1
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] kernel/fork: Update obsolete use_mm references to kthread_use_mm
2026-01-06 9:26 ` Michal Hocko
@ 2026-01-06 9:29 ` David Hildenbrand (Red Hat)
2026-01-06 11:53 ` Mike Rapoport
0 siblings, 1 reply; 5+ messages in thread
From: David Hildenbrand (Red Hat) @ 2026-01-06 9:29 UTC (permalink / raw)
To: Michal Hocko, mingzhu.wang(王明珠)
Cc: kees@kernel.org, mingo@redhat.com, peterz@infradead.org,
akpm@linux-foundation.org, dietmar.eggemann@arm.com,
mgorman@suse.de, vbabka@suse.cz, rppt@kernel.org,
surenb@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Jiazi Li
On 1/6/26 10:26, Michal Hocko wrote:
> On Tue 06-01-26 07:05:28, mingzhu.wang(王明珠) wrote:
>> The comment for get_task_mm() in kernel/fork.c incorrectly references the deprecated function `use_mm()`, which has been renamed to `kthread_use_mm()` in kernel/kthread.c.
>> This patch updates the documentation to reflect the current function names, ensuring accuracy when developers refer to the kernel thread memory context API.
>> No functional changes were introduced.
>>
>> Signed-off-by: mingzhu.wang <mingzhu.wang@transsion.com>
>> ---
>> kernel/fork.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/fork.c b/kernel/fork.c index c4ada32598bd..64e228c541bc 100644
>> --- a/kernel/fork.c
>> +++ b/kernel/fork.c
>> @@ -1312,7 +1312,7 @@ struct file *get_task_exe_file(struct task_struct *task)
>> * @task: The task.
>> *
>> * Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning
>> - * this kernel workthread has transiently adopted a user mm with use_mm,
>> + * this kernel workthread has transiently adopted a user mm with
>> + kthread_use_mm,
>
> Please do not wrap the line here.
But please do so in the patch description, where the maximum should
usually be 72 characters per line. :)
--
Cheers
David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] kernel/fork: Update obsolete use_mm references to kthread_use_mm
2026-01-06 9:29 ` David Hildenbrand (Red Hat)
@ 2026-01-06 11:53 ` Mike Rapoport
2026-01-06 14:52 ` David Hildenbrand (Red Hat)
0 siblings, 1 reply; 5+ messages in thread
From: Mike Rapoport @ 2026-01-06 11:53 UTC (permalink / raw)
To: David Hildenbrand (Red Hat)
Cc: Michal Hocko, mingzhu.wang(王明珠),
kees@kernel.org, mingo@redhat.com, peterz@infradead.org,
akpm@linux-foundation.org, dietmar.eggemann@arm.com,
mgorman@suse.de, vbabka@suse.cz, surenb@google.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jiazi Li
On Tue, Jan 06, 2026 at 10:29:03AM +0100, David Hildenbrand (Red Hat) wrote:
> On 1/6/26 10:26, Michal Hocko wrote:
> > On Tue 06-01-26 07:05:28, mingzhu.wang(王明珠) wrote:
> > > The comment for get_task_mm() in kernel/fork.c incorrectly references the deprecated function `use_mm()`, which has been renamed to `kthread_use_mm()` in kernel/kthread.c.
> > > This patch updates the documentation to reflect the current function names, ensuring accuracy when developers refer to the kernel thread memory context API.
> > > No functional changes were introduced.
> > >
> > > Signed-off-by: mingzhu.wang <mingzhu.wang@transsion.com>
> > > ---
> > > kernel/fork.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/kernel/fork.c b/kernel/fork.c index c4ada32598bd..64e228c541bc 100644
> > > --- a/kernel/fork.c
> > > +++ b/kernel/fork.c
> > > @@ -1312,7 +1312,7 @@ struct file *get_task_exe_file(struct task_struct *task)
> > > * @task: The task.
> > > *
> > > * Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning
> > > - * this kernel workthread has transiently adopted a user mm with use_mm,
> > > + * this kernel workthread has transiently adopted a user mm with
> > > + kthread_use_mm,
> >
> > Please do not wrap the line here.
>
> But please do so in the patch description, where the maximum should usually
> be 72 characters per line. :)
75 ;-P
https://docs.kernel.org/process/submitting-patches.html#describe-your-changes
> --
> Cheers
> David
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] kernel/fork: Update obsolete use_mm references to kthread_use_mm
2026-01-06 11:53 ` Mike Rapoport
@ 2026-01-06 14:52 ` David Hildenbrand (Red Hat)
0 siblings, 0 replies; 5+ messages in thread
From: David Hildenbrand (Red Hat) @ 2026-01-06 14:52 UTC (permalink / raw)
To: Mike Rapoport
Cc: Michal Hocko, mingzhu.wang(王明珠),
kees@kernel.org, mingo@redhat.com, peterz@infradead.org,
akpm@linux-foundation.org, dietmar.eggemann@arm.com,
mgorman@suse.de, vbabka@suse.cz, surenb@google.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jiazi Li
On 1/6/26 12:53, Mike Rapoport wrote:
> On Tue, Jan 06, 2026 at 10:29:03AM +0100, David Hildenbrand (Red Hat) wrote:
>> On 1/6/26 10:26, Michal Hocko wrote:
>>> On Tue 06-01-26 07:05:28, mingzhu.wang(王明珠) wrote:
>>>> The comment for get_task_mm() in kernel/fork.c incorrectly references the deprecated function `use_mm()`, which has been renamed to `kthread_use_mm()` in kernel/kthread.c.
>>>> This patch updates the documentation to reflect the current function names, ensuring accuracy when developers refer to the kernel thread memory context API.
>>>> No functional changes were introduced.
>>>>
>>>> Signed-off-by: mingzhu.wang <mingzhu.wang@transsion.com>
>>>> ---
>>>> kernel/fork.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/kernel/fork.c b/kernel/fork.c index c4ada32598bd..64e228c541bc 100644
>>>> --- a/kernel/fork.c
>>>> +++ b/kernel/fork.c
>>>> @@ -1312,7 +1312,7 @@ struct file *get_task_exe_file(struct task_struct *task)
>>>> * @task: The task.
>>>> *
>>>> * Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning
>>>> - * this kernel workthread has transiently adopted a user mm with use_mm,
>>>> + * this kernel workthread has transiently adopted a user mm with
>>>> + kthread_use_mm,
>>>
>>> Please do not wrap the line here.
>>
>> But please do so in the patch description, where the maximum should usually
>> be 72 characters per line. :)
>
> 75 ;-P
You are technically correct sir.
I think it dates back to "git show"/"git log" adding 4 spaces in front,
making the text still fit into 80c terminals. So you want <= 76. Then,
whether a project allows for going up to 76, 75 or 72 depends on the
religious believes.
https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Is an interesting read.
I've been trying to stick to the 50/72 rule for years, especially as
it's easy to remember across projects. Well, I frequently violate the
"50" part :)
--
Cheers
David
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-06 14:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 7:05 [PATCH RESEND] kernel/fork: Update obsolete use_mm references to kthread_use_mm mingzhu.wang(王明珠)
2026-01-06 9:26 ` Michal Hocko
2026-01-06 9:29 ` David Hildenbrand (Red Hat)
2026-01-06 11:53 ` Mike Rapoport
2026-01-06 14:52 ` David Hildenbrand (Red Hat)
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.