Commit d8d45e68 authored by Chao Leng's avatar Chao Leng Committed by Yang Yingliang
Browse files

nvme-core: use list_add_tail_rcu instead of list_add_tail for nvme_init_ns_head

mainline inclusion
from mainline-v5.11-rc6
commit 772ea326
category: bugfix
bugzilla: NA
CVE: NA
Link: https://gitee.com/openeuler/kernel/issues/I4JFBE?from=project-issue



-------------------------------------------------

The "list" of nvme_ns_head is used as rcu list, now in nvme_init_ns_head
list_add_tail is used to add ns->siblings to the rcu list. It is not safe.
Should use list_add_tail_rcu instead of list_add_tail.

Signed-off-by: default avatarChao Leng <lengchao@huawei.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>

conflicts:
drivers/nvme/host/core.c
[adjust context]

Signed-off-by: default avatarchengjike <chengjike.cheng@huawei.com>
Reviewed-by: default avatarAo Sun <sunao.sun@huawei.com>
Reviewed-by: default avatarZhenwei Yang <yangzhenwei@huawei.com>
Reviewed-by: default avatarHou Tao <houtao1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent b5ce8101
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment