public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Linux-MM <linux-mm@kvack.org>, Andrew Morton <akpm@linux-foundation.org>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>,
	Omar Sandoval <osandov@osandov.com>
Subject: Re: [PATCH] mm: vmalloc: annotate find_vmap_area_exceed_addr_lock() for lockdep
Date: Tue, 26 Mar 2024 16:24:01 -0600	[thread overview]
Message-ID: <86cb4eaa-2ef3-47e6-87f8-96b15895a7ce@kernel.dk> (raw)
In-Reply-To: <eaad5cd8-5d70-4890-a290-c04b07558c33@kernel.dk>

On 3/26/24 3:25 PM, Jens Axboe wrote:
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 22aa63f4ef63..26a69fa6809c 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -1032,7 +1032,7 @@ find_vmap_area_exceed_addr_lock(unsigned long addr, struct vmap_area **va)
>  	for (i = 0; i < nr_vmap_nodes; i++) {
>  		vn = &vmap_nodes[i];
>  
> -		spin_lock(&vn->busy.lock);
> +		spin_lock_nested(&vn->busy.lock, i);
>  		va_lowest = __find_vmap_area_exceed_addr(addr, &vn->busy.root);
>  		if (va_lowest) {
>  			if (!va_node || va_lowest->va_start < (*va)->va_start) {

Omar said he tested this and ran into lockdep complaining as it only
supports 8 subclasses. So this patch can't work, but that still leaves
the current kernel code buggy...
	
-- 
Jens Axboe



  reply	other threads:[~2024-03-26 22:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 21:25 [PATCH] mm: vmalloc: annotate find_vmap_area_exceed_addr_lock() for lockdep Jens Axboe
2024-03-26 22:24 ` Jens Axboe [this message]
2024-03-27  9:57   ` Uladzislau Rezki
2024-03-27 17:04     ` Uladzislau Rezki
2024-03-27 17:21       ` Jens Axboe
2024-03-27 17:40         ` Uladzislau Rezki
2024-03-27 17:22       ` Omar Sandoval
2024-03-27 17:41         ` Uladzislau Rezki

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=86cb4eaa-2ef3-47e6-87f8-96b15895a7ce@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=osandov@osandov.com \
    --cc=urezki@gmail.com \
    /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