Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3518186pxf; Mon, 15 Mar 2021 11:19:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmKuD7CgJwfr7xqdlkbjgwuFMjZr4q+xxQHweoNlbSceXAzPFhdEuOhwHmqmxfXnIrakbY X-Received: by 2002:a17:906:5902:: with SMTP id h2mr25002262ejq.416.1615832367857; Mon, 15 Mar 2021 11:19:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832367; cv=none; d=google.com; s=arc-20160816; b=Btk1xgWP6BGbMZpL0xco8BEOVRYcOETSm6QYWUiAT5xw4Wodmf2zdqyB8+kKp2+4Rd ga5L5CXmVJM0tFQIos6lhfMNiwafPSAJs5SquOEGX3tEirv0UD4slIOKQ4gnRsaWa8cx 6TmaSrXb7Q8Ol04YqBzPFtXDapb8TxcbbVzICi1n5AzuiUIVWFDwjab4m3HHT026vTMK PDIjVauRO9rfTgk7DoMf1NCYyzjLH/b5URB98Z+az77VkSm94EtBzl4HIYCc0SvyIYJy Owk6UQjyd17AolGlbNijRBXnIG+GxZfUN//GTeC2o/ai5sOShlm7IaMg4r1ZOPrQY9tF LPhA== 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=o8c9uopLGTIKBNiJHvKgCP1aNN4eWeSRaDL/E4psevk=; b=cl+OvAnFUHtJhWP16ib6uyAzFu4ILzSDp/9kQko3z9+/fToa1IrxQTXyHDyZu44Dnl hs46SjNHn8YOMVqWLXq1V00zfuA4nH3epB+YnnzgcT7goDjX12MTFYTAptLGSH+R5N2G Hsg1H2lmfhxSzHb4J0dePjrYsADMUk+YLPFFVcqjVOEiBlcxMwV/ijjZKhh0CKUCZ0ti Ivo3kkSo1hGX0lliV8bTeQkG/ORvzGUv+8HZL2AJsJIae62w13fNNpK8H6KyBqCJnQYo YXFArP1NgU1xlvGab0b15ghbektcIZIWZhm5qP7sHAwhnYPOZbFqH3dapO60iQRs5mnB 8zJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=R1APIE74; 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 bf1si12347471edb.359.2021.03.15.11.19.06; Mon, 15 Mar 2021 11:19:27 -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=R1APIE74; 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 S237461AbhCOORy (ORCPT + 99 others); Mon, 15 Mar 2021 10:17:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:36594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232739AbhCON7h (ORCPT ); Mon, 15 Mar 2021 09:59:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 47D6D64EE9; Mon, 15 Mar 2021 13:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816760; bh=xVDg8VjN42L2Ig5tSO0pvjt4DrZnFJa1TMsmotPfxJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R1APIE74G0G965bzThHvRPHIaUGYQS6bvNs7DYkOZYzA0lqliodD6xtxC5VGI4/o1 EvhQvu2V4NGKMgll3zhtaZM69OASc6PRsGtJ9PbAIyjrk4s+gyYrJkVaC1iMqBTOkW kK6rkatVoDkFgWrpwaESBgkWl8vLGMwroQOSYUno= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Farman , Heiko Carstens Subject: [PATCH 5.10 098/290] s390/cio: return -EFAULT if copy_to_user() fails Date: Mon, 15 Mar 2021 14:53:11 +0100 Message-Id: <20210315135545.236925038@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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 @@ -578,7 +578,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: {