Skip to contentSkip to conversation

kernel/module.c use __set_current_state() instead of direct

KJ aLeJ 2 participants 2 messages Jun 29, 2005 Kernel janitors

lore
Share & tools
lore

aLeJ

author
#0 lore raw

Description:
Use of __set_current_state() instead of direct assigment of current->state.

--- linux-2.6.12.1/kernel/module.c.orig 2005-06-29 20:11:28.000000000
+0200
+++ linux-2.6.12.1/kernel/module.c 2005-06-29 20:12:02.000000000 +0200
@@ -518,7 +518,7 @@ static void wait_for_zero_refcount(struc
break;
schedule();
}
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
down(&module_mutex);
}

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw

Hi,

Quoted 10 lines · aLeJ

Description:
Use of __set_current_state() instead of direct assigment of current->state.

--- linux-2.6.12.1/kernel/module.c.orig 2005-06-29 20:11:28.000000000
+0200
+++ linux-2.6.12.1/kernel/module.c 2005-06-29 20:12:02.000000000 +0200

Review static void wait_for_zero_refcount(struc · line 523

Quoted 7 lines
(quoted diff) +1 -1
@@ -518,7 +518,7 @@ static void wait_for_zero_refcount(struc
 			break;
 		schedule();
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	down(&module_mutex);
 }

There are many current->state code snippets in the kernel source. Should they all be substituted?
Regards Nico

Signature · 4 lines
Nico Golde - JAB: [email protected] | GPG: 0x73647CFF
http://www.ngolde.de | http://www.muttng.org | http://grml.org 
VIM has two modes - the one in which it beeps 
and the one in which it doesn't -- encrypted mail preferred

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors