Re: [linus:master] [mseal] 8be7258aad: stress-ng.pagemove.page_remaps_per_sec -4.4% regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes:
> On Mon, 5 Aug 2024 at 19:14, Michael Ellerman <mpe@xxxxxxxxxxxxxx> wrote:
>>
>> Needs a slight tweak to compile, vvar_close() needs to return void.
>
> Ack, shows just how untested it was.
>
>> And should probably be renamed vdso_close().
>
> .. and that was due to the initial confusion that I then fixed, but
> didn't fix the naming.

Ack.

> So yes, those fixes look ObviouslyCorrect(tm).

Needs another slight tweak to work correctly. Diff below.

With that our sigreturn_vdso selftest passes, and the CRIU vdso tests
pass also. So LGTM.

I'm not sure of the urgency on this, do you want to apply it directly?
If so feel free to add my tested-by/sob etc.

Or should I turn it into a series and post it?

cheers


diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index 431b46976db8..ed5ac4af4d83 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -85,6 +85,15 @@ static void vdso_close(const struct vm_special_mapping *sm,
                        struct vm_area_struct *vma)
 {
 	struct mm_struct *mm = vma->vm_mm;
+
+	/*
+	 * close() is called for munmap() but also for mremap(). In the mremap()
+	 * case the vdso pointer has already been updated by the mremap() hook
+	 * above, so it must not be set to NULL here. 
+	 */
+	if (vma->vm_start != (unsigned long)mm->context.vdso)
+		return;
+
 	mm->context.vdso = NULL;
 }
 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux