Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp657583lqb; Fri, 24 May 2024 09:14:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWNK9oS7Ce69VxijLumg5BB+dnPcmma+V2oFtY7fDKTOx17YkBjOUYdIa6AApTpVxS3e06D5pmRxT3LykCTtiClOMPQ48seYq6N3QzFgg== X-Google-Smtp-Source: AGHT+IHQDGB6n/jfabPZs+L5kTnlj6XH3O5g2IucghzQo/POliltwO74ZH8n1v4W5YkVMSJSsCpV X-Received: by 2002:ac2:454a:0:b0:51e:12e2:5315 with SMTP id 2adb3069b0e04-529664dada4mr1552634e87.46.1716567276510; Fri, 24 May 2024 09:14:36 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c804f6esi94940366b.22.2024.05.24.09.14.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 09:14:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188921-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=kQf3IeWN; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ebVMDZdJ; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-188921-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oracle.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 138CC1F240D5 for ; Fri, 24 May 2024 16:14:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B63112EBC4; Fri, 24 May 2024 16:14:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="kQf3IeWN"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="ebVMDZdJ" Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 5FAF712E1CD; Fri, 24 May 2024 16:14:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716567266; cv=fail; b=NQAKAxogvTLf0uA78e2QdNnGPMyikd0MnjiOlFY/80x3hYB6n73hWAYSgrLQjVTdR/Dhbk1Q9MheOPCe2xGIpiX4FUCR4XcEB0Rn+WU8at4y8ccQkKs5B8gWIGl9nEv6yxzL3nCIPnPm5bGpFE1BYNO8xfRugK0V/87AOpehWOA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716567266; c=relaxed/simple; bh=ZHdZCwn6JrwVGgRi3dKzZVkgnAnw2GqStBVZAHlSdFo=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=j4hL8nY/gakNYTLAlraxClix/pTzIv67diTTTIrFZpDt6mkMvoI0zDQUUwR4NERUoM+UOHWiKf04TgTARtJH9O0lmtUXN/jaT6/GgV8PM0dmgnOitECA0IvSe9dQAzJHDGwQEUNpy7e1RqOQhDf3X3IGfEkavu1Cnpz4gktwWoM= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=kQf3IeWN; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=ebVMDZdJ; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com 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 44OFxK5t023611; Fri, 24 May 2024 16:14:16 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-11-20; bh=2ulSJwlp1GFZL5zJwaMNqLMxnXFmsEKspc8LaC30Uw4=; b=kQf3IeWNsGd8F/Wc/t60Jsnd8lS6o3dY5Y2kI489qHh0i6IJpa2ESfc7R6jmHSuCNkQH 0VfEM7Im0XRq/tx9k7wFZvfwbggWQwo0EnMgz0UvB4jXcneNvDF9DPCuq+7WXnmUgvwI 5wgxZligsjuOiCPJO5BingIsXjjt4NzzyX4oDuZWnXJxWzDi9gSDqHjSJCm9rHnD9f33 ad41+nIHw4TLZ16DuiQ/hrzj0usbV4tJNoZGYT62yOq4IXWA6Gu/GF34J/I4pWyxadgA /v1rJ7F944B/J95s/iYeS+Fnis6MgOfc+h2M3HrNPciJbf5xvxox+RAsIezKx7GRRrAs Ww== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y6jx2mqu6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 May 2024 16:14:16 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44OFHiXK036054; Fri, 24 May 2024 16:14:11 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y6jsc1v43-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 May 2024 16:14:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MS6aC7igPetE6iqyKVDXkoiHzdEjcpC9Cs5ErlHqvKcgyy4y+mjHJu4SfDtJ4xWEgSjgXxZjiX3gHuUDWV/N2rOT3fz53fj+TsWfbPQksHojN71Wv6YMyjTw5bOYSWvelPQ7r6LpXltZ48dwybdxSpgG3XPHzam09PkmJt136DAjSBya7QsKEdlhPj0kS9NHRh7ZLe0M9uAn38uN9X9pgsvOAyA39v3IwL0oJkAXoQpw7Al+BwHKzga5Ybn2mdb1WGlmsHXHu0zjYSLI6JM3Kl1eJKGia6Qlfe3lcgHlda771Bj350OHjEaZBBuqhVWIMIaYTSd5dl28YaNQj46OfQ== 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=2ulSJwlp1GFZL5zJwaMNqLMxnXFmsEKspc8LaC30Uw4=; b=HPqlRbEwkXxEtv2JHyw1yMjeam9CpD5GSASAod19KYKknG4vJ3o4V2G0gXmSrNg2WIwphQIIx7REzab32uE80ESI9CXBQDyJgX1tr5gVL2y82WXAWS69S08/Y98N8/H8C/xFZbXAGM6gNS76BPRWaP6TDeWzmoPwGv6rb9RH28qyoMpGhVVh3VaZ0C6Vq/5HIktZPcpi52mXVR7jwGcmyBngzHmHNmywyp3gyKqVhKm+VqjBt2ArGpKpuMfALcjVv1gAHbJuNuUHV+7TlnmDZg57WL3bWaKbhnERYWTUQgZUfEf0Q/TbgY7UCnbcDnF+sLlOhCXPEaW1DvJ1pmmVKA== 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=2ulSJwlp1GFZL5zJwaMNqLMxnXFmsEKspc8LaC30Uw4=; b=ebVMDZdJz1Sqp3jxl9VO1wgfhkNa1rfzQHliaY45pfLwr09NsHElLE85OpjC/JsJGbIXUh9UHye5XTClLjDARDnBH0lhK5z6XlrdW8f/LltpC2VlPNi8aGUwcXA/Cp7oj2jnvyPypSi5GPpFU6cbuC47D2s1hmxMdPYLHx3ueII= Received: from CY8PR10MB7243.namprd10.prod.outlook.com (2603:10b6:930:7c::10) by SJ0PR10MB6400.namprd10.prod.outlook.com (2603:10b6:a03:44c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.19; Fri, 24 May 2024 16:14:08 +0000 Received: from CY8PR10MB7243.namprd10.prod.outlook.com ([fe80::b779:d0be:9e3a:34f0]) by CY8PR10MB7243.namprd10.prod.outlook.com ([fe80::b779:d0be:9e3a:34f0%7]) with mapi id 15.20.7587.035; Fri, 24 May 2024 16:14:08 +0000 Message-ID: Date: Fri, 24 May 2024 11:14:07 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] libiscsi: disallow binding an already-bound connection To: Khazhismel Kumykov , Lee Duncan , Chris Leech Cc: "James E.J. Bottomley" , "Martin K. Petersen" , open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Khazhismel Kumykov References: <20240523222128.786137-1-khazhy@google.com> <20240523222128.786137-2-khazhy@google.com> Content-Language: en-US From: Mike Christie In-Reply-To: <20240523222128.786137-2-khazhy@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DS7PR03CA0216.namprd03.prod.outlook.com (2603:10b6:5:3ba::11) To CY8PR10MB7243.namprd10.prod.outlook.com (2603:10b6:930:7c::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR10MB7243:EE_|SJ0PR10MB6400:EE_ X-MS-Office365-Filtering-Correlation-Id: 14c4a04e-607a-4403-add6-08dc7c0c8a9d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?emJqZmpoOERmQXRyRW5uQzhBRE1zUVdLSlNHbkdlTFZtMUZWRU5SaFR3bDNU?= =?utf-8?B?b0JFZkVPWXNCK2Z1QnJmTG9sN1hjNkdUejdCVTUva3NrVThPdnlCRjJFMVh6?= =?utf-8?B?dWMxK1RreWlBenZIUzRjUHJvSTc5OENsWFlnS2VyVHJEdFh1U0xJbWV0M2xW?= =?utf-8?B?ampjOFZ3djNad3duYUd1S3M0OTFqNWR6YzU3T1VnU3VMNkQyYVRhcGVSazlo?= =?utf-8?B?ZzhLQXoySGppdXRSR2s5U1NZVC85RDZBazR0bms3MD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cit0SDJ3RmNJQ3YrTE44UzA1?= =?utf-8?B?VDE0WHVZNEVXUGdhbWc4L2RaMXd4ZnlkSkFoN1cwTmpjYWo2VjNOdiszUkxl?= =?utf-8?B?eDZZSmJxTG1jeVhYL05UVlArQVdSYmUwY1BTRHIvZ1VpcVFPeHhJRUJ3dUZD?= =?utf-8?B?RmlhcklaNWEzek9NYnpxSFFtT0tEQ1JDZWlqTTRscXVZajkzM1Y1cDZpdmJs?= =?utf-8?B?V25LZG1iMUdmaXBGVmFiYURRSm9HK25pUEh4a3hETDJoRXRvS3MzZDlaZjVr?= =?utf-8?B?ZFJjcDZvbGc0Ujgybk5SVkQrQkYyb29rS2ExY3ZlYkFHRWVlaUdWM3lsTHFQ?= =?utf-8?B?SlEwbzFFSENicHpWQUdKS3BkR1hueE42elY4RXZuSkdWUzdQZTJ3Q1ZDdmhp?= =?utf-8?B?dmprazBVN3ZkYVZySHRDRVVZelVsNWRuZUZtWU4vdndCYk5GaWRWRGlocnl1?= =?utf-8?B?Ly9KYWFDY0NhdnN4SEtiaC9Wak4zUHFiWWhxSDV4b2xxbVR3ZWNtMEgvT2Iz?= =?utf-8?B?T2Q2VUpoRHdWNjgzM3dYNkZiQ284SlJiSUN0bG80eDhlTDFGTTBSN1pRPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY8PR10MB7243.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?djczUEJRNE5XdE8yR3d5SE13TDk4ZWF3SVJHdkpsZUIzSEJ4bElWb0d2SVJI?= =?utf-8?B?QUJvZm1La3MyZWkrVEdqZ0JwNmNZZGhYN1RSZGhrYmJXSVcrMDQ1ZnRUd2hr?= =?utf-8?B?Mk1pLzlQVVlVN0c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f-8?B?aUpzS1Zzd1JTVDR6VnhibHY1SXBzQW1NUnErbDE4UERZdkl4NUI1WEJ1VkI2?= =?utf-8?B?NVpWYUliNVFpOFUrYmhZL0o5ZnZIUmpld2pyRjBjVzB3OG5uWGk4aUdXYm85?= =?utf-8?B?cS9udmw0NlVXZnpaMUorYVlvMmFTQnV3WGtQMndDemhIS0xmOUM4Ky9lcE43?= =?utf-8?B?S1NiV3U1ci9KZUdjQ3ZVWHBjNGwram8zbDlhODNPY0VXSFpDRWgwZFVyU1k2?= =?utf-8?B?Smc9PQ==?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: R0fZjTuiSw2TmwCAEa8p9wKdN3firqRZebdpGtRb4kVlc5FxGzoMkSdVCA76KQq9dH4YPif5qqpDXO2DbQOeDPlEOadPCZE6SGPwvkkQi/dq8NhAzJ23/tn1hadsLVtHr1V36mmW0o/649dFrcZ7LuUVyAljRhekMNCpls9AW12yElB3Tn+Lp33G2JUTHp7ZzqBRHAslGGIOxqb/CvyFg6mFeyxIsKet4FaPVwIbrnFsgxATSPPS/HOH4eYLdZF4RTv+YjkAV5itvlbhvgFwcxtgEsS4K6VKhGDaP8YsT50If1tD9eooGcBHwrWdhoVyEX5sqMXhVDuTEcPF1IEv6lOswmYjpx1peCorFI1hxywo41bAIzz6auLWzqPZpRluKclV0MQ0hHG0VY2N7kIZykieUdaX2Kc281kxjQyhoh5RLkeXpaRIdudl+AmE3fN4os4pRi9R/oCk+ktDOAMMC36/zye1nE3BWn2eli+GPnsSO0TOCjPOoSV7gdNH+AGUNHfNOxlFkwMKCJYLjop241OVWA+8otoRigBOM0fZUXkHEZnMHVLfnjOllfSQFuSGu13FwHzLDm1Qzd1TWr6PqnFKlvwuNF8b25lYMScxZqM= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14c4a04e-607a-4403-add6-08dc7c0c8a9d X-MS-Exchange-CrossTenant-AuthSource: CY8PR10MB7243.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2024 16:14:08.8133 (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: gP4y9riW2khLhwhDDAchiOjItcsv+xxAPDRsF03nRK54S0nsGnBwsrJW8pwLwCKci2dbytlzRGNty+WMUUjlTdk2SKSJo/JWz8nAH/jTaC4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6400 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-24_04,2024-05-24_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405240113 X-Proofpoint-GUID: ak9OaVYwnilBcICZdmdPa_hRxypRhQBq X-Proofpoint-ORIG-GUID: ak9OaVYwnilBcICZdmdPa_hRxypRhQBq On 5/23/24 5:21 PM, Khazhismel Kumykov wrote: > This fixes issue where misbehaving userspace initiator could bind the > same connection multiple times, which would leak the old connection > socket without cleaning it up. > > For iscsi_tcp, it calls iscsi_suspend_tx directly in stop_conn. Update > this to iscsi_conn_unbind, which matches the lifecycle of other drivers, > and clears the CONN_FLAG_BOUND. > > Suggested-by: Mike Christie > Signed-off-by: Khazhismel Kumykov > --- > drivers/scsi/iscsi_tcp.c | 2 +- > drivers/scsi/libiscsi.c | 6 ++++++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c > index deb9252e02e6..1d93404515ae 100644 > --- a/drivers/scsi/iscsi_tcp.c > +++ b/drivers/scsi/iscsi_tcp.c > @@ -696,7 +696,7 @@ static void iscsi_sw_tcp_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) > wake_up_interruptible(sk_sleep(sock->sk)); > > /* stop xmit side */ > - iscsi_suspend_tx(conn); > + iscsi_conn_unbind(cls_conn, true); > > /* stop recv side and release socket */ > iscsi_sw_tcp_release_conn(conn); > diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c > index 0fda8905eabd..0fb98eb53584 100644 > --- a/drivers/scsi/libiscsi.c > +++ b/drivers/scsi/libiscsi.c > @@ -3453,6 +3453,12 @@ int iscsi_conn_bind(struct iscsi_cls_session *cls_session, > struct iscsi_conn *conn = cls_conn->dd_data; > > spin_lock_bh(&session->frwd_lock); > + if (test_bit(ISCSI_CONN_FLAG_BOUND, &conn->flags)) { > + spin_unlock_bh(&session->frwd_lock); > + return -EBUSY; > + } > + If some of the driver's bind_conn callout fails then it could leave the ISCSI_CONN_FLAG_BOUND bit set, and this will fail on a retry. It's ok to call iscsi_conn_bind at the end of the bind_conn callout like how iscsi_tcp and cxgbi* do. So for iscsi_iser.c, be_iscsi.c, bnx2i_iscsi.c, and qedi_iscsi.c you need to move their iscsi_conn_bind to the end of their bind_conn callout. You could also keep the the existing flow but add unwind/goto error handling to those drivers, but I think just moving the iscsi_conn_bind call to the end of the function is easier and it syncs all the drivers behavior which is nice.