Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b192541b39ed29ff82f9f2d5427f451e89617f1c
Commit:     b192541b39ed29ff82f9f2d5427f451e89617f1c
Parent:     91569531d1297db42d68136ac0c85cd85223d0b9
Author:     Luke Browning <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 20 16:39:59 2007 +0900
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Dec 21 19:46:20 2007 +1100

    [POWERPC] spufs: spu_find_victim may choose wrong victim
    
    Need to re-check priority after dropping lock.  Otherwise, a
    more favored context may be preempted.
    
    Signed-off-by: Luke Browning <[EMAIL PROTECTED]>
    Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spufs/sched.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c 
b/arch/powerpc/platforms/cell/spufs/sched.c
index ef0e5e2..54b338f 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -626,10 +626,10 @@ static struct spu *find_victim(struct spu_context *ctx)
                        }
 
                        spu = victim->spu;
-                       if (!spu) {
+                       if (!spu || victim->prio <= ctx->prio) {
                                /*
                                 * This race can happen because we've dropped
-                                * the active list mutex.  No a problem, just
+                                * the active list mutex.  Not a problem, just
                                 * restart the search.
                                 */
                                mutex_unlock(&victim->state_mutex);
-
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