[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200427204953.GY23230@ZenIV.linux.org.uk>
Date: Mon, 27 Apr 2020 21:49:53 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Christoph Hellwig <hch@....de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jeremy Kerr <jk@...abs.org>, Arnd Bergmann <arnd@...db.de>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
linuxppc-dev@...ts.ozlabs.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] powerpc/spufs: simplify spufs core dumping
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.
Powered by blists - more mailing lists