Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp734245pxb; Fri, 29 Oct 2021 20:00:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvIGWg5bOfffhMH3xTuK2yRYOOp7vfshTOQQtoVpG7ck2k/vwuePGR6tkEqGPL365+FIhD X-Received: by 2002:a05:6402:34d0:: with SMTP id w16mr20240826edc.98.1635562802917; Fri, 29 Oct 2021 20:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635562802; cv=none; d=google.com; s=arc-20160816; b=KZqvwIQ9XjHy8s4BV/egz2sXaESYXW0OB1YZLtekvgQYqTYCB4vqOJSKZtAFsgRp0R 3x6aKh11Q6CKldHsn0nns5oPoeJbDVxiqDUPJob9lDt6JNLG+6tkSTzeI89Jrrhq+OTc N7IWiXNFdeIIQh8AoAEkOtkEAGQ6qlAgToFEsBT+uirdP57X8MYDC5S2zBfMWIjsNLeK rot+hkiNuMGTzkWJmvCq5L/j9BR9v/sgDWtwF6NahGW+l2Cp32PgbVBVSYYuyEC6zFck PV3gio524t7r16Mx6LxYElxMPmt3LIr55J8ibr0mLPlpJNBI22of6wSk+L8TIiwfVpxQ H0lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:user-agent:date:message-id:subject:from:cc:to; bh=EIJfR3mXAiFKq+HjP5xUSp6BRfJjfgMbroWHGl1iaFo=; b=faYji9p8nbeaN14lRnU6PQkGlwgktFxpXKoQ8OlpAK3NLcA8kjGgrTy1N7kG88tyA2 lS6L4aRzwTz2GQ2pQuKn5kba2kXd3b4via+wr2fm0ENuiKDqe84jSMLj5HxKPUZAgDDs DCAGXUB3C6QQAKa8XAH08YsBgYprXvEv9tHgMDXxc0vpewyfz1719UjXkOGB0YbT5nqq l7JrYgFLCGazPaJrqrScjdVHrifCmUgxw4WcjfmaoE83uU4GF8G32QkOiNInOiNNVjgS iztgyi4UjehFyPmucW5+HFx0JvTBHgutub/ADJkqHbWH5prdqK+UgoAb1kBKDrn3vK/3 aUmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cr19si9803661ejc.34.2021.10.29.19.59.37; Fri, 29 Oct 2021 20:00:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231623AbhJ3C7M (ORCPT + 99 others); Fri, 29 Oct 2021 22:59:12 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:26209 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229700AbhJ3C7M (ORCPT ); Fri, 29 Oct 2021 22:59:12 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Hh3nJ1KlVz8tyl; Sat, 30 Oct 2021 10:55:16 +0800 (CST) Received: from kwepemm600003.china.huawei.com (7.193.23.202) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Sat, 30 Oct 2021 10:56:40 +0800 Received: from [10.67.102.185] (10.67.102.185) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Sat, 30 Oct 2021 10:56:39 +0800 To: , , CC: John Garry , From: "liuqi (BA)" Subject: [ISSUE] WARNING in base/core.c when executing link reset of remote PHY and rmmod SAS driver simultaneously Message-ID: <80100e01-0d8e-627d-e1cb-ecf1083359bb@huawei.com> Date: Sat, 30 Oct 2021 10:56:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.185] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, I met a issue on v5.15-rc6, WARNING is triggered when executing link reset of remote PHY and rmmod SAS driver simultaneously. Here is the WARNING log: WARNING: CPU: 61 PID: 21818 at drivers/base/core.c:1349 __device_links_no_driver+0xb4/0xc0 CPU: 61 PID: 21818 Comm: kworker/u256:4 Kdump: loaded Tainted: G W 5.15.0-rc5+ #25 Hardware name: Huawei TaiShan 2280 V2/BC82AMDC, BIOS 2280-V2 CS V5.B170.01 06/30/2021 Workqueue: 0000:74:02.0_disco_q sas_revalidate_domain [libsas] pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __device_links_no_driver+0xb4/0xc0 lr : device_links_driver_cleanup+0xb0/0xfc sp : ffff800049e73b10 x29: ffff800049e73b10 x28: 0000000000000000 x27: 0000000000000000 x26: ffff00209ecd7428 x25: 0000000000000000 x24: ffff204002bc8000 x23: ffff00209ff53190 x22: ffff00209ff53190 x21: 0000000000000001 x20: ffff00209ff53230 x19: ffff00209ff53210 x18: 0000000000000030 x17: 74796274736f6820 x16: 3a746c7573655220 x15: 3a64656c69616620 x14: 2930312865686361 x13: 4b4f5f5245564952 x12: 443d657479627265 x11: 7669726420343078 x10: ffff0020913b0640 x9 : ffffccc6d592b514 x8 : ffff204002bc8a00 x7 : ffffffff80000000 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff00209ff53250 x2 : 0000000000000003 x1 : 000000000000004c x0 : ffff00209ee60c00 Call trace: __device_links_no_driver+0xb4/0xc0 device_links_driver_cleanup+0xb0/0xfc __device_release_driver+0x198/0x23c device_release_driver+0x38/0x50 bus_remove_device+0x130/0x140 device_del+0x184/0x434 __scsi_remove_device+0x118/0x150 scsi_remove_target+0x1bc/0x240 sas_rphy_remove+0x90/0x94 sas_rphy_delete+0x24/0x3c sas_destruct_devices+0x64/0xa0 [libsas] sas_revalidate_domain+0xe4/0x150 [libsas] process_one_work+0x1e0/0x46c worker_thread+0x15c/0x464 kthread+0x160/0x170 ret_from_fork+0x10/0x20 ---[ end trace 71e059eb58f85d4a ]--- Normally in __device_links_no_driver(), link->status is DL_STATE_SUPPLIER_UNBIND, but in the WARNING scenario, link->status is DL_STATE_ACTIVE. I'm not sure this warning is caused by libsas, lldd or sas scsi transport code. Does anyone have any ideas? Thanks, Qi