projects/linux·commit acdd052a

init/main.c: fix sparse warnings: context imbalance

acdd052a · Hannes Eder <[email protected]> · 2009-03-31 15:23:50 -07:00

Impact: Attribute function 'init_post' with __releases(...).

Fix these sparse warnings:
  init/main.c:805:21: warning: context imbalance in 'init_post' - unexpected unlock
  init/main.c:899:9: warning: context imbalance in 'kernel_init' - wrong count at exit

Signed-off-by: Hannes Eder <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
acdd052a285a7b4cc7da4fa7d34ef9fd0a67b2f8
Parents
e0f7ad5f

Changes

1 files changed · +1 −0

FileStatusAddDelContent
init/main.cmodified+1−0View file

init/main.c

View file
diff --git a/init/main.c b/init/main.c
index d6b388f..07c8658 100644
--- a/init/main.c
+++ b/init/main.c
@@ -793,6 +793,7 @@ static void run_init_process(char *init_filename)
* makes it inline to init() and it becomes part of init.text section
*/
static noinline int init_post(void)
+ __releases(kernel_lock)
{
/* need to finish all async __init code before freeing the memory */
async_synchronize_full();