Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5243516imu; Tue, 15 Jan 2019 13:57:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN4yb+0PbbST+6rUEiJMlCY54HQ400b9f6bWf8KjOz8/DolI2uRj9eIMFhyQ/vXu5g7nrje9 X-Received: by 2002:a17:902:2a0a:: with SMTP id i10mr6203308plb.323.1547589453264; Tue, 15 Jan 2019 13:57:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547589453; cv=none; d=google.com; s=arc-20160816; b=YB5QjNuXtHKf4wjogxTfDYpnjob6m5BSZHo1jiNF8rFEEpK0qiGbJFP4x6dYicR1Qd Ig/Zl2PK/2CCa+YC/B45VuQHVqwEbLxKukh4QdAm5/e+ZIught0yldzh2I6/TngVXjnb FwuHwL3EplyBd2aQALO/9/Tk9UhBILO9skzGFah9GLgCXVXcC7G8pyXxK8cvvMkrWG8w EjClWY03duQYmaguZEZpeAwpPfQOQzvjlxycp2M6HfICOhk1nzES3DWlVPOBlgc2Hm0/ i37nMbRP2/b0gvB1YHAnM+DdC1BNhM5graV566Pc/gMGfh9eIrnn1q1B2O38cIWd0fVd 5Wgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JYiY8s5gCzJVB/7SpRvEGD5WUvae8iHlFCUc0OPPiZs=; b=fEOOFTU75ZRBy5i826ngSHZSpwEWAdttUL78togdJc5RJZ0v67FJcdbPd2wo7sXfhj Rm9B5BbXQGzTwtT2OXjHN3iYDbmUe2uG0EortmELwBRCftWlRigJ4++bMSRDLZhxsEub KBjNSnLigfWcS9CfbdFxX6YwYMNp4JtoH8aC28231i17so9owbah4RFIAYbvc7hnIzpX EXFneiFJO0dINEq0qOvn8pGcu/pTv4rYeCeupImepuDux5rrNfup+4+B+M1rUryoskLe 9kg75L16Yl0TOHXppeOloo5PDIED/eVob02c1qPXCE7u8qO2gz2OhE+GTTyuYDXSDeef Sr0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s8Ut6+fn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si4106279pgc.381.2019.01.15.13.57.17; Tue, 15 Jan 2019 13:57:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s8Ut6+fn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387416AbfAOQny (ORCPT + 99 others); Tue, 15 Jan 2019 11:43:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:33348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730622AbfAOQnt (ORCPT ); Tue, 15 Jan 2019 11:43:49 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6DDFA2054F; Tue, 15 Jan 2019 16:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547570628; bh=TXt5aRQFcwk8UTxrXsxEanTc0VKoP6pSVN6fKOX3hRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s8Ut6+fn3xXBrpcs2hS2Gf0YBKUBaYxC8sQSzb6PsHUwfM/Iuk4Oo3LBWCpwHkeTu +TkxSJnZhq79FiGQ7qQw4M3z4KqZ520trpY76Mh8AlAq+ZWwjhGQXZktDSKlzFJvR0 ZBOXGgRaeqgTptrFeA55P4L1LjdN7pFCYxB6288c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Shilovsky , Jeff Layton , Steve French Subject: [PATCH 4.20 14/57] CIFS: Do not hide EINTR after sending network packets Date: Tue, 15 Jan 2019 17:35:55 +0100 Message-Id: <20190115154911.514830122@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190115154910.734892368@linuxfoundation.org> References: <20190115154910.734892368@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pavel Shilovsky commit ee13919c2e8d1f904e035ad4b4239029a8994131 upstream. Currently we hide EINTR code returned from sock_sendmsg() and return 0 instead. This makes a caller think that we successfully completed the network operation which is not true. Fix this by properly returning EINTR to callers. Cc: Signed-off-by: Pavel Shilovsky Reviewed-by: Jeff Layton Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -385,7 +385,7 @@ smbd_done: if (rc < 0 && rc != -EINTR) cifs_dbg(VFS, "Error %d sending data on socket to server\n", rc); - else + else if (rc > 0) rc = 0; return rc;