Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp302184rwb; Thu, 1 Dec 2022 02:20:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf7XaDSVrrH2iDWj/a2yp6MiNNJpwSc2ItLMDCnSS3Rn/84t6hQjU+uScI7pOX7Rc+jmdFnn X-Received: by 2002:a17:907:138d:b0:7bc:2ad:fae with SMTP id vs13-20020a170907138d00b007bc02ad0faemr28688856ejb.724.1669890018453; Thu, 01 Dec 2022 02:20:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669890018; cv=none; d=google.com; s=arc-20160816; b=a4KYgg4YhRk4pdWHutZFiocpEs5uDh4G/S/t/z4/G5UxqZeiRsNWcuqvk5ZjbQuqRr 2voNtUFZmYhLk5dpwRWytRWlzvDRg/9b3Otw4IfdRZtEwN25/gxFZiFqHg+OGRzLr2Rz wSbGOz2KABc2Or3dEpLdNEuFMYN0qN8FZEi0zdMkFDyZarSFxpPGkr4J7vPIrzgU1lUM 1AcU6SwRJ7anVEnxmaINk8NR3OTwlQsg+NMW3CZ5nE/fZcW2sUz2QWJlkO/GpGWHjPJc sY0uxPpfXgexWpdZM7HZJOjrdZNOJrMuFcw3DkdF8dYkHgs2OzGmFdYsfDPvjyTlIrX8 tO3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=pA5rgpRQHTSCN/GLM21EYU5Er0xU1UvmWyDaPEdq2Cw=; b=tDf6n+4HczWshHh2+P+mY/96FJ1Cl3u4ZjsWk0igV6oWljmqgbe/m7NWPvXHStwcjr Daf2u6shf8bNky4TFR0GgatGA375ze92POKzaCBgW+6Egzxu/H7gAuGMRT2mE11JVmoa JmyeaF+j9+fFMb2jqxnE/EMbwgeDLCcZVxztWteDKOg6Mnm6kz00GNf6ypeN+4D6gtiB O5AUcPo6bpQntW8hsjW6DlgPPJbwDmcohCfvANZFgsHpXx59PC00LwnGK0GlYiTWarmS sySn1bZFaS3XYEGcFXoZ0kjnXmnmGP+SGRL8RqUAR+Lx2U8JXRBW/FqtXdgbNL+gHWHA zK1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RHcGwSDX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o8-20020a170906974800b007c0b6decb95si431839ejy.739.2022.12.01.02.19.53; Thu, 01 Dec 2022 02:20:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RHcGwSDX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229653AbiLAKLz (ORCPT + 83 others); Thu, 1 Dec 2022 05:11:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbiLAKLt (ORCPT ); Thu, 1 Dec 2022 05:11:49 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DAF4C54; Thu, 1 Dec 2022 02:11:49 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id h28so1401805pfq.9; Thu, 01 Dec 2022 02:11:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=pA5rgpRQHTSCN/GLM21EYU5Er0xU1UvmWyDaPEdq2Cw=; b=RHcGwSDXkjYbxA3YKl/rWeJUxYDAKLu2ymAgPasW2ObnBdRmEjmx4rW0oHKOgzu0vu DuKQhKP2dPrR7IHG8jv0kbMntMuAQ/rGgf4LqEJ/0yjFbLR2XtUb0NofTtdiJuqbPpBy Ka01w82uJUw4f2u3FwIdycBDfoiTgfXfMzBKM0R841WEG00s1FHlvS4St9Hf0UTnv+Mw kDXQ9dl0RRMJz+a8Rqm2MOOW1wZHU/s8uPNTJDcF7AmvorD0MtMGCTUyY/0YQNSf5isi jxE00CfvVD6QWtlKsUbjBb/YUEGRUUzTSzXZuzGjILxC+U3FpaUidhTb14Fe8ydR40Ug NqrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pA5rgpRQHTSCN/GLM21EYU5Er0xU1UvmWyDaPEdq2Cw=; b=1XwaZu6MnDAkBMqlxFXO54Ofxg90YbCli36smuKhcKRfDCzaMFvS97P3wG9Alk0Mfy b6ATQXapQ0NdkSasWZG4Xi1BcTT22hMcsUVwe/ypW5TSEJmjLvSCoqnMU0X5/uyuD8tR B0dzN9Ogg4tytWdwEVyjxpKkedjz8aZO9VgcAYC8q2rxzDG27XXfiTkheUCdyokkWEeV 76c36aUe8ZMII1g53vHDTB1CwxaS62Yu41aTzb8MsRkCDlw26wQL6sw7hDBY4+AZCSOC eUs9R3N6R3xHH6BJfByEvPKZxt0UsU4D9NCoJZ6Vq5iWjA+IBW8FEx26ijrOtnPtJ/Xp 2tjQ== X-Gm-Message-State: ANoB5pmPgxikQdkCZePvcNHGqrIvVB48OnC3tUfg7fRQnY3O0FveUf5k uOn62ZdYYF8C/fnplHA6MDA= X-Received: by 2002:a62:f211:0:b0:574:7931:98a2 with SMTP id m17-20020a62f211000000b00574793198a2mr37918466pfh.17.1669889508402; Thu, 01 Dec 2022 02:11:48 -0800 (PST) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id pj7-20020a17090b4f4700b001fde655225fsm4626901pjb.2.2022.12.01.02.11.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 02:11:48 -0800 (PST) Sender: Tejun Heo Date: Thu, 1 Dec 2022 00:11:46 -1000 From: Tejun Heo To: Yu Kuai Cc: Li Nan , josef@toxicpanda.com, axboe@kernel.dk, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, "yukuai (C)" Subject: Re: [PATCH -next v2 8/9] block: fix null-pointer dereference in ioc_pd_init Message-ID: References: <20221130132156.2836184-1-linan122@huawei.com> <20221130132156.2836184-9-linan122@huawei.com> <9ca2b7ab-7fd3-a9a3-12a6-021a78886b54@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ca2b7ab-7fd3-a9a3-12a6-021a78886b54@huaweicloud.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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 On Thu, Dec 01, 2022 at 10:12:13AM +0800, Yu Kuai wrote: > 1) By mentioning that "del_gendisk() is quiescing the queue", do you > suggest to add rcu_read_lock()? This seems wrong because blk_iocost_init > requires memory allocation. Quiescing uses SRCU so that should be fine but I'm not sure whether this is the right one to piggyback on. Jens should have a better idea. Thanks. -- tejun