-- 

----------------------------------------------------------------------
    Chandra Seetharaman               | Be careful what you choose....
              - [EMAIL PROTECTED]   |      .......you may get it.
----------------------------------------------------------------------
Check oldres for NULL before calling numtasks_put_ref.

This patch applies over PATCH 7/8 of Gerrit's recent patchset.

Index: linux-2.6.12-rc1/kernel/ckrm/ckrm_numtasks.c
===================================================================
--- linux-2.6.12-rc1.orig/kernel/ckrm/ckrm_numtasks.c
+++ linux-2.6.12-rc1/kernel/ckrm/ckrm_numtasks.c
@@ -466,7 +466,8 @@ static void numtasks_change_resclass(voi
                            ckrm_get_res_class(old_core, numtasks_rcbs.resid,
                                               struct ckrm_numtasks);
                }
-               numtasks_put_ref_local(oldres->core);
+               if (oldres)
+                       numtasks_put_ref_local(oldres->core);
        }
        if (newres) {
                (void)numtasks_get_ref_local(newres->core, 1);

Reply via email to