Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3512713pxf; Mon, 15 Mar 2021 11:11:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNkGHNQPRa8IVHJtExonAAI+sk1am8J5ij7LgO0k+MCjLYZtLOguQ8tYymEg876uUQ6bC7 X-Received: by 2002:a17:907:7651:: with SMTP id kj17mr25353102ejc.127.1615831889644; Mon, 15 Mar 2021 11:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831889; cv=none; d=google.com; s=arc-20160816; b=RYEqR3Af02ooRtOntaem455m1LvREfPjXvgUntjijU9vHdHE6YwN4hDJqTkjeGsZJV R0h3brO4kMS5O3Acn2NA3AcoeH6HVRo51MVmpehbc8EiskfRM72smtSxV6AddzQ7HbLy JBPkTLd/KkNO0ZfAdorv1DIA3yHLC8sr6xc08aFhTAnaW23lBpYTr7KjC4GGUGnmKbMp PAEM/yj8JiUStPzgnQgnKlFzghhzuiaGG+TSTxYia93Fc16ffPhdRrNrAITZaOM1cLLU 6eC2Zgoi9NbZalHBAO8ART6FSXb/HAcIHLNhXeGTwGUWblrrKoZl3XQPvo3u+o6zew3G 9K/A== 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=NkBaOctFDo+Oek0VwPApaYNHCl2X8LlN1+6UaCjUQmI=; b=D7SAdLs9XFD3nT73lZJWMBO2vAVxRMPL6G7glos2mIITpJ55U9nwsvqe6cP7xIgQie EU2aSnSutSiD8wPAOLrFIpoR1q5XlxxqHZjLV5vGV1NnO47GvR1ZIKHRB5805PSIPXfX Zb8IjCrK3mGO1p0oSJttvF/3itDybXwttvwj0cfISP2KFixjngMLxQQR+U5/iVzd4KKE Rs3VH4J1w7Dbe+8gUWeXDGQi9hh2VuRvbjVVH5tm2yHXTIgiyIq445oz+FPjFREVFTB/ imaUU6dOI92ZwVeGDHup3n6nLKRoA4gxIlunEuH7m3ycXQ8Pf8tIxK5qieOZ8CuWG+Fh rpHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N9fo1wyc; 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 gx21si11639077ejc.503.2021.03.15.11.10.59; Mon, 15 Mar 2021 11:11:29 -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=N9fo1wyc; 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 S231593AbhCOOLT (ORCPT + 99 others); Mon, 15 Mar 2021 10:11:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:36788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232194AbhCON6O (ORCPT ); Mon, 15 Mar 2021 09:58:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E713264EF9; Mon, 15 Mar 2021 13:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816694; bh=g4FWKpiTGJ5DqyXsHNZ88LoSMSKXTrMgw7oNdrsNPvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N9fo1wyc29JGD6+zjXiow73WM7rsPoYCaX690/LcY4JXnYRRFXVuxcD9VyDWP+eBP Jg83pP5JMf43GTGxXErVJRWsBLvrrYw8NEhfUPjWPAT/DapwSkToFhtEWhNyhm+vq0 FM4CV8ekcg+cC5wXtvdXLsYtwfFHRYPDx8EVW9Sk= 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.4 051/168] s390/cio: return -EFAULT if copy_to_user() fails Date: Mon, 15 Mar 2021 14:54:43 +0100 Message-Id: <20210315135552.035113627@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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 @@ -545,7 +545,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: {