Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3129992rdb; Thu, 16 Nov 2023 00:29:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzw2vbWkgf4S2pDu4Rpq+OQt7KSarrYIzHim9aFNGEqUWnFmCuiuK/fBAq4WWGRHX28cRF X-Received: by 2002:a05:6358:524b:b0:16b:c587:fcbe with SMTP id c11-20020a056358524b00b0016bc587fcbemr9118359rwa.31.1700123351268; Thu, 16 Nov 2023 00:29:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700123351; cv=none; d=google.com; s=arc-20160816; b=tknh/f2zueL4MVXHjZO45bzEDFA/sS29QFw3xafrQ2srY0PBVJ9BTSQJCc/SVtlZ84 aPL2cXv5+Y3fFkfcGCC/YvpOwi66qr56cJBztc7OFHnIk2LZDDpaZyMoGob5LpiKDin7 OYSWOmLZjWMVAfezr2inb/+4GvZNQxjqKmY1e49+KVopiLkrrcNEC/83v7+juCcHmZ/d cSxTYdWF7dk/fJ4VFeIVyHdc7UZSJ9DIg4+8dw07lB1YnYhDGQm9hYLtvb/2PuDv3/UJ M/J5XknWk0fpXrsAQyuzW9uyain8pAv+1bu1GazdZPJWwNaGt+XTtUQuURvvSV+v8Ib/ Gbpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=pEIBb6IT0GBHlbze8CQSrlWQ0/MNkkK6rRjGP0Gf3UU=; fh=alHNG+6rFzSOprwLS0qzbHDv/exjtT09n0yftls1l94=; b=EN2xxzGy2sG1wKBS/oZOLqLGXBmQFySPk6/OL8xNB1/8kmLnmAEnhKCyrnOCl51q6f oc3tZRvnefCpe4bdbFIOCVoYpG56PgA9BG4CUwBXZiCAsbDUjNPxTbOdA6KXFlMPuEPn AYZ4E4z/W/ajCgw/a8mffHH7H4lfF82f0KN/rZeU/MeHauVhohWHQLCqDlTkoT7sqDN6 kUexJJtE/gt3zMu/rIHu2Yyu8YuLizfcwvs0udh2W8+aFvgQ1w2Ii6nMVS2aPHOtqWNm cN4mnMOKIzptNAwF8syqaPV1gvGaD/e+iHLzsbgwgRzC0I27fwEa+Al2ueqver47dn+D SdEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e7-20020a656887000000b00578fe1bdfcasi12001195pgt.860.2023.11.16.00.29.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 00:29:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 095538184E07; Thu, 16 Nov 2023 00:29:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234762AbjKPI3J (ORCPT + 99 others); Thu, 16 Nov 2023 03:29:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbjKPI3I (ORCPT ); Thu, 16 Nov 2023 03:29:08 -0500 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AEEC19F; Thu, 16 Nov 2023 00:29:05 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4SWCqc2bhWz4f3lw8; Thu, 16 Nov 2023 16:29:00 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id BFA331A0176; Thu, 16 Nov 2023 16:29:01 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgCnqxHL0lVlgbRFBA--.19869S4; Thu, 16 Nov 2023 16:29:01 +0800 (CST) From: linan666@huaweicloud.com To: josef@toxicpanda.com, axboe@kernel.dk Cc: linux-block@vger.kernel.org, nbd@other.debian.org, linux-kernel@vger.kernel.org, linan122@huawei.com, yukuai3@huawei.com, yi.zhang@huawei.com, houtao1@huawei.com, yangerkun@huawei.com Subject: [PATCH 0/3] fix null-ptr-deref in nbd_open() Date: Fri, 17 Nov 2023 00:23:13 +0800 Message-Id: <20231116162316.1740402-1-linan666@huaweicloud.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgCnqxHL0lVlgbRFBA--.19869S4 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYt7kC6x804xWl14x267AKxVW8JVW5JwAF c2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62 vIxIIY0VWUZVW8XwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xII jxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjc xK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1lnxkEFVAI w20F6cxK64vIFxWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrV C2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE 7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACI402YVCY1x02628vn2kIc2xKxwAKzVCY07 xG64k0F24l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG 67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MI IYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E 14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2jsIE14v26r 1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07j3 3ktUUUUU= X-CM-SenderInfo: polqt0awwwqx5xdzvxpfor3voofrz/ X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 16 Nov 2023 00:29:10 -0800 (PST) From: Li Nan Li Nan (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.39.2