Re: [PATCH v3 05/18] nvme: add context annotations for nvme_ns_head::current_path

"Paul E. McKenney" <[email protected]>
Newsgroups org.infradead.lists.linux-nvme,org.kernel.vger.linux-kernel
Message-ID <03e47f32-5998-41e1-9340-ce757c5e188c@paulmck-laptop>
On Mon, Jul 06, 2026 at 07:44:07PM +0530, Nilay Shroff wrote:
> Annotate nvme_ns_head::current_path[] with __rcu_guarded so that
> Clang's context analysis can validate accesses to the SRCU/RCU
> protected pointer.
> 
> Cc: Paul E. McKenney <[email protected]>
> Signed-off-by: Nilay Shroff <[email protected]>

From an RCU perspective:

Reviewed-by: Paul E. McKenney <[email protected]>

> ---
>  drivers/nvme/host/nvme.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index 5e746ae1c805..610c685e2263 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -575,7 +575,7 @@ struct nvme_ns_head {
>  #define NVME_NSHEAD_DISK_LIVE		0
>  #define NVME_NSHEAD_QUEUE_IF_NO_PATH	1
>  #define NVME_NSHEAD_CDEV_LIVE		2
> -	struct nvme_ns __rcu	*current_path[];
> +	struct nvme_ns __rcu_guarded	*current_path[];
>  #endif
>  };
>  
> -- 
> 2.53.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.