Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3174885rdb; Thu, 16 Nov 2023 02:14:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkql2Jv6Aiox1clx6DGiHQFmnBDdpjVdJrI0PA7VfmXXXk4YVNOGTTqbl0XAnP+3i9g+uC X-Received: by 2002:a17:902:e812:b0:1cc:5306:e8a3 with SMTP id u18-20020a170902e81200b001cc5306e8a3mr2007493plg.3.1700129653911; Thu, 16 Nov 2023 02:14:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700129653; cv=pass; d=google.com; s=arc-20160816; b=o3xi/YxYBbTb21QSq7fTGTE6VbrltF75/XfjTqP4qt9V2Z7UbJQm2UCqZPAlKJZ4PT UsWxpJ+VA1XJVu6GkTIpabzaPVNbnbZIh47Shx5fpEPfX8SJYnzuocN+6BeAKMhXwXpE 2pcIDj7QgF0ionDr5WhVMWVMBWJjuUyOFzlAQ5aP2dNT5VtXwbsqqFrOp4k5rHFI8Jli 75XzrK4NgtB6WmlnbQ0vugP7WoYsaSr4ha415vKV6WlzwSzahncnJ9KXKw87TVl8OHvn 1+5EZw0XeJ7rn6UxS+CxvhyJFOAczxhvAkjAD3x5GGR6oqkulvphncHQL1VoywUVtYf6 wwHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:references:cc:to:content-language :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=a08UcUVLoZOMzvhfMPbsUtOgHS7OotEvKPb9ea4qd7g=; fh=IcW7UzelfbYwpeRAH66XS65ZXQuZvUKLuXKAxOtkcPs=; b=VlBkp9egAqa9508rIIBeMdy8weQR/r2e5V0DhDhPSTraoY8L0TX9Aby4vx3vcdiePo Dpgth+qKorWCoaH9cpa5BNcnMHkBUXEkDq53XM2sEtJhywvyfAueT8yE7Y2jAId9ILa1 NpID8wXWDkzRR1vG5XGnzm1M+YRP5VKfPSM8ylPEu5pUYHUpT8vniGovu6KW28OIqfpQ lYGJSv9UAUQmSGQiey5HXGZXvntheiokil3/huwroZOjVq+r0xzh2ARgwE/xhSIgjxMQ 7s9vFxKHSz741+7NkwIiI5TgsupJ9jz+Vf5qEiW/II/WJvHeqWDptjkrsCQq/MEMNWWS ioJw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=nUFpucRA; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=olLLTQ1M; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k1-20020a170902c40100b001ca7af18a99si12769274plk.564.2023.11.16.02.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 02:14:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=nUFpucRA; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=olLLTQ1M; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2A2D3816F073; Thu, 16 Nov 2023 02:14:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344985AbjKPKN5 (ORCPT + 99 others); Thu, 16 Nov 2023 05:13:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230287AbjKPKNz (ORCPT ); Thu, 16 Nov 2023 05:13:55 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D04E219E; Thu, 16 Nov 2023 02:13:52 -0800 (PST) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AG9KU0p014803; Thu, 16 Nov 2023 10:13:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=a08UcUVLoZOMzvhfMPbsUtOgHS7OotEvKPb9ea4qd7g=; b=nUFpucRAKyARRmR1J+2QlML4RgbvQwf+XBuTQU3WdzbXD8XDhLRErJSOTcZ1TslleNY0 +/ocHUnDfnbLTHuTXtnsHnq4oDx6kUp+UJstrKiZZ4bFpZ0Yxqc68oXGdhXsF8KOeKjy qZZ3OONjCRA7e9a3Yv1xzb1dHiOD55ihyCOKH9td41vFkfOBknhsKciyBk1HLXFSU1M3 bU63zSUW2XnQ36VT1QGINiDUTQDBDMy1d4ll/zltxV4Yqe+DzcCvQ1ifeDmQgMiwweHW oPTiED2Z/hjWQuQtFZkdLr2onp/x7gu9OyDM3BktcmdzuyktGSY0xlDK5z6LVHTRAjYB ww== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ua2m2jq4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Nov 2023 10:13:27 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3AG9bewS009775; Thu, 16 Nov 2023 10:13:25 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ub5k6muja-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Nov 2023 10:13:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Eld9mVuYA9XvDYRt3BOq2EOIugfHN/GgPyWbKDsVIGyjBgxmrJ11FXKKC/XEaLgLh4AiB7mXEuOokSiEdAxjm8xeUbxcPGVqz+8Z5rCrft/5DsVwzQqlvLOG/8p2S/VmNGbtrsNQ5PjQAUYCEuTBqdotSU546u62PvZQUzqMRVyZvgXH3Ew802q562XUvzVqrGQg3HnuevqYcY+LX9bEtCpGZl3TOdruKsTlVNsFEjBMZceipstXXNWptDA0P3KB2zkPKYU0F3SCqvNIvvKImpbxbTn2uCL2f1vciZ9xtPxpKh1QRYMnJboui8kO0zH+xxroANFuA4GYqemoO1aRpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=a08UcUVLoZOMzvhfMPbsUtOgHS7OotEvKPb9ea4qd7g=; b=QDJuzM9tNRfzadl5/vbt/6LojhCtDS5sGa8VZKkr4g8ztT1TFdBfQkef6Mzf9ylgy+yg5pe/n+P9AIpi34KFfuqhKctvtPjwELz0/2282S4oAHiy+vNg36Li6MqmLUOe4dTNnaSrmf6HxxcAxGiSuCKGW/fkhXlyZWVOjZTGj7IhXfhBIDXi7TKA3JBFUiaXCR4SNauM6gk3MD7bzXheJ0IPnlLyj1aOCvHkDLM2IbeoILCVakNkFODMHRVxe1RvOid6ePvybVmf6bzCYEyXiWn0w2R35k8J5y53y+epEBnlbhxrnqxGf5SatUWkXddVbxdqdPQ6mL3uBOT5fsSAwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a08UcUVLoZOMzvhfMPbsUtOgHS7OotEvKPb9ea4qd7g=; b=olLLTQ1MkmlDAsbdllPcbRSYarXdANb8k9FUrBszCzSTFL7DdHWIn1jZDBgpUZOXXfAbtEDrT5EsMXdkCL7UI4RPLkd2gF4iRECVvlKziKIoK0zKMXcs3DqhDj8JsvwamIlMxXJtThc4xEwAnDotoGGs904ND017f3T9pd7EAJA= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by IA0PR10MB6841.namprd10.prod.outlook.com (2603:10b6:208:437::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21; Thu, 16 Nov 2023 10:13:23 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::102a:f31:30c6:3187]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::102a:f31:30c6:3187%4]) with mapi id 15.20.7002.021; Thu, 16 Nov 2023 10:13:23 +0000 Message-ID: Date: Thu, 16 Nov 2023 10:13:19 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] scsi: libsas: Fix set zero-address when device-type != NO_DEVICE Content-Language: en-US To: Xingui Yang , yanaijie@huawei.com, jejb@linux.ibm.com, martin.petersen@oracle.com, damien.lemoal@opensource.wdc.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, prime.zeng@hisilicon.com, kangfenglong@huawei.com, chenxiang66@hisilicon.com References: <20231116035241.13730-1-yangxingui@huawei.com> From: John Garry Organization: Oracle Corporation In-Reply-To: <20231116035241.13730-1-yangxingui@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0519.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:272::6) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|IA0PR10MB6841:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ab583e5-62f9-4d29-0994-08dbe68caa8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0t2N6FMApenBuaYrvpjSIlbW2cYlmobpHhUGMrJPgdOgHVxPVjeniNYeS5H92/7hSG/3SMEvG5I4U+ye4Q0vA63iyo8B9J74zJt4htfnoHOMGlKkYaBC/o6bviCZVKX5XkWn3mXdBr0d/9uF3n4CRTm619OFqtzcKE2h0zgavn7tyqwM2bC/bdsHhKVNobj3g0pUY+xueRAbzAdOnIg+DoVddn7rjcj5QrF4yjzZmeeuk+m+NQxOwVu3BckWH5nPqtZ/LkrbkL4+B/+oJKKugjIK6UYDTjjKaO57UaG+Bzjg07CZRHrPDiCgBMGbJfqXBsse2tBP0vzUJu+sM026qyMlcgBH8jdMeneRcuF9L8s7uAT3l81VbLFne4JyFI/RB9VRnkjtowtOdUePPvJMCBcf9yhireglMnf3GDJ56dOq0QwUk+3BY0WO2FHosLqDviGbJexWFewF8iNItyosaY+zpjF/C0ilvsbd8Zz0/6swG1Hljg0k1bkWFQ32PdQHnTlWAKgmKg+KpxVHi6FejYR/clwn3aDR/11bUmLgHjkdqLl7GNcg7Yhe5ybGbDrhVtdwsBZp3gvuOxjyH2j8aRHf2p9IXGmCmsHTb7HnbBTSHHZySERdosJiZC8x9GhGvyUHRvfYO+vfXAmAsPOuwg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(136003)(346002)(39860400002)(396003)(376002)(230922051799003)(1800799009)(64100799003)(186009)(451199024)(2906002)(41300700001)(316002)(66556008)(66476007)(36756003)(8936002)(8676002)(66946007)(4326008)(38100700002)(478600001)(5660300002)(86362001)(7416002)(31686004)(31696002)(6486002)(83380400001)(26005)(6512007)(2616005)(6666004)(6506007)(53546011)(36916002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UGwyaEFTekUyVjkwZENsUCtheStVcVVZVHhMRjE4Z0p1Yks1aUdtQzRNb0hZ?= =?utf-8?B?QWFtVFoxdEZpY1dtNEo4TDhSK2xDYXNsSzgrY0NRSi96MG5wQnBLUGxlaHNK?= =?utf-8?B?V0hjWktmSTU0QncrSThjVmc4R2Y0b2RCSVN4UEhMZEpLVUs0Q0NudTFZcStj?= =?utf-8?B?WDhmaTE0azNWSUYwQ2YzR3p4MH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n/U/xzWVprZXNXQqGi53A+yFyXwo+jQvfSS7wL8fTZcgcu6ZT9PaISv6x9XqKMDpdm/8wu+wttwziDaKHkZaacgeQ0L/8ngzxqjt1pb6D6nA8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ab583e5-62f9-4d29-0994-08dbe68caa8f X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2023 10:13:23.6210 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cHxzpGZmHmD/2toihOG8rvxTymgf7Fa0jCiGCfmOCrXvPmA2FjMAGYRKO065ztuJ+Co2efBv3rMBer+v72hy/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB6841 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-16_07,2023-11-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311160081 X-Proofpoint-GUID: TTaruvPHrXo-pLduG9Dc2fIx1Ce1Phfr X-Proofpoint-ORIG-GUID: TTaruvPHrXo-pLduG9Dc2fIx1Ce1Phfr X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Thu, 16 Nov 2023 02:14:11 -0800 (PST) On 16/11/2023 03:52, Xingui Yang wrote: I think that patch title can be improved, but I would need to know more about the problem before suggesting an improvement. > Firstly, when ex_phy is added to the parent port, ex_phy->port is not set. That seems correct, but why mention this now? > As a result, sas_port_delete_phy() won't be called in > sas_unregister_devs_sas_addr(), and although ex_phy's sas_address is zero, > it is not deleted from the parent port's phy_list. I am not sure why you mention this now either. You seem to be describing how the problem occurs without actually mentioning what the problem is. > > Secondly, phy->attached_sas_addr will be set to a zero-address when > phy->linkrate < SAS_LINK_RATE_1_5_GBPS and device-type != NO_DEVICE during > device registration, such as stp. It will create a new port and all other > ex_phys whose addresses are zero will be added to the new port in > sas_ex_get_linkrate(), and it may trigger BUG() as follows: I think that it would be better to first mention this crash, i.e. the problem, how you recreate it, and then describe how and why it happens, and then tell us how you will fix it. > > [562240.051046] sas: phy19 part of wide port with phy16 > [562240.051197] sas: ex 500e004aaaaaaa1f phy19:U:0 attached: 0000000000000000 (no device) > [562240.051203] sas: done REVALIDATING DOMAIN on port 0, pid:435909, res 0x0 > > [562240.062536] sas: ex 500e004aaaaaaa1f phy0 new device attached > [562240.062616] sas: ex 500e004aaaaaaa1f phy00:U:5 attached: 0000000000000000 (stp) > [562240.062680] port-7:7:0: trying to add phy phy-7:7:19 fails: it's already part of another port > [562240.085064] ------------[ cut here ]------------ > [562240.096612] kernel BUG at drivers/scsi/scsi_transport_sas.c:1083! > [562240.109611] Internal error: Oops - BUG: 0 [#1] SMP > [562240.343518] Process kworker/u256:3 (pid: 435909, stack limit = 0x0000000003bcbebf) > [562240.421714] Workqueue: 0000:b4:02.0_disco_q sas_revalidate_domain [libsas] > [562240.437173] pstate: 40c00009 (nZcv daif +PAN +UAO) > [562240.450478] pc : sas_port_add_phy+0x13c/0x168 [scsi_transport_sas] > [562240.465283] lr : sas_port_add_phy+0x13c/0x168 [scsi_transport_sas] > [562240.479751] sp : ffff0000300cfa70 > [562240.674822] Call trace: > [562240.682709] sas_port_add_phy+0x13c/0x168 [scsi_transport_sas] > [562240.694013] sas_ex_get_linkrate.isra.5+0xcc/0x128 [libsas] > [562240.704957] sas_ex_discover_end_dev+0xfc/0x538 [libsas] > [562240.715508] sas_ex_discover_dev+0x3cc/0x4b8 [libsas] > [562240.725634] sas_ex_discover_devices+0x9c/0x1a8 [libsas] > [562240.735855] sas_ex_revalidate_domain+0x2f0/0x450 [libsas] > [562240.746123] sas_revalidate_domain+0x158/0x160 [libsas] > [562240.756014] process_one_work+0x1b4/0x448 > [562240.764548] worker_thread+0x54/0x468 > [562240.772562] kthread+0x134/0x138 > [562240.779989] ret_from_fork+0x10/0x18 > > We've done the following to solve this problem: I'd use "Fix the problem as follows:"" > Firstly, set ex_phy->port when ex_phy is added to the parent port. And set > ex_dev->parent_port to NULL when the number of PHYs of the parent port > becomes 0. Thanks, John