mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Tiwei Bie" <tiwei.btw@antgroup.com>
To: Richard Weinberger <richard@nod.at>
Cc: anton ivanov <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-um <linux-um@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] um: Fix the return value of elf_core_copy_task_fpregs
Date: Fri, 13 Sep 2024 10:20:05 +0800	[thread overview]
Message-ID: <e259385a-ddc5-4c93-9251-395cd1c44429@antgroup.com> (raw)
In-Reply-To: <78364371.37121.1726167098936.JavaMail.zimbra@nod.at>

On 2024/9/13 02:51, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
>> Von: "Tiwei Bie" <tiwei.btw@antgroup.com>
>> An: "richard" <richard@nod.at>, "anton ivanov" <anton.ivanov@cambridgegreys.com>, "Johannes Berg"
>> <johannes@sipsolutions.net>
>> CC: "linux-um" <linux-um@lists.infradead.org>, "linux-kernel" <linux-kernel@vger.kernel.org>, "Tiwei Bie"
>> <tiwei.btw@antgroup.com>
>> Gesendet: Mittwoch, 28. August 2024 15:51:40
>> Betreff: [PATCH] um: Fix the return value of elf_core_copy_task_fpregs
> 
>> This function is expected to return a boolean value, which should be
>> true on success and false on failure.
>>
>> Fixes: d1254b12c93e ("uml: fix x86_64 core dump crash")
>> Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
>> ---
>> arch/um/kernel/process.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
>> index be2856af6d4c..3cc2b663aa78 100644
>> --- a/arch/um/kernel/process.c
>> +++ b/arch/um/kernel/process.c
>> @@ -291,7 +291,8 @@ unsigned long __get_wchan(struct task_struct *p)
>> int elf_core_copy_task_fpregs(struct task_struct *t, elf_fpregset_t *fpu)
>> {
>> 	int cpu = current_thread_info()->cpu;
>> +	int pid = userspace_pid[cpu];
>>
>> -	return save_i387_registers(userspace_pid[cpu], (unsigned long *) fpu);
>> +	return save_i387_registers(pid, (unsigned long *) fpu) == 0;
> 
> Why a new local variable?

Thanks for the review! The new variable isn't necessary for the fix.
Will drop it to make the fix more straightforward.

Regards,
Tiwei

      reply	other threads:[~2024-09-13  2:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28 13:51 Tiwei Bie
2024-09-12 18:51 ` Richard Weinberger
2024-09-13  2:20   ` Tiwei Bie [this message]

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=e259385a-ddc5-4c93-9251-395cd1c44429@antgroup.com \
    --to=tiwei.btw@antgroup.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®