]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] spufs: Don't leak kernel stack through an empty {i,m}box_info read
authorJeremy Kerr <jk@ozlabs.org>
Thu, 20 Dec 2007 07:39:59 +0000 (16:39 +0900)
committerPaul Mackerras <paulus@samba.org>
Fri, 21 Dec 2007 08:46:22 +0000 (19:46 +1100)
commit8b74365a05ddfde52debcb4acc01f1d6bc70ceee
tree988bf369946836d95a549059d2d01998d252e673
parentebae91956940cd6b382e6ebd6db13deb21b43853
[POWERPC] spufs: Don't leak kernel stack through an empty {i,m}box_info read

Based on an original patch from Arnd Bergmann
<arnd.bergmann@de.ibm.com>

If there's no entry in the mailbox, then a read on the _info file will
return data from an uninitialised variable.

This change returns EOF if there's no mailbox info available instead.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/spufs/file.c