Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4582171rwd; Tue, 30 May 2023 07:20:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44JwKludBbQHcAaCT9k8c585FGQIz5TFFaXFMQjVKgA9kbNc5mEbv5/n+RO1SO/GxD0DkU X-Received: by 2002:a17:90b:1e4a:b0:255:7d50:c1aa with SMTP id pi10-20020a17090b1e4a00b002557d50c1aamr2545911pjb.44.1685456402719; Tue, 30 May 2023 07:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685456402; cv=none; d=google.com; s=arc-20160816; b=tvNAsufcq8izNBNS2gwqFKOTFj8s3yQ3fEEeri1HbMF2rR5z2x2aAqFMGadHwugLYH FyYD+3p7s7hLlXWoSABexccxoFs/NYDMBn1vr1WMXKbUkmk6tIyh/i/AwwAphpBBRjw1 VCRJhXA3mgi5GcuG/Bq9DUtDug2OLcnhBSk00B3jO2s39oqIqYYaIYQfcHZ8W0vmomy3 ru0/LpBtKTCfQxCiBg5JMjJHKD/h7OHzki7Ci+zOoQqdymXxZQJngkWb1RwH/KdxBUaU XrKvGynLJXKVA2WQWo1EMFDcBXWC1E+1KtCkMLlbCnu7crpLaxp6804hhyUaIjXhcyuX 2U4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=nogAdIhIEcRufBTKT7Lbbk2HOGiCgRxmJNBls4bH9tk=; b=MLk7VRNgb7wMZWdBNdsnQ89604TzaPQt8sskWqnKGop1YEAfD9g30ouqWZTuOleqDw moy+yCjbCb+Ta5tZbejLgckCsbpodSbnDFuQW9l0G/XELEA0+/mIVMlw5Hajw3iMnHxA SpXyrsI4UIXsIxb5ZORF1E6ZJ0C00Nl+40TS5nYzlEHasgQ0RGX1xST0VzjGWjk4GZM/ zWGFzfhsxPahs+sXaM00Ggo+li76u2yQWzrxmVRwG+Mdgm4PRA4zvNCQyYo081gniv4J mE6YiBAS6Ljpg/fD2knOzmWz5PrSO58iDUy4s47hlRhG7OWCvAt+pLBpYAkM2ctgHrlx JI9w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx12-20020a17090af48c00b0024666c4e8d8si7498071pjb.187.2023.05.30.07.19.49; Tue, 30 May 2023 07:20:02 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231821AbjE3NYr (ORCPT + 99 others); Tue, 30 May 2023 09:24:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231157AbjE3NYp (ORCPT ); Tue, 30 May 2023 09:24:45 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 949ABD9; Tue, 30 May 2023 06:24:42 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4QVtR938J0z4f3nTh; Tue, 30 May 2023 21:24:37 +0800 (CST) Received: from [10.174.176.73] (unknown [10.174.176.73]) by APP4 (Coremail) with SMTP id gCh0CgBH_rEU+XVkWUMyKg--.13490S3; Tue, 30 May 2023 21:24:38 +0800 (CST) Subject: Re: [PATCH V1] block: Fix null pointer dereference issue on struct io_cq To: Pradeep Pragallapati , Yu Kuai , axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, "yukuai (C)" References: <20230517084434.18932-1-quic_pragalla@quicinc.com> <07b8b870-a464-25a9-c0a6-c123fad05ff5@huaweicloud.com> <4648819c-2115-a981-1b74-0495b94d4233@huaweicloud.com> <00eefae6-8db4-139b-9f8a-9ed326817561@quicinc.com> From: Yu Kuai Message-ID: Date: Tue, 30 May 2023 21:24:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <00eefae6-8db4-139b-9f8a-9ed326817561@quicinc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgBH_rEU+XVkWUMyKg--.13490S3 X-Coremail-Antispam: 1UD129KBjvdXoW7JryrJFWfJF4xWF1fur1kAFb_yoW3WFc_Ww 4UuasrGwn0gw4xtrn8Krnaq34vqF18KF13JrWxAF4xG3s7Zas5AF4rJ393A347GrW7Jw48 Cr1qga4SqFsxKjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb4xFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_ Gr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IY64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7Mxk0xIA0c2IEe2xFo4CEbIxv r21l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxV WUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI 7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r 1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2jsIE14v26r1j6r4U MIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHUDUUU UU= X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 Hi, 在 2023/05/30 21:15, Pradeep Pragallapati 写道: > Hi, > > On 5/22/2023 11:49 AM, Pradeep Pragallapati wrote: >> >> On 5/18/2023 6:14 PM, Yu Kuai wrote: >>> Hi, >>> >>> 在 2023/05/18 20:16, Yu Kuai 写道: >>> >>>> @@ -173,18 +171,17 @@ void ioc_clear_queue(struct request_queue *q) >>>>   { >>>>          LIST_HEAD(icq_list); >>>> >>>> +       rcu_read_lock(); >>> >>> Sorry that I realized this is still not enough, following list_empty() >>> and list_entry() can still concurrent with list_del(). Please try the >>> following patch: >> sure will try and update the results. > > > At least for 80+hrs of testing, i didn't see the issue reproduced. seems > like it is helping my case. Thanks for the test, I'll send a patch soon. Kuai