Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3518756pxf; Mon, 15 Mar 2021 11:20:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW/Z/facc66LBcrV+U5KGgzt0blKvf1k9TKyUKYxZrvRqhutCfeGfJAJGNBlLkfuz1Uhg6 X-Received: by 2002:a17:907:3f96:: with SMTP id hr22mr18499131ejc.427.1615832426686; Mon, 15 Mar 2021 11:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832426; cv=none; d=google.com; s=arc-20160816; b=OWS8j7xmQon6svITBJRVVjtfISgWX0z775ANcrbAF5UojFedxmUdTS3zJEsPprpdok 4o1HR8B+1PrOrMBYc+2bJl0+jCddY7gHlax9JIG10xucUI5aQljqJjuCoXBVaw1WUOm1 8WP/AOnXKVQvFJpQEPBe5gD7utdHwx/hzZ1ImePl+zAwOQpqJOKokO61B9wj7c57TVAU b692VMnjUcsjnmfxNsdeW03aJxUeNPdubeH6GzSnQmdJJd8ujZxektGEJ6ccPDtBDFxF fy6ByWMPGbaEtQceISwco1QX885A+JXVYykBy1yPwIW1K4c0ClZ5dAqfS1nMU7WOgVPp NZjA== 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=SEBcK/vHTb3xWKUUWxXyKWj60oMuvdSchndVfspTR5M=; b=EGSeq8blkF1pVOiDvbrgFHGbvqh0/ZqG0ZJO1XsOCRieiRBTIh64o+HVjXKbmHzC6Q k4JnNS7HNeYZtKg+jGfXKWDGdYxz+9MkbXdZCGTbxDMuVlWCT3uLIFB7RpJieFlzYnSi Al2Gsiny6YWyUXbGZlQef3ZJL1zKf17kQurfekWtB7zAzqG4okdVLZflDvpKVPSynwGs rpwVDp2s8qDxS7NEJJTOykCdqlKPu30+pBwAq/xdgdPIC+M2Ngkgtdtf+Oi8aaeBUdHW fL9JZUWGN9oF/XnyirLIJSWlv4800qDFnuJ8XIfrRtMNmQ1RbdEmCAPFKKeP+CrHnncL Ww5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CT+Sncje; 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 ho7si10969910ejc.686.2021.03.15.11.20.04; Mon, 15 Mar 2021 11:20:26 -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=CT+Sncje; 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 S237583AbhCOOSu (ORCPT + 99 others); Mon, 15 Mar 2021 10:18:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:35186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhCON7o (ORCPT ); Mon, 15 Mar 2021 09:59:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A194064F89; Mon, 15 Mar 2021 13:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816766; bh=kY7wvwDY27JgY2WpONw5dHySYUelk1Go1Y73wFurTWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CT+Sncje2/Dz6Rh9KBYrVCBqL9Aj6dSvUp3TqOybLPXjkqflVC4xFYTPpszY8smxc ZypUPt1gVZ8kWsLyYTJ8jt6kwv0IVEDQ8w/awKgsAnb3+iTIMMsLyidW6shZ5L4TJG RXPGFEfHg8AiBrPl+96N2dprieMUomgw8WzyRh0o= 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.11 112/306] s390/cio: return -EFAULT if copy_to_user() fails Date: Mon, 15 Mar 2021 14:52:55 +0100 Message-Id: <20210315135511.429976894@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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 @@ -582,7 +582,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: {