Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3515650pxf; Mon, 15 Mar 2021 11:15:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq9SVTevz9eeYBbrsX608dv1/+MOCiVc+aRTJvMQYbKzBp3fCv6J3GwFdYSZU1LlErf3f4 X-Received: by 2002:a17:906:22d2:: with SMTP id q18mr25169369eja.437.1615832134498; Mon, 15 Mar 2021 11:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832134; cv=none; d=google.com; s=arc-20160816; b=0U9lLzDdbN+/pTrG661VBhjPESw8E8ZgjZg3mYxPnhDipZVnlCnfdIom8O46XDvBYy 9EPXPBW9ccr+DAzXgfgZTeSAYB0TTkoOm0+m7uKqVSvcnhTWjEmYvCjaEzDeoSsPt7s8 2AcbykVNUSmly+BG+rRj/XqxXRje7VhBkH6iFORWU/S+4rDLS2aNOfUFMcMfK4/0eqLd 12YX6cu0KGBl+K9WrK5PkY+Dv3Kgx2g/5hwLHnFfXyQ2m3qH5L5dlBVoN47AaLNIRZXt qAUOV1L2WCI/YooJbP1tQIfvtVwDK9X+iLZ6vjTpG+nkr+WBorkUtMg2vuTZphtQb0Ai KUyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1srdnmk2dur47UT3xK4FjiePY0CtmK/eqtoDiLRnOUA=; b=wyfaVfSz45fomGIfp3YuXCcDwQjb4l9/+JYqp8F0lC43lbHY25o5WfSpJzxFmxDDZR r6AgHWTNOMa1zp1CMSMFikKGe26JM43pfOqHUROQDt5Ws3OiBD7jJk/qLElfJPPQAy6h lrqaW1ZdoBAT/KmuHgeH8YogOPFq2anPVnXfDLlXISm44bt2CgBqRc8BwrpswlbLm3oi XERGYClYLskocexcvOqx4JHD4ZB5s1hnkEbVHqyXuEWM1yy2vs0Mf26AySHleNWR2sRt f/zJ+/owczUYyS2+ITS5LovXYVNvXpNsO7sPV1QRgg9gOlwJgqs5nS0ujeaRyr/uv2FE bf7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H29GaNgs; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr7si11306184ejc.126.2021.03.15.11.15.12; Mon, 15 Mar 2021 11:15:34 -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=@linuxfoundation.org header.s=korg header.b=H29GaNgs; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236660AbhCOOOT (ORCPT + 99 others); Mon, 15 Mar 2021 10:14:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:37820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232603AbhCON7F (ORCPT ); Mon, 15 Mar 2021 09:59:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D70A364DAD; Mon, 15 Mar 2021 13:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816736; bh=hD1F8VjWGCUZ++i9TL2oRH1ZOXXmngzERZal1ulIcoU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H29GaNgsWm0cS8qWnmyJyY3m3BGTmSD3lLRqYQ5szwYg7P+7lMDCWTAuGtOPF8b0H B3myglPQe3IjIsUQnJHIIv+9EzNhymupsNPc924ADJC4FVsp6OO/Ze+NwceT6uw4sR R2/gQMnD6gLWrbbLJNWC1Cz8OftxYWcQpgxxxFIs= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Farman , Heiko Carstens Subject: [PATCH 4.19 036/120] s390/cio: return -EFAULT if copy_to_user() fails Date: Mon, 15 Mar 2021 14:56:27 +0100 Message-Id: <20210315135721.177953936@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Eric Farman commit d9c48a948d29bcb22f4fe61a81b718ef6de561a0 upstream. Fixes: 120e214e504f ("vfio: ccw: realize VFIO_DEVICE_G(S)ET_IRQ_INFO ioctls") Signed-off-by: Eric Farman Signed-off-by: Heiko Carstens Signed-off-by: Greg Kroah-Hartman --- drivers/s390/cio/vfio_ccw_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/s390/cio/vfio_ccw_ops.c +++ b/drivers/s390/cio/vfio_ccw_ops.c @@ -383,7 +383,7 @@ static ssize_t vfio_ccw_mdev_ioctl(struc if (info.count == -1) return -EINVAL; - return copy_to_user((void __user *)arg, &info, minsz); + return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; } case VFIO_DEVICE_SET_IRQS: {