Showing error 1419

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/smp.c
Line in file: 422
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

392
393/**
394 * smp_call_function(): Run a function on all other CPUs.
395 * @func: The function to run. This must be fast and non-blocking.
396 * @info: An arbitrary pointer to pass to the function.
397 * @wait: If true, wait (atomically) until function has completed on other CPUs.
398 *
399 * Returns 0 on success, else a negative status code.
400 *
401 * If @wait is true, then returns once @func has returned; otherwise
402 * it returns just before the target cpu calls @func. In case of allocation
403 * failure, @wait will be implicitly turned on.
404 *
405 * You must not call this function with disabled interrupts or from a
406 * hardware interrupt handler or from a bottom half handler.
407 */
408int smp_call_function(void (*func)(void *), void *info, int wait)
409{
410        int ret;
411
412        preempt_disable();
413        ret = smp_call_function_mask(cpu_online_map, func, info, wait);
414        preempt_enable();
415        return ret;
416}
417EXPORT_SYMBOL(smp_call_function);
418
419void ipi_call_lock(void)
420{
421        spin_lock(&call_function_lock);
422}
423
424void ipi_call_unlock(void)
425{
426        spin_unlock(&call_function_lock);
427}
428
429void ipi_call_lock_irq(void)
430{
431        spin_lock_irq(&call_function_lock);
432}
Show full sources