* [PATCH 1/1] Fix a wrong value passed to __find_vmap_area()
@ 2024-01-11 12:11 Uladzislau Rezki (Sony)
2024-01-11 15:55 ` Nathan Chancellor
0 siblings, 1 reply; 5+ messages in thread
From: Uladzislau Rezki (Sony) @ 2024-01-11 12:11 UTC (permalink / raw)
To: linux-mm, Andrew Morton
Cc: LKML, Baoquan He, Lorenzo Stoakes, Christoph Hellwig,
Matthew Wilcox, Liam R . Howlett, Dave Chinner, Uladzislau Rezki,
Oleksiy Avramchenko, kernel test robot
There was a type in the vmalloc_dump_obj() function. Instead
of passing a real address which is "objp" an "addr" was used
what is wrong and not initialized.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: e88b85b81d5 ("mm: vmalloc: offload free_vmap_area_lock lock")
Closes: https://lore.kernel.org/oe-kbuild-all/202401111810.TKPIXLCs-lkp@intel.com/
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index e30dabf68263..43a6608e1397 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -4688,7 +4688,7 @@ bool vmalloc_dump_obj(void *object)
vn = addr_to_node((unsigned long)objp);
if (spin_trylock(&vn->busy.lock)) {
- va = __find_vmap_area(addr, &vn->busy.root);
+ va = __find_vmap_area((unsigned long)objp, &vn->busy.root);
if (va && va->vm) {
addr = (unsigned long)va->vm->addr;
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Fix a wrong value passed to __find_vmap_area()
2024-01-11 12:11 [PATCH 1/1] Fix a wrong value passed to __find_vmap_area() Uladzislau Rezki (Sony)
@ 2024-01-11 15:55 ` Nathan Chancellor
2024-01-11 16:03 ` Uladzislau Rezki
0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2024-01-11 15:55 UTC (permalink / raw)
To: Uladzislau Rezki (Sony)
Cc: linux-mm, Andrew Morton, LKML, Baoquan He, Lorenzo Stoakes,
Christoph Hellwig, Matthew Wilcox, Liam R . Howlett,
Dave Chinner, Oleksiy Avramchenko, kernel test robot
On Thu, Jan 11, 2024 at 01:11:04PM +0100, Uladzislau Rezki (Sony) wrote:
> There was a type in the vmalloc_dump_obj() function. Instead
> of passing a real address which is "objp" an "addr" was used
> what is wrong and not initialized.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: e88b85b81d5 ("mm: vmalloc: offload free_vmap_area_lock lock")
I am not sure that e88b85b81d5 introduced this. Based on the diff, I
think it was actually commit 86817057732a ("mm: vmalloc: remove global
vmap_area_root rb-tree"). Does not really matter for the patch text but
I think it does matter for what change this gets squashed into.
> Closes: https://lore.kernel.org/oe-kbuild-all/202401111810.TKPIXLCs-lkp@intel.com/
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> ---
> mm/vmalloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index e30dabf68263..43a6608e1397 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -4688,7 +4688,7 @@ bool vmalloc_dump_obj(void *object)
> vn = addr_to_node((unsigned long)objp);
>
> if (spin_trylock(&vn->busy.lock)) {
> - va = __find_vmap_area(addr, &vn->busy.root);
> + va = __find_vmap_area((unsigned long)objp, &vn->busy.root);
>
> if (va && va->vm) {
> addr = (unsigned long)va->vm->addr;
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Fix a wrong value passed to __find_vmap_area()
2024-01-11 15:55 ` Nathan Chancellor
@ 2024-01-11 16:03 ` Uladzislau Rezki
2024-01-16 22:13 ` Lorenzo Stoakes
0 siblings, 1 reply; 5+ messages in thread
From: Uladzislau Rezki @ 2024-01-11 16:03 UTC (permalink / raw)
To: Nathan Chancellor, Andrew Morton
Cc: Uladzislau Rezki (Sony),
linux-mm, Andrew Morton, LKML, Baoquan He, Lorenzo Stoakes,
Christoph Hellwig, Matthew Wilcox, Liam R . Howlett,
Dave Chinner, Oleksiy Avramchenko, kernel test robot
On Thu, Jan 11, 2024 at 08:55:11AM -0700, Nathan Chancellor wrote:
> On Thu, Jan 11, 2024 at 01:11:04PM +0100, Uladzislau Rezki (Sony) wrote:
> > There was a type in the vmalloc_dump_obj() function. Instead
> > of passing a real address which is "objp" an "addr" was used
> > what is wrong and not initialized.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Fixes: e88b85b81d5 ("mm: vmalloc: offload free_vmap_area_lock lock")
>
> I am not sure that e88b85b81d5 introduced this. Based on the diff, I
> think it was actually commit 86817057732a ("mm: vmalloc: remove global
> vmap_area_root rb-tree"). Does not really matter for the patch text but
> I think it does matter for what change this gets squashed into.
>
Right you are! Below is updated version:
<snip>
From 98f1fd2d3913f3b7bcbe49785a78f67999151f1c Mon Sep 17 00:00:00 2001
From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Date: Thu, 11 Jan 2024 13:04:07 +0100
Subject: [PATCH 1/2] mm: vmalloc: Fix a wrong value passed to
__find_vmap_area()
There was a type in the vmalloc_dump_obj() function. Instead
of passing a real address which is "objp" an "addr" was used
what is wrong and not initialized.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 86817057732a ("mm: vmalloc: remove global vmap_area_root rb-tree")
Closes: https://lore.kernel.org/oe-kbuild-all/202401111810.TKPIXLCs-lkp@intel.com/
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index e30dabf68263..43a6608e1397 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -4688,7 +4688,7 @@ bool vmalloc_dump_obj(void *object)
vn = addr_to_node((unsigned long)objp);
if (spin_trylock(&vn->busy.lock)) {
- va = __find_vmap_area(addr, &vn->busy.root);
+ va = __find_vmap_area((unsigned long)objp, &vn->busy.root);
if (va && va->vm) {
addr = (unsigned long)va->vm->addr;
--
2.39.2
<snip>
--
Uladzislau Rezki
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Fix a wrong value passed to __find_vmap_area()
2024-01-11 16:03 ` Uladzislau Rezki
@ 2024-01-16 22:13 ` Lorenzo Stoakes
2024-01-17 20:41 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Lorenzo Stoakes @ 2024-01-16 22:13 UTC (permalink / raw)
To: Uladzislau Rezki
Cc: Nathan Chancellor, Andrew Morton, linux-mm, LKML, Baoquan He,
Christoph Hellwig, Matthew Wilcox, Liam R . Howlett,
Dave Chinner, Oleksiy Avramchenko, kernel test robot
On Thu, Jan 11, 2024 at 05:03:41PM +0100, Uladzislau Rezki wrote:
> On Thu, Jan 11, 2024 at 08:55:11AM -0700, Nathan Chancellor wrote:
> > On Thu, Jan 11, 2024 at 01:11:04PM +0100, Uladzislau Rezki (Sony) wrote:
> > > There was a type in the vmalloc_dump_obj() function. Instead
> > > of passing a real address which is "objp" an "addr" was used
> > > what is wrong and not initialized.
> > >
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Fixes: e88b85b81d5 ("mm: vmalloc: offload free_vmap_area_lock lock")
> >
> > I am not sure that e88b85b81d5 introduced this. Based on the diff, I
> > think it was actually commit 86817057732a ("mm: vmalloc: remove global
> > vmap_area_root rb-tree"). Does not really matter for the patch text but
> > I think it does matter for what change this gets squashed into.
> >
> Right you are! Below is updated version:
>
> <snip>
> From 98f1fd2d3913f3b7bcbe49785a78f67999151f1c Mon Sep 17 00:00:00 2001
> From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
> Date: Thu, 11 Jan 2024 13:04:07 +0100
> Subject: [PATCH 1/2] mm: vmalloc: Fix a wrong value passed to
> __find_vmap_area()
>
> There was a type in the vmalloc_dump_obj() function. Instead
> of passing a real address which is "objp" an "addr" was used
> what is wrong and not initialized.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 86817057732a ("mm: vmalloc: remove global vmap_area_root rb-tree")
I know the commits are likely to get squashed/messed with (this is now
d1d9bdd672c4 in my mm-unstable tree), will this get corrected in the commit
message also? Slightly tricky one.
Perhaps a note for Andrew unless his scripts do this already - please
update this to wherever "mm: vmalloc: remove global vmap_area_root rb-tree"
lands?
> Closes: https://lore.kernel.org/oe-kbuild-all/202401111810.TKPIXLCs-lkp@intel.com/
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> ---
> mm/vmalloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index e30dabf68263..43a6608e1397 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -4688,7 +4688,7 @@ bool vmalloc_dump_obj(void *object)
> vn = addr_to_node((unsigned long)objp);
>
> if (spin_trylock(&vn->busy.lock)) {
> - va = __find_vmap_area(addr, &vn->busy.root);
> + va = __find_vmap_area((unsigned long)objp, &vn->busy.root);
>
> if (va && va->vm) {
> addr = (unsigned long)va->vm->addr;
> --
> 2.39.2
> <snip>
>
> --
> Uladzislau Rezki
Otherwise looks good to me. I have some style comments but perhaps better
for me to address on the actual patch series! Feel free to add:
Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Fix a wrong value passed to __find_vmap_area()
2024-01-16 22:13 ` Lorenzo Stoakes
@ 2024-01-17 20:41 ` Andrew Morton
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2024-01-17 20:41 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: Uladzislau Rezki, Nathan Chancellor, linux-mm, LKML, Baoquan He,
Christoph Hellwig, Matthew Wilcox, Liam R . Howlett,
Dave Chinner, Oleksiy Avramchenko, kernel test robot
On Tue, 16 Jan 2024 22:13:17 +0000 Lorenzo Stoakes <lstoakes@gmail.com> wrote:
> > There was a type in the vmalloc_dump_obj() function. Instead
> > of passing a real address which is "objp" an "addr" was used
> > what is wrong and not initialized.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Fixes: 86817057732a ("mm: vmalloc: remove global vmap_area_root rb-tree")
>
> I know the commits are likely to get squashed/messed with (this is now
> d1d9bdd672c4 in my mm-unstable tree), will this get corrected in the commit
> message also? Slightly tricky one.
>
> Perhaps a note for Andrew unless his scripts do this already - please
> update this to wherever "mm: vmalloc: remove global vmap_area_root rb-tree"
> lands?
Yep, I'll scrunch together
mm-vmalloc-remove-global-vmap_area_root-rb-tree.patch
mm-vmalloc-remove-global-vmap_area_root-rb-tree-fix.patch
mm-vmalloc-remove-global-vmap_area_root-rb-tree-fix-2.patch
before merging it all into mm-stable and shall tidy up the changelog
trail.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-17 20:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11 12:11 [PATCH 1/1] Fix a wrong value passed to __find_vmap_area() Uladzislau Rezki (Sony)
2024-01-11 15:55 ` Nathan Chancellor
2024-01-11 16:03 ` Uladzislau Rezki
2024-01-16 22:13 ` Lorenzo Stoakes
2024-01-17 20:41 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).