From fd0d4536510b8f5cb7af087a1f5f9c121d4f3501 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Mon, 8 Nov 2004 16:19:49 +0000 Subject: [PATCH] - merge revision 1.7 date: 2004/11/05 09:56:50; author: mef; state: Exp; lines: +1 -1 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) --- kernel/ckrm/rbce/rbcemod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.0