[Cbe-oss-dev] [PATCH] spufs: Don't copy unintialised data during mbox_info reads

Arnd Bergmann arnd at arndb.de
Fri Jul 6 20:50:01 EST 2007


On Friday 06 July 2007, Jeremy Kerr wrote:
> 
> For the spufs {m,w,i}box_info files, we only set the data buffer under
> certain conditions, but we unconditionally copy it to userspace.
> 
> This change always initialises the buffer to 0 before doing the
> simple_read_from_buffer().

I think the fix should not be to return zeroes, because that
is not the actual content of the mailbox, but rather to 
not read any data at all if there is none.

Note that for wbox we already do it correctly, only ibox and mbox
have this bug.

	Arnd <><



More information about the cbe-oss-dev mailing list