[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Jul 2023 11:15:33 +0800
From: Zhong Jinghua <zhongjinghua@...weicloud.com>
To: josef@...icpanda.com, axboe@...nel.dk
Cc: linux-block@...r.kernel.org, nbd@...er.debian.org,
linux-kernel@...r.kernel.org, zhongjinghua@...weicloud.com,
yi.zhang@...wei.com, yukuai3@...wei.com
Subject: [PATCH -next 0/3] nbd: fix null-ptr-dereference while accessing 'nbd->config'
From: Zhong Jinghua <zhongjinghua@...wei.com>
nbd->config = config and refcount_set(&nbd->config_refs, 1) in
nbd_genl_connect may be out of order, causing config_refs to be set to 1
first, and then nbd_open accessing nbd->config reports a null pointer
reference.
Zhong Jinghua (3):
nbd: fold nbd config initialization into nbd_alloc_config()
nbd: factor out a helper to get nbd_config without holding
'config_lock'
nbd: fix null-ptr-dereference while accessing 'nbd->config'
drivers/block/nbd.c | 82 +++++++++++++++++++++++++++++----------------
1 file changed, 53 insertions(+), 29 deletions(-)
--
2.31.1
Powered by blists - more mailing lists