Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752531AbdGRWqB (ORCPT ); Tue, 18 Jul 2017 18:46:01 -0400 Received: from mail-bn3nam01on0132.outbound.protection.outlook.com ([104.47.33.132]:15584 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751963AbdGRWp7 (ORCPT ); Tue, 18 Jul 2017 18:45:59 -0400 From: Pavel Shilovskiy To: Ben Hutchings , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: "akpm@linux-foundation.org" , Jonathan Liu , Sachin Prabhu , Steve French Subject: RE: [PATCH 3.16 155/178] cifs: Do not send echoes before Negotiate is complete Thread-Topic: [PATCH 3.16 155/178] cifs: Do not send echoes before Negotiate is complete Thread-Index: AQHS/j5cYtJ+Mfl7fUWO4bHRVIlKdKJaMIeg Date: Tue, 18 Jul 2017 22:45:56 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=pshilov@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-07-18T15:45:54.9643732-07:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General authentication-results: decadent.org.uk; dkim=none (message not signed) header.d=none;decadent.org.uk; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2001:4898:80e8:8::4d0] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR21MB0168;7:2JFyOgp3rv2w7aMpkTn/e6d41Po/MNTkMlYb6zagKLQPKkgW2qZ7kuSuCn6Ad95/a8GHOP6zKvUXV6T6xDFPQsC4ETUDyXh572HPbcOzDaelY0zfQ6rUH8PAZw3/KGgQe8g83fzWOZvLfdHAnSH3Izd9RcT6oxPuxEyxrn+G42jACn2kc0e+5E6XYMZ5tybita4UnvUX3Av8aKv3DH3t6AOTIIyEKR4OvScc8mcl8Cjs7ZqUnVYn//ttsJkxBzxcpzqnIOeebAye0R/hglC1LLzTc770P+/3lUbmcdIjpaU1b+oRjB40slHkcrt9t0FMt988sZEy9/4aJq8UH3nBSNIAEUwz0VXE5fbWZVf697Nj79f9o7Qpdk30e7VQM6ZKuue1qTszh8EwVNagTvY0KTfqi90z9if0O1eUdI2RYPrUjV2IyVvGQGgTlHfhjiwJCartkBvRq96zohDCs5Zxtz4n5svq/nT3mfo6qRdoSO9rKCIhsUNNsynojuV4XA99qlaT3rQcVTm4gcCkBTol9J1qhe6aKKjJ1qBTJ1t9vchPyVTVcRwNFXOhm3shDLlKcWlJFvB8a3nVzaGWshosXXrydsJ+qccDHDePi3tkzMaZnYmxp666H6k8gP94/uqN1hVM/6iavsiIMCoSf3JjYMEpACXR5wZqjvJRByAB+2Gf3e2xYoT7SYQnv9BiCJuei/9h7Uo8fI76XeagKFZZehFYOFQR5Z0AeBNduzI4Zyt3rtFSXLYr3/VINM7Mkq/X78RPeVqX39bKXo4ybRYl7Gp0EAYo/JQo0Yk8UJB2E58JV8oQsCpGc/2j/u0TeJZE x-ms-office365-filtering-correlation-id: 45f54ef7-2a2f-4be0-7521-08d4ce2ec13f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(48565401081)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR21MB0168; x-ms-traffictypediagnostic: CY4PR21MB0168: x-exchange-antispam-report-test: UriScan:(133145235818549)(236129657087228); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(601004)(2401047)(8121501046)(5005006)(2017060910075)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR21MB0168;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR21MB0168; x-forefront-prvs: 037291602B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(39840400002)(39450400003)(39850400002)(39400400002)(39410400002)(5005710100001)(54906002)(305945005)(25786009)(8676002)(229853002)(54356999)(50986999)(76176999)(39060400002)(9686003)(7736002)(8936002)(189998001)(2950100002)(74316002)(55016002)(8990500004)(2906002)(2501003)(10090500001)(53936002)(99286003)(33656002)(6246003)(6506006)(6436002)(4326008)(38730400002)(81166006)(5660300001)(6116002)(575784001)(7696004)(77096006)(3660700001)(86362001)(10290500003)(102836003)(86612001)(2900100001)(3280700002)(2201001)(478600001)(14454004);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0168;H:CY4PR21MB0135.namprd21.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jul 2017 22:45:57.0186 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0168 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v6IMk4KQ005265 Content-Length: 1729 Lines: 33 2017-07-16 6:57 Ben Hutchings : > > 3.16.46-rc1 review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Sachin Prabhu > > commit 62a6cfddcc0a5313e7da3e8311ba16226fe0ac10 upstream. > > commit 4fcd1813e640 ("Fix reconnect to not defer smb3 session reconnect long after socket reconnect") added support for Negotiate requests to be initiated by echo calls. > > To avoid delays in calling echo after a reconnect, I added the patch introduced by the commit b8c600120fc8 ("Call echo service immediately after socket reconnect"). > > This has however caused a regression with cifs shares which do not have support for echo calls to trigger Negotiate requests. On connections which need to call Negotiation, the echo calls trigger an error which triggers a reconnect which in turn triggers another echo call. This results in a loop which is only broken when an operation is performed on the cifs share. For an idle share, it can DOS a server. > > The patch uses the smb_operation can_echo() for cifs so that it is called only if connection has been already been setup. > > kernel bz: 194531 > > Signed-off-by: Sachin Prabhu > Tested-by: Jonathan Liu > Acked-by: Pavel Shilovsky > Signed-off-by: Steve French > Signed-off-by: Ben Hutchings > --- > fs/cifs/smb1ops.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) I have just posted a backport of commit b8c600120fc8 ("Call echo service immediately after socket reconnect") for v3.16.x kernel to the stable mailing list. Please consider merging it too. Best regards, Pavel Shilovsky