lkml.org 
[lkml]   [2013]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] module: potential deadlock in error path
We take the lock twice if we hit this goto.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/kernel/module.c b/kernel/module.c
index d25e359..2eefa7d 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3239,8 +3239,10 @@ again:
mutex_lock(&module_mutex);
/* Find duplicate symbols (must be called under lock). */
err = verify_export_symbols(mod);
- if (err < 0)
+ if (err < 0) {
+ mutex_unlock(&module_mutex);
goto ddebug_cleanup;
+ }

/* This relies on module_mutex for list integrity. */
module_bug_finalize(info->hdr, info->sechdrs, mod);

\
 
 \ /
  Last update: 2013-01-18 09:21    [W:0.051 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site