[Cbe-oss-dev] [PATCH 1/2] spufs: Make signal-notification files readonly for NOSCHED contexts

Jeremy Kerr jk at ozlabs.org
Mon Jul 16 15:55:13 EST 2007


Reading from the signal{1,2} files requires a spu_acquire_saved, so
mask out the read bits for contexts created with SPU_CREATE_NOSCHED.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>

---

 arch/powerpc/platforms/cell/spufs/file.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/file.c
===================================================================
--- linux-2.6-spufs.orig/arch/powerpc/platforms/cell/spufs/file.c
+++ linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/file.c
@@ -2184,8 +2184,8 @@ struct tree_descr spufs_dir_nosched_cont
 	{ "mbox_stat", &spufs_mbox_stat_fops, 0444, },
 	{ "ibox_stat", &spufs_ibox_stat_fops, 0444, },
 	{ "wbox_stat", &spufs_wbox_stat_fops, 0444, },
-	{ "signal1", &spufs_signal1_fops, 0666, },
-	{ "signal2", &spufs_signal2_fops, 0666, },
+	{ "signal1", &spufs_signal1_fops, 0222, },
+	{ "signal2", &spufs_signal2_fops, 0222, },
 	{ "signal1_type", &spufs_signal1_type, 0666, },
 	{ "signal2_type", &spufs_signal2_type, 0666, },
 	{ "mss", &spufs_mss_fops, 0666, },



More information about the cbe-oss-dev mailing list