Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4378963ybz; Tue, 28 Apr 2020 10:15:57 -0700 (PDT) X-Google-Smtp-Source: APiQypKrBeMvXEzu9R70hLr3xyUO4fmoEoalPUWpQjTGOrDZwFzRCKfFmiKVzfnhHr9RgKOPX5Nj X-Received: by 2002:aa7:c3c2:: with SMTP id l2mr23753259edr.362.1588094157669; Tue, 28 Apr 2020 10:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588094157; cv=none; d=google.com; s=arc-20160816; b=pur2ItzJL6B6oWGoa8oZ3nWl6C4OoW9AEj1PA6EPL0qsvMPuSPp1S0EYIrT23tcFMN QllkIdFf8QsjrGEs0K5YH90giKTbGdRXNi4PqlsyI0iPeVZHEfLtagSxgPPckfwGFltH q5Rqj2Mxw+l8IKBlkdKgjaGRTxFvGSvWmeOZw+5aSzdAcMZbstj9eiOU/wXOWmh/SLWH lGlmEZvNxa9iEO/FvTtjKRcxx/C4u5KcLYZ+KQPNamq78NgOpv6eGqeK3i8q0Vgm7v3W fgrCsxgAo9bSBmgbjSEkwpDotLlIOvRWCxMHENjuDEwU8i0j9bf8ahXFj40N9dFeIu0m p3pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4Z/Sc3vus1TLs84GOWxFpoxbepa42dKXJ1qE7ZRJoV0=; b=OZDhPN+EMYV3HlmN0/RZiSZopk0ZfXczvHq6xyBgKswQJ2N+zww6zR2vBAgkz/bt2X vrfmaQMpFN0sVY7Qm/bKQVumHXa6BQ6corZewH0oQ2FtrmIYK9pp2hNUh72/Jvh3/HlJ ehz4uq5pDNZqaIytsVAyg5QSVQLp2+pQUZTektMIwO92izEPFy14Q29QoDAi0xoMqW0N KfBL1RnkA9xYp0i7vv5hTEgPqHdma/CBaylncruuBx+A483lDDrOM7hPPEyQ5b5xWWfI VglZnbo3FFYnX3BjvVyq+S5WIn8fKJirH4zXgXecpjO8py7noXypSuJ9gTr/ktmtBKJG O4+Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si2334859ejp.397.2020.04.28.10.15.34; Tue, 28 Apr 2020 10:15:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728476AbgD1RLh (ORCPT + 99 others); Tue, 28 Apr 2020 13:11:37 -0400 Received: from verein.lst.de ([213.95.11.211]:57512 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726406AbgD1RLh (ORCPT ); Tue, 28 Apr 2020 13:11:37 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 3B91C68CF0; Tue, 28 Apr 2020 19:11:34 +0200 (CEST) Date: Tue, 28 Apr 2020 19:11:33 +0200 From: Christoph Hellwig To: Jeremy Kerr Cc: Linus Torvalds , Arnd Bergmann , "Eric W . Biederman" , Andrew Morton , Alexander Viro , Christoph Hellwig , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] powerpc/spufs: fix copy_to_user while atomic Message-ID: <20200428171133.GA17445@lst.de> References: <20200427200626.1622060-2-hch@lst.de> <20200428120207.15728-1-jk@ozlabs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200428120207.15728-1-jk@ozlabs.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org FYI, these little hunks reduce the difference to my version, maybe you can fold them in? diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index c62d77ddaf7d3..1861436a6091d 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c @@ -2107,7 +2107,6 @@ static const struct file_operations spufs_wbox_info_fops = { static void ___spufs_dma_info_read(struct spu_context *ctx, struct spu_dma_info *info) { - struct mfc_cq_sr *qp, *spuqp; int i; info->dma_info_type = ctx->csa.priv2.spu_tag_status_query_RW; @@ -2116,8 +2115,8 @@ static void ___spufs_dma_info_read(struct spu_context *ctx, info->dma_info_stall_and_notify = ctx->csa.spu_chnldata_RW[25]; info->dma_info_atomic_command_status = ctx->csa.spu_chnldata_RW[27]; for (i = 0; i < 16; i++) { - qp = &info->dma_info_command_data[i]; - spuqp = &ctx->csa.priv2.spuq[i]; + struct mfc_cq_sr *qp = &info->dma_info_command_data[i]; + struct mfc_cq_sr *qp, *spuqp = &ctx->csa.priv2.spuq[i]; qp->mfc_cq_data0_RW = spuqp->mfc_cq_data0_RW; qp->mfc_cq_data1_RW = spuqp->mfc_cq_data1_RW; @@ -2166,7 +2165,7 @@ static const struct file_operations spufs_dma_info_fops = { }; static void ___spufs_proxydma_info_read(struct spu_context *ctx, - struct spu_proxydma_info *info) + struct spu_proxydma_info *info) { int i;