From: Dan Rosenberg Date: Thu, 24 Jun 2010 02:07:47 +0000 (+1000) Subject: xfs: prevent swapext from operating on write-only files X-Git-Tag: v2.6.27.50~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1377aee4e4d4f5f0621b399b247b0790330b4c9;p=pandora-kernel.git xfs: prevent swapext from operating on write-only files commit 1817176a86352f65210139d4c794ad2d19fc6b63 upstream. This patch prevents user "foo" from using the SWAPEXT ioctl to swap a write-only file owned by user "bar" into a file owned by "foo" and subsequently reading it. It does so by checking that the file descriptors passed to the ioctl are also opened for reading. Signed-off-by: Dan Rosenberg Reviewed-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed