Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=46cbf93960e64f313f6e247cbca7afaa50e3ee2c
Commit:     46cbf93960e64f313f6e247cbca7afaa50e3ee2c
Parent:     ea1ae5949d7fcd2e622226ba71741a0f43b6ef0a
Author:     Christoph Hellwig <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 29 10:57:57 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Tue Jul 3 15:24:45 2007 +1000

    [POWERPC] spusched: Catch nosched contexts in spu_deactivate
    
    spu_deactivate should never be called for nosched contets.  Put in
    a check so we can print a stacktrace and exit early in case it
    happes erroneously.
    
    Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]>
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
    Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spufs/sched.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c 
b/arch/powerpc/platforms/cell/spufs/sched.c
index 6927262..a20e4e2 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -491,6 +491,15 @@ static int __spu_deactivate(struct spu_context *ctx, int 
force, int max_prio)
  */
 void spu_deactivate(struct spu_context *ctx)
 {
+       /*
+        * We must never reach this for a nosched context,
+        * but handle the case gracefull instead of panicing.
+        */
+       if (ctx->flags & SPU_CREATE_NOSCHED) {
+               WARN_ON(1);
+               return;
+       }
+
        __spu_deactivate(ctx, 1, MAX_PRIO);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to