Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp817162ybl; Wed, 11 Dec 2019 07:58:56 -0800 (PST) X-Google-Smtp-Source: APXvYqxlp1ImxjHDBb9QyTR76R0OgmrfLE6O8b1UDEV4d4i/CgkmA9SwPdE0kn2VtzCwTzXsXlLY X-Received: by 2002:aca:3a41:: with SMTP id h62mr3426453oia.97.1576079936630; Wed, 11 Dec 2019 07:58:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576079936; cv=none; d=google.com; s=arc-20160816; b=xiJf1w30wTdvhC377TpanWniqcbvbHY4yu3L9UIfoVNdIUeK0LFFix58/bJ7gfDQLZ ApDOTS1XUbZM3aoDXi1Gt5dDAqbW36CARsehhL/+TKctcCIDV1vyMjbn+XyTCpnuQ3vo sZf/Z9U7e44QWOK9uyw9TgBZR2dl5mvr6Y5Ubbcs2zK3gIMGp/tBCTOqlTA3AeA7+GG8 p/CToGcJYPgEyYYtkgKrJToCZXshK6ci9838Ub44tOBD/VpMdHKwLLauemM0vMomG6fv XT+jZ8hvpj35zthMpWtQf+24RIQCWtld+Rowysk0J6pDXwNXLpdMBLz/01CtGz2Cqo7g m1/w== 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=tIDPYCFgtwVVHRwiwbj1tC6wlHiUsslsIpJcF2oGW3U=; b=VA9WyiaDZKn3iqXST0O17CptTS6m1lliO2Z7D5RDRNbUzVljjeNmZBO5qDIwZ7eMuF uJIkgO7FmiVrrFHTaag10S5y6TGD2x5cDnFaHK3sSlJ5y2x9a4VQLm0FA1CBanTWiD8c crc7KpfXs7FbLE7VTLisI7K7cO9RHSw9bPYZ9Ajm4C9GGOZ+M25nP4W05bZCGuWtrOXA daf0Mkb18TNsdDBldDA+FWDOhVE8qVK1+OWr3rEEdl6NAor3EXyUWVG0jVs8xzhzG1wl F1adQd824OfVOwrglJ0ntsS4oixrfgTnVlS3KGfD3viI/2QJEDXyIuZSXoABJYAMCuEP 2QeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hbgHV+sX; 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 k8si1507470otf.76.2019.12.11.07.58.44; Wed, 11 Dec 2019 07:58:56 -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=hbgHV+sX; 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 S1730074AbfLKP5q (ORCPT + 99 others); Wed, 11 Dec 2019 10:57:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:40694 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731690AbfLKPO6 (ORCPT ); Wed, 11 Dec 2019 10:14:58 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 7242220663; Wed, 11 Dec 2019 15:14:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077297; bh=EhvTr/MTOlFXNS/W68gn6gejFmcu49STTLixKu3GOpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hbgHV+sXo2m53rHUdQ9zpJdYPMOctTFB1BaxCDDV7pfNwEaASAfcY+gXCvCqcSsud Z1+mnmnHyy/xb6bpLhieQJlsHjC4drCh9cDu0zQfjWMvjUcM8rlVqg0WvT9RspOs/q lBBA/nIuNljKFF+l7tVlj/DjR9hX8sk5t3Wa/Dig= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jens Axboe Subject: [PATCH 5.3 044/105] io_uring: transform send/recvmsg() -ERESTARTSYS to -EINTR Date: Wed, 11 Dec 2019 16:05:33 +0100 Message-Id: <20191211150238.516607407@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150221.153659747@linuxfoundation.org> References: <20191211150221.153659747@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Jens Axboe commit 441cdbd5449b4923cd413d3ba748124f91388be9 upstream. We should never return -ERESTARTSYS to userspace, transform it into -EINTR. Cc: stable@vger.kernel.org # v5.3+ Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- fs/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1535,6 +1535,8 @@ static int io_send_recvmsg(struct io_kio ret = fn(sock, msg, flags); if (force_nonblock && ret == -EAGAIN) return ret; + if (ret == -ERESTARTSYS) + ret = -EINTR; } io_cqring_add_event(req->ctx, sqe->user_data, ret);