Showing error 1395

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: kernel/module.c
Line in file: 2599
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

2569                if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE))
2570                        buf[bx++] = 'P';
2571                if (mod->taints & (1 << TAINT_FORCED_MODULE))
2572                        buf[bx++] = 'F';
2573                if (mod->taints & (1 << TAINT_CRAP))
2574                        buf[bx++] = 'C';
2575                /*
2576                 * TAINT_FORCED_RMMOD: could be added.
2577                 * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
2578                 * apply to modules.
2579                 */
2580
2581                /* Show a - for module-is-being-unloaded */
2582                if (mod->state == MODULE_STATE_GOING)
2583                        buf[bx++] = '-';
2584                /* Show a + for module-is-being-loaded */
2585                if (mod->state == MODULE_STATE_COMING)
2586                        buf[bx++] = '+';
2587                buf[bx++] = ')';
2588        }
2589        buf[bx] = '\0';
2590
2591        return buf;
2592}
2593
2594#ifdef CONFIG_PROC_FS
2595/* Called by the /proc file system to return a list of modules. */
2596static void *m_start(struct seq_file *m, loff_t *pos)
2597{
2598        mutex_lock(&module_mutex);
2599        return seq_list_start(&modules, *pos);
2600}
2601
2602static void *m_next(struct seq_file *m, void *p, loff_t *pos)
2603{
2604        return seq_list_next(p, &modules, pos);
2605}
2606
2607static void m_stop(struct seq_file *m, void *p)
2608{
2609        mutex_unlock(&module_mutex);
Show full sources