From: Marc Fiuczynski Date: Fri, 5 Nov 2004 09:56:50 +0000 (+0000) Subject: This patch fixes a crash problem in rbce when a class is deleted X-Git-Tag: before-enable-kexec-patch~18 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=fd0d3e5ad6f06574e4ebfacaa08c59d53131f1bf;p=linux-2.6.git This patch fixes a crash problem in rbce when a class is deleted Problem is that the as part of running the rules_list the class is effectively deleted through put_class thus the value of cls->classtype is undefined. Since on entry cls->classtype == classtype use parameter classtype instead. Hubertus Frankeh (frankeh@us.ibm.com) --- diff --git a/kernel/ckrm/rbce/rbcemod.c b/kernel/ckrm/rbce/rbcemod.c index e0df4d134..555ba0a4e 100644 --- a/kernel/ckrm/rbce/rbcemod.c +++ b/kernel/ckrm/rbce/rbcemod.c @@ -506,7 +506,7 @@ rbce_class_deletecb(const char *classname, void *classobj, int classtype) } notify_class_action(cls, 0); cls->classobj = NULL; - list_for_each_entry(pos, &rules_list[cls->classtype], link) { + list_for_each_entry(pos, &rules_list[classtype], link) { rule = (struct rbce_rule *)pos; if (rule->target_class) { if (!strcmp