Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1933215pxb; Mon, 13 Sep 2021 08:27:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYO7grnWIa5ZKmBD91LU+TFPMuJ5L2DXvIwnvnaqGZbBBeCweU01hnWRNzyQDJH/JcQL4p X-Received: by 2002:a05:6e02:1111:: with SMTP id u17mr8344684ilk.262.1631546826455; Mon, 13 Sep 2021 08:27:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631546826; cv=pass; d=google.com; s=arc-20160816; b=iRW0LkukpuLd87OBwxm0b0wC9PbQtG2k3bTAidmRXIM8X93jNXZf3VIdbLKwVeSXkn bVynRLd5oxLRJ29fF9WlnmHr98xuFMJYlsgMVdO2tSIXOiwHe4gb5MW24D+RbiQsMhYw dt1o1A9uzREfxs7iolGVg5pxDp58IbHBBjYiR5coTP1kjOZI7j2d8jS7qU8xcPbL2YmZ FCxRLUctL3Ee6GE9duFNHvYd5W3oJoaThHb9gVYSFP4w80JRajHRmSyVbc5Ym8mM/GsQ 86TsXf2KEedcCkoOl7+r+otRjN9XEtV0JKTtQampvgiitXFF4aBuXFWesu+xr8LoP2GF Kqpw== 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 :content-language:in-reply-to:user-agent:date:message-id:from :references:to:subject:dkim-signature:dkim-signature:dkim-signature; bh=VTdvDUr760htrBUmVJZ5QnWh9QhjP6Hg1OhLAYaxzIc=; b=QwLiwKd7/gIhz1N3uYqlh41YKusPtmuGvFnXD1TFJE/pd6W/RHRvfmBZmuAXIYm21N GhPAKRJAuOLB+yEkMLXQDNQqn4qD1C9oYm5WhGWvplIn6PDOpVpsy/vfRIUzadpEq7gb fN6pHizEHvoHPb8CqMplq1PQzfjXFf1/HyKjAqoWiMJ886TTnB4TyqNWpRhIw6E4b468 bJHtQLuJgMV7IjRCzTnOS+1BqHiDn+wIju420yhupZ9Rfrb0Q3XFi5ZFFTplA6TB/0o9 qBBaNjOcV0Ly09XptxHL8DYm09UFejJC87mwvvmrUp9D2QLn2P4fBY1EpS2Ab4YJdswa JJyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=Zz3yutat; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=sfkjgTQt; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=eJpt2JMX; 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.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l10si8213663ios.26.2021.09.13.08.26.49; Mon, 13 Sep 2021 08:27:06 -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; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=Zz3yutat; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=sfkjgTQt; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=eJpt2JMX; 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.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245261AbhIMPZ7 (ORCPT + 99 others); Mon, 13 Sep 2021 11:25:59 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:49134 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347161AbhIMPZA (ORCPT ); Mon, 13 Sep 2021 11:25:00 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18DESqbn024407; Mon, 13 Sep 2021 15:23:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=VTdvDUr760htrBUmVJZ5QnWh9QhjP6Hg1OhLAYaxzIc=; b=Zz3yutatCNOxy96sHASxav2YjLZFolPT1sP71IFV9GROzOhOWHuOHFubq0NE7RQbOBt5 4zB3dknhyI1y2sv094XSaxHJlQi1urbAxfLsBfIfmlaPMEnA3gOeVqM3oiM1Ulc+JkdW LVZcsMkhCspuU4H2EC81OnHKpq9dn9yfwZPX8Oo3mmfn+9JN9vOur1piCxma/DQf5D1d mlLi4MGBestPS73urLhEffFEd4oq7GyjpjBqGEoN3slOvJlYttem+r9M+HoMW3NHqL/M v0Ykp5LBmzabkTZA5GVnnZggCn03Sto91XeGYd3wT4g2Do9d9/06UYVo0Dany/5qyza+ Jw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=VTdvDUr760htrBUmVJZ5QnWh9QhjP6Hg1OhLAYaxzIc=; b=sfkjgTQtXWCyR82lxeTjHszhwYhMj/lua2Fzgrbz/8njSW0yqaHFNhPRFxxVSaBxK5ly 50vTaJwHKGx14jNwVyHjoYmgkrQ5UzmrMjyoWxpSzVKp9/21POg55PSKKk1zuqtkTaHZ ke0p1eqzIbvjnSo5tjVGVrvPpcPjQutAL+8S823oZAu95UCuE6WemPJAe+CjvLDr7dGt HG7D7hhrpLmZ5K4LgOJWp4hYcgxWNEE35pJyli3xMtnxX7uGVkGT/mC7zjE3QTl2Sffo D4rfpNrTiZZCKDDeUak77upRNVodesAGZg16AYwWCz4mbyBGDmlBJ2BBv5BmMtefpCQu wg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3b1h45k62e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Sep 2021 15:23:34 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 18DFF5PN004952; Mon, 13 Sep 2021 15:23:33 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2108.outbound.protection.outlook.com [104.47.55.108]) by userp3030.oracle.com with ESMTP id 3b0hjtnd1j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Sep 2021 15:23:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I6ABGKnsUq606Oicyord5TGepfUdQKhEs73vL7DIB5gDOZjHYF/UpUSH4nDhx+I546hH2xiajz4j2U0vzXa1zLyF+QOeKXMd93s+/m5VPyM40QCyHCZhcrV3Xdsv3ORN/k8Log/AXkSQz9H+eB/+ONkxZ6iserMs+DZqual1SN54I8qqQ4LUJkAREPYOoGWCFJk05M5POvlFmX2LX3VhrNRoRXyJn2oYO0vt9g/8A4Py0eWJgp3LkP7hfdeTJhbls59Dy3vrN4F0pzii8QetOM+4VtrHL/GZ9et1fs4Rd4czjywWkIggHZ3hV94/NK8e5vmrv3+PIWV0FJkuIRFc7g== 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; bh=VTdvDUr760htrBUmVJZ5QnWh9QhjP6Hg1OhLAYaxzIc=; b=JeW9Z7+hLvxsHPBAU3+quYnABcprayMI8aVJg/KP9cjNb8Dl/oV9EziWHlxJM7Jgt9JUmel8vJv2FvH2KJiyKgIFdsVV9ovDHhV7a2kw94Si3RzQQX+uwuIbUs8BMxfoDFSV8UW86ziybQkcWLzZM8zn999KI2IYNs87Nuj45WXzpE/7y/VQaaNteS3v+K4P4dpNNZwEeXfXTxOgf9LjmuXb5YGd21J5gJqP6S8fKInrWdY58ZJ4sCHX7QzODc/itdBPNpN4kjGR5Y71u1s+LGeCSL52zXPznBFRGX54gfBUINZ1q03vhdQJSdFpg0PetosGKA3+tz/yfRl+yXn+AA== 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=VTdvDUr760htrBUmVJZ5QnWh9QhjP6Hg1OhLAYaxzIc=; b=eJpt2JMXB7jo7ay0ZuN9mUUU5XXIA2YGgSzXbFDAzdooak4YzjW7eqH3ML/WGSylGEPQbSHxVf3c7dwMyHbw1Z/Q4NInm0FdzyBbt71tqZtgN2mdOCjTD6zubqrqg4XSl2H0RetMeumo9w0GQ4YlQAE+1uAj71BihVpNHdGT4F0= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=oracle.com; Received: from BYAPR10MB3573.namprd10.prod.outlook.com (2603:10b6:a03:11e::32) by BYAPR10MB2423.namprd10.prod.outlook.com (2603:10b6:a02:af::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.25; Mon, 13 Sep 2021 15:23:30 +0000 Received: from BYAPR10MB3573.namprd10.prod.outlook.com ([fe80::5881:380c:7098:5701]) by BYAPR10MB3573.namprd10.prod.outlook.com ([fe80::5881:380c:7098:5701%6]) with mapi id 15.20.4500.019; Mon, 13 Sep 2021 15:23:30 +0000 Subject: Re: [PATCH v2] scsi: libiscsi: move init ehwait to iscsi_session_setup() To: Ding Hui , lduncan@suse.com, cleech@redhat.com, jejb@linux.ibm.com, martin.petersen@oracle.com, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210911135159.20543-1-dinghui@sangfor.com.cn> From: Mike Christie Message-ID: <3c40a1af-5f13-0e93-67ad-f1ccd4f1480c@oracle.com> Date: Mon, 13 Sep 2021 10:23:27 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: <20210911135159.20543-1-dinghui@sangfor.com.cn> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DM6PR03CA0038.namprd03.prod.outlook.com (2603:10b6:5:100::15) To BYAPR10MB3573.namprd10.prod.outlook.com (2603:10b6:a03:11e::32) MIME-Version: 1.0 Received: from [20.15.0.204] (73.88.28.6) by DM6PR03CA0038.namprd03.prod.outlook.com (2603:10b6:5:100::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 15:23:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c383514-ea79-428f-f6fa-08d976ca7138 X-MS-TrafficTypeDiagnostic: BYAPR10MB2423: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:241; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: grFLuwUuK4ENo67f2ebj2GE/0WVQDTuSZ0JY4soswuWeKJYQBFv21MWUsqAyIUi1rtes4LJAknbvsUt6Jau9/HfsEK9ZwZnfGfY12oZt2LlPiuScyxEJoEMCb79mqWx67V4POrOxS0sCeMzHB8NE7rdv1rnJPa5s/dxFKq0+x1KufocSQjRM4pLBUdCLw5dNvfzJl3c+vDQBYTBXZI7hvu6hm+oOyjhfdc7R+q9/aLUpPjhEP7PAyYE9vfMgN4AYViuUijCbgQdHj7XA9yegosV+VShuP0DOvFau+WK+hrMmSMe9YlcWreCFpOuMi8SXJxYQlywAnpQHUCaYuINvleV3RJ7cWqb5dPc3hVWoCX7k28dKLVLQl9jy7mqTbNUDIBzbUX3b7dXbduZexflx0OLFVe6qeY9QqXquCuXK8FUS1fQuzHlPMMl8gUohBdfIlSk4JS8mC6X+tcF0ndry8TMHuqoNkV5lE9WUTcpzJx/qtPwmgZjtgJwX4Gg9G8WsbypZ7N9xefG7LmxJGssPJluXagdIpc4pvpw14QHAwn/3OxH0+45pH9RxAWv1iS2BT0ykPKrff2hUXXykItPRJ9smJRBZVV3Y9BrOeKnoQ8K0H86xSbLh8yfHeEwDe7yIlbCtxjg0c/6Ynx1KxrAoY8bzJW0jTEV/iiF1bFk18fKKjJ1B8DbBKZOumVQG4PaHEbPxrCoTUZ1i9gachoP6QLQf5+GwO3cF3hMNOix2MRA3BDI8d5L1AcCqbVeJit95 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR10MB3573.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(376002)(366004)(136003)(346002)(39860400002)(956004)(2616005)(2906002)(53546011)(66946007)(66476007)(66556008)(186003)(38100700002)(86362001)(83380400001)(8676002)(16576012)(478600001)(316002)(6486002)(5660300002)(36756003)(31686004)(31696002)(8936002)(6706004)(26005)(78286007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-M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JydlMyak1yZnlnYjlKTE5KcGNicm5x?= =?utf-8?Q?32juf8FwLoiiaYpBWjA1IYKyUQZiDr+YJQ4XKsc?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c383514-ea79-428f-f6fa-08d976ca7138 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3573.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 15:23:30.6165 (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: UWaQvQTLKvxsGQpQ5UsDq3nMHHNzBqW7Wa8xhZy5B99uFZ6to1kfTTAt2R7W+y+mruq1cBB67/LxRNNK9ivVplYsSnxF1YpCbSjwlTOZr5o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2423 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10105 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109030001 definitions=main-2109130102 X-Proofpoint-ORIG-GUID: 3oJTlwv_M4XRxEHGBuzILVLY2WoISl5n X-Proofpoint-GUID: 3oJTlwv_M4XRxEHGBuzILVLY2WoISl5n Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/11/21 8:51 AM, Ding Hui wrote: > The commit ec29d0ac29be ("scsi: iscsi: Fix conn use after free during > resets") move member ehwait from conn to session, but left init ehwait > in iscsi_conn_setup(). > > Although a session can only have 1 conn currently, it is better to > do init ehwait in iscsi_session_setup() to prevent reinit by mistake, > also in case we can handle multiple conns in the future. > > Fixes: ec29d0ac29be ("scsi: iscsi: Fix conn use after free during resets") > Signed-off-by: Ding Hui > --- > v2: > update commit log > > drivers/scsi/libiscsi.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c > index 4683c183e9d4..712a45368385 100644 > --- a/drivers/scsi/libiscsi.c > +++ b/drivers/scsi/libiscsi.c > @@ -2947,6 +2947,7 @@ iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost, > session->tmf_state = TMF_INITIAL; > timer_setup(&session->tmf_timer, iscsi_tmf_timedout, 0); > mutex_init(&session->eh_mutex); > + init_waitqueue_head(&session->ehwait); > > spin_lock_init(&session->frwd_lock); > spin_lock_init(&session->back_lock); > @@ -3074,8 +3075,6 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size, > goto login_task_data_alloc_fail; > conn->login_task->data = conn->data = data; > > - init_waitqueue_head(&session->ehwait); > - > return cls_conn; > > login_task_data_alloc_fail: > Reviewed-by: Mike Christie