Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1491332lqt; Fri, 7 Jun 2024 23:44:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXXoFGmincG+wttZ0gCmh8eZLnEoUoXgiPiacxsC71QZKw6G5haOkT1vsnFYovk3A+hxaodN4UcYcbkAJA/jBWQ7HatX2krGePalp2B5g== X-Google-Smtp-Source: AGHT+IGkhxj4wLZDY9DLAx1h41lIrlNZiticQkjfQMKrX1+7kKkTYkM0q1Z6upsZ6iCqtbrO/BC9 X-Received: by 2002:a05:622a:1792:b0:43d:fc62:f0c3 with SMTP id d75a77b69052e-44041b4fff2mr50675231cf.10.1717829069200; Fri, 07 Jun 2024 23:44:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717829069; cv=pass; d=google.com; s=arc-20160816; b=Et5HFXohs+H5sjg6nlP6n3lxgCvDfTQ56oMtq/ARNFWRtxUVBNAt1HkXhIU4Fb6yHi HWfr6SS+Bp5aYJrJwRlFLcj6m/2nU9rRRDjIjtgoGmSa2U9Cko1hyaQUzUTB+rQi81YR 1/wj1DiITf61KbV724fgtioAHUQU+L3k62zDd3332yYkKLRD27frKyRDsi5Qb5wtDh1G zjwDBpHLOcnddUC1qzfzwXTHi8iDRe+vkWm+MUfdLnKF0D5kuNh0biiixMjIeQZspi2C P818bTnlfQYGxzsEBPeOBQtxHc/praDeemvctGAXgwAWoY5Y7aUoBtghri2pf1hYN9XX EbdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=wZXK7YKOXwOfBNGwA7g7vP+vAsAEDouW4cALX67wsAk=; fh=4ppY59WgfJsL8GmrmUpAdUPC9LvAkYsVWNjIzxKJ0e8=; b=r79wdT/OsAb4K1Yn7h+HuLuTx+MOlBpHuZI4Nq5WIxOdF1xDdo7RBZxz578tTlqnc7 cMMrMVJZzDnD+pvIi/eSTMvmCzSENYoAinCK0spY3Fi3MST5iIR6KT6RqJLod2uhpH4v PpQqPlGuZZaVXg0H7lkxK8pHn0S4dEmieRY7O2kGBgoqz3wjbmwloWjvK7AtLhVNDD9S q36+fbpQ9Uj+edn+m3sVV2sBCHF1SrQ/P4eHWmVvfUURCCDjG1mcGL3AJE8jsCA2C951 SUbuaitICpP2g5tVbfKHLUxAYi9pussEOX0K9xWziGmfofQLVG8NEhprxYO/YUuBPwGg M+Fg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-206915-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206915-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038a8695asi56489101cf.178.2024.06.07.23.44.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 23:44:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206915-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-206915-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206915-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E65201C2135A for ; Sat, 8 Jun 2024 06:44:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A680176AB6; Sat, 8 Jun 2024 06:44:19 +0000 (UTC) Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20CEA1FDD; Sat, 8 Jun 2024 06:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717829058; cv=none; b=QlqEGgr3a8zqMK/CYxwErRZKmSTHHvBVvZ+zQ9rCkIzLf5AWOzZk8xtYWpyGEn5QW2eky63zHsMyRR03Zni5uIDpxmf2pJCxQzPqmH2phbUrBFAhb317kK7IW9NqOfQXKztz3wuFb6yB8hFYvxyJdRi63TocWMfRG9CF4AzA+sQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717829058; c=relaxed/simple; bh=LIdbb5dyeR0Wcx2MqMie1Vp/1VbGTqntUHGDdy32Le0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oDvITtq6Xx6Rn+nbvIFv8bkhvMMTGEaB6qvEFGL6K+AFkF3K0kRnzf2cXedVJBCubLbzwGD2YP7g0kxxq0NrvZx4DeZU3yee13AiwwtADCFjOhnviiJQuA3jtze0Oxb53BNF5xF3czwhklBVapHhcTKzQ9lxyvvuScUgSNIkAqA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4Vx7nn1kwqz4f3jHx; Sat, 8 Jun 2024 14:43:57 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.75]) by mail.maildlp.com (Postfix) with ESMTP id 0FDA81A0181; Sat, 8 Jun 2024 14:44:07 +0800 (CST) Received: from [10.174.179.247] (unknown [10.174.179.247]) by APP2 (Coremail) with SMTP id Syh0CgAXOQyz_WNmIowPPQ--.42198S3; Sat, 08 Jun 2024 14:44:04 +0800 (CST) Message-ID: <30654e55-c639-4caa-af7d-9eea1bcf3cf7@huaweicloud.com> Date: Sat, 8 Jun 2024 14:44:03 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] ublk_drv: fix NULL pointer dereference in ublk_ctrl_start_recovery() To: Changhui Zhong , Li Nan Cc: Ming Lei , axboe@kernel.dk, ZiyangZhang@linux.alibaba.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com, houtao1@huawei.com, yangerkun@huawei.com References: <20240529095313.2568595-1-linan666@huaweicloud.com> <225f4c8e-0e2c-8f4b-f87d-69f4677af572@huaweicloud.com> <918f128b-f752-2d66-ca60-7d9c711ed928@huaweicloud.com> <2c46587e-0621-b21e-fbc1-fd69e87def03@huaweicloud.com> From: Li Nan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:Syh0CgAXOQyz_WNmIowPPQ--.42198S3 X-Coremail-Antispam: 1UD129KBjvJXoW7Ar18tw1xKr18GF1DCr4DArb_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/ 在 2024/6/6 21:43, Changhui Zhong 写道: > On Thu, Jun 6, 2024 at 4:05 PM Li Nan wrote: >> >> >> >> 在 2024/6/6 12:48, Changhui Zhong 写道: >> >> [...] >> >>>> >>>> Hi Changhui, >>>> >>>> The hang is actually expected because recovery fails. >>>> >>>> Please pull the latest ublksrv and check if the issue can still be >>>> reproduced: >>>> >>>> https://github.com/ublk-org/ublksrv >>>> >>>> BTW, one ublksrv segfault and two test cleanup issues are fixed. >>>> >>>> Thanks, >>>> Ming >>>> >>> >>> Hi,Ming and Nan >>> >>> after applying the new patch and pulling the latest ublksrv, >>> I ran the test for 4 hours and did not observe any task hang. >>> the test results looks good! >>> >>> Thanks, >>> Changhui >>> >>> >>> . >> >> Thanks for you test! >> >> However, I got a NULL pointer dereference bug with ublksrv. It is not >> introduced by this patch. It seems io was issued after deleting disk. And >> it can be reproduced by: >> >> while true; do make test T=generic/004; done >> > > Hi,Nan > > I can not reproduce this issue with repo > https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/log/?h=for-next > , > which kernel repo do you using for test? > > Thanks, > Changhui > I tested with the latest block code, commit 2ab79514109578fc4b6df90633d500cf281eb689, this issue also can be reproduced. The space of the root path has been filled up by ublksrv(tests/tmpublk_loop_data_xxx), which may the issue be related to this? -- Thanks, Nan