Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3316154ybz; Mon, 27 Apr 2020 13:52:12 -0700 (PDT) X-Google-Smtp-Source: APiQypIgqqCkw9H5+6rb4gwPaVSKzCVL2jlCqDq7ER9oXhFagz9m/Iu4kB8hFe7ogr4VupaTIYV3 X-Received: by 2002:a05:6402:1bc8:: with SMTP id ch8mr19643754edb.53.1588020732384; Mon, 27 Apr 2020 13:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588020732; cv=none; d=google.com; s=arc-20160816; b=A2k/LRbFXp5BQAhi3wYivgl2V+US/rEl/1IqglqXlSFzF7HSUd6GXyH6SnExj7mccL 4c+fYU35rIChXWnStvvgTeSe9fagsOcwA7UejGITd/hE/eUcXRA0OgLalddW11lsvbx2 7ncXVpLqOp+RzkYzSKuJ2uZgiUAL+5vW105imVpmltDMmsyKrltDiZtfP07lwY+Z/WjW IhmqxA7mIv8BsSUdQrdHzYdbubEqy0UUJOveWjynOk08Nsw8lCyXq5c2zHBhydkINdLS D5sUUIwpS6kJhVVn78NTUM8m5NPMMDit6JF+VA5bkFc9ZB0R9RbJ4owXgkbHrajlIkAP PAjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=nyWdhMzVNiBrK2bJ52ovDXl5RsAURc8Exw6vBw8X8UE=; b=R1kvXtzgJdf4g7dde0x3dFxw21rrG61dnvLPAu63UmXKAO4WIrBrKtuSkPLE0BoGav dQGel2IpZI8lDLWgGobTYWI0lFREBFq0VsYN/rL8hB6dHmWFEnp8wkoYaeMP7/FDk4du gySXfYdplQNaYemA/6Q4Hf9aA+44ypqMpB1RMEYfEJYe4qGnVRdAaQPioC4wuaXG13Vi xETXO9uctVVijJE9GymtbZ0e0I7rS4axbHKTw0X4FkIttobO0f2ZLWo6FtdSCCwXwC0S k5/jIs3qBoi8OHe4Z6YIMLFJXqe1gKrQcJ8fnzOtl5/FQ+KbKy6xm5BhgNh3iaCNNdGd Z/CQ== 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 z6si426343edp.440.2020.04.27.13.51.47; Mon, 27 Apr 2020 13:52:12 -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 S1726548AbgD0UuR (ORCPT + 99 others); Mon, 27 Apr 2020 16:50:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726233AbgD0UuQ (ORCPT ); Mon, 27 Apr 2020 16:50:16 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96E09C0610D5; Mon, 27 Apr 2020 13:50:16 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTAhN-00D2oe-Sy; Mon, 27 Apr 2020 20:49:54 +0000 Date: Mon, 27 Apr 2020 21:49:53 +0100 From: Al Viro To: Christoph Hellwig Cc: Andrew Morton , Linus Torvalds , Jeremy Kerr , Arnd Bergmann , "Eric W . Biederman" , linuxppc-dev@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] powerpc/spufs: simplify spufs core dumping Message-ID: <20200427204953.GY23230@ZenIV.linux.org.uk> References: <20200427200626.1622060-1-hch@lst.de> <20200427200626.1622060-2-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200427200626.1622060-2-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 27, 2020 at 10:06:21PM +0200, Christoph Hellwig wrote: > @@ -1988,7 +1984,12 @@ static ssize_t spufs_mbox_info_read(struct file *file, char __user *buf, > if (ret) > return ret; > spin_lock(&ctx->csa.register_lock); > - ret = __spufs_mbox_info_read(ctx, buf, len, pos); > + /* EOF if there's no entry in the mbox */ > + if (ctx->csa.prob.mb_stat_R & 0x0000ff) { > + ret = simple_read_from_buffer(buf, len, pos, > + &ctx->csa.prob.pu_mb_R, > + sizeof(ctx->csa.prob.pu_mb_R)); > + } > spin_unlock(&ctx->csa.register_lock); > spu_release_saved(ctx); Again, this really needs fixing. Preferably - as a separate commit preceding this series, so that it could be backported. simple_read_from_buffer() is a blocking operation. Yes, I understand that mainline has the same bug; it really does need to be fixed and having to backport this series is not a good idea, for obvious reasons.