Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2380040rdb; Mon, 20 Nov 2023 09:17:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlbjxaLZwy+4hZ0sUatBlI0HhX/OamFB2vBILS8hmPrXeKGdbE4hbJqSlQImhLJUVGRE9H X-Received: by 2002:a17:902:ecd0:b0:1ce:6687:c93e with SMTP id a16-20020a170902ecd000b001ce6687c93emr7433016plh.69.1700500633798; Mon, 20 Nov 2023 09:17:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700500633; cv=none; d=google.com; s=arc-20160816; b=qwjAn+rHr+td0uQeM6yp0ml32O08aHm6BCXPwRTQxR6yV5nHY/ICAme2C11U6SRa59 k34LCddXQUnNgoxlXS2VWvvo6xuyTeMvf60pLE0Q2miViosAhtrY8qaObCi/QhepHAb9 34i7BT5ezD71u4lt8gBRSCHnxvVFLXVvpUpX5NZlIuTCXVtN9GYtHInxeRjFPZYvI1UG wtAOtMHcoSn4w77A0h5ADpMJQFufm1Wx/szJkj3GEN0JYq/lRjDO+HeKZ5zQImKYeoHK KvsZvlcj/sK23KaeA7fiZ+ruVcIvsNJkP3/4j9HP8oHzPoBhIAyEBPIqddb/wBgLHa7T U+yA== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=eB7WfUEEaC1OvWTSK9npq8Mo0A16SnQAjvLM/HQZZuI=; fh=5eCF/y9CcIw7L1GRD6NRFIYBeau7rV1vRoJfCc/XazM=; b=UCUusbx402t3oqAr+jwNCrj4gc5QzRc9fNI8JiCvYedh0OQsBUB8r1ByTdiC1A7I1j qQuH8F4do3wH9bH5rbAHPI7XLEN2zmqFqS1F5fPo1cRA0viiBHsJIkR4ywauJewOOoeJ oP2kwEISVPqAHWBCzMbuCz4JlgJoU287Q+EoKRrW8GhiDcqWEsRvfATG51yZiY2npvFb zmwyCcwJOyxnZndbY1XJI1Rf8DLSh9nTBYeXPs1SLpRcUj/5lfT0/Ntl6biP3eHotZse zQn4UqgM2c5tB2tMB0i8AHRARJRpdQiIAiD6WiNyazaGcQjewtexNeIYhzdoQWVnzmzs ggLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=yN5USrda; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id n14-20020a170903110e00b001cc30057e18si8774136plh.465.2023.11.20.09.17.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:17:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=yN5USrda; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 059DF80AD509; Mon, 20 Nov 2023 09:17:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232156AbjKTRRE (ORCPT + 99 others); Mon, 20 Nov 2023 12:17:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232129AbjKTRRC (ORCPT ); Mon, 20 Nov 2023 12:17:02 -0500 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E359FF4 for ; Mon, 20 Nov 2023 09:16:58 -0800 (PST) Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-7b05e65e784so30930539f.1 for ; Mon, 20 Nov 2023 09:16:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1700500618; x=1701105418; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eB7WfUEEaC1OvWTSK9npq8Mo0A16SnQAjvLM/HQZZuI=; b=yN5USrdaPRXPjFWxp8LhHRkSO+u4XLdXKwx8rSdK0XlHlCLn1f54W5Non/Az60nNVX wBMN0jhJC0IeSlJXHOcZ5sTrg2zlBvhqiq76hmT3g001iGIQd4Ep0lKPlTfWvdZZ/ZK0 wc6eM+yzmWeiIDDMem2RUIogDh+KeU5xkyZCotXAKWkbNQD6F5tdSCr74PzL3AFslVat Hl6CD3KO0yfcHwAFSEJEjwSF6o1tVNC8SzFMx1bvwToM5xpS+4kUzaeE2Arpv/OPJcVS IgabTeJGLDmk7KgFlMRVTqGLR+ac6dMBHtq0DWp0B9/9FwTkWbZoNTO02XigWlQmgGxk 41ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700500618; x=1701105418; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eB7WfUEEaC1OvWTSK9npq8Mo0A16SnQAjvLM/HQZZuI=; b=drw3AskiyT3fBtPBEY17TAh0mXm0xlT7iajpngGyzsqj2HRXK0NLiFYcvZLRhQcrzY E3gRjFISUmO0vqSQFuoXws96c+visZMhUGAqK3vGEm56tfxEzYW2ysOW+rbxb/dQgHQU nOWKpwXPsmMZJbr0X4v37NKlsf+rVNUm4blSaVFVr++Z3dZbRAWE9i7xsbbMyHx0bOnJ lukctDl0qPDzyA2L9QrJDRaycIPoKSjJ9UTjYJ0D/2he27sQc3Eer4r90K4TWcLLOnkz 5xEGO45Qs8ZFAZwSHCuHBkkbTd1c3SRllGwkO/GvEoMV8fMsVHzq1Id+21pr8lTbtv0/ kcDA== X-Gm-Message-State: AOJu0YzgNsmhJiMn1phJ/ys917jUZe/VnZjLFDhz5Up/JFvsoVPYiliL 8m+ohcS9sauEtIXk4hB/vYyYpA== X-Received: by 2002:a6b:fc0b:0:b0:7b0:7a86:2952 with SMTP id r11-20020a6bfc0b000000b007b07a862952mr7278834ioh.1.1700500618197; Mon, 20 Nov 2023 09:16:58 -0800 (PST) Received: from [127.0.0.1] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id ds21-20020a056638285500b004645a5d3b13sm2110468jab.19.2023.11.20.09.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:16:57 -0800 (PST) From: Jens Axboe To: josef@toxicpanda.com, linan666@huaweicloud.com 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 In-Reply-To: <20231116162316.1740402-1-linan666@huaweicloud.com> References: <20231116162316.1740402-1-linan666@huaweicloud.com> Subject: Re: [PATCH 0/3] fix null-ptr-deref in nbd_open() Message-Id: <170050061729.96172.17600082878837866184.b4-ty@kernel.dk> Date: Mon, 20 Nov 2023 10:16:57 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.13-dev-26615 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 09:17:11 -0800 (PST) On Fri, 17 Nov 2023 00:23:13 +0800, linan666@huaweicloud.com wrote: > 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(-) > > [...] Applied, thanks! [1/3] nbd: fold nbd config initialization into nbd_alloc_config() commit: 1b59860540a4018e8071dc18d4893ec389506b7d [2/3] nbd: factor out a helper to get nbd_config without holding 'config_lock' commit: 3123ac77923341774ca3ad1196ad20bb0732bf70 [3/3] nbd: fix null-ptr-dereference while accessing 'nbd->config' commit: c2da049f419417808466c529999170f5c3ef7d3d Best regards, -- Jens Axboe