Thread (3 messages) 3 messages, 2 authors, 2021-11-15

Re: [PATCH] nvme: Add sibling to list after full initialization

From: Daniel Wagner <hidden>
Date: 2021-11-15 09:35:20

Hi Sagi,

On Sun, Nov 14, 2021 at 12:56:55PM +0200, Sagi Grimberg wrote:
quoted
Adding the newly created namespace before the object is fully
initialized is opening a race with nvme_mpath_revalidate_paths() which
tries to access ns->disk. ns->disk can still be NULL when iterating
over the sibling list.
But ns->disk is assigned before nvme_init_ns_head is even called.
ns->disk is NULL, but we are missing 5f432cceb3e9 ("nvme: use
blk_mq_alloc_disk") in our kernels. The commit moves the ns->disk
assignment in front of nvme_init_ns_head.

I didn't spot the code change when I forward ported the patch.

Sorry for the noise and thanks for the feedback!
Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help