Showing error 633

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: sound/core/timer.c
Line in file: 350
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

 320                        udelay(10);
 321                        spin_lock_irq(&slave_active_lock);
 322                }
 323                spin_unlock_irq(&slave_active_lock);
 324                mutex_lock(&register_mutex);
 325                list_del(&timeri->open_list);
 326                mutex_unlock(&register_mutex);
 327        } else {
 328                timer = timeri->timer;
 329                /* wait, until the active callback is finished */
 330                spin_lock_irq(&timer->lock);
 331                while (timeri->flags & SNDRV_TIMER_IFLG_CALLBACK) {
 332                        spin_unlock_irq(&timer->lock);
 333                        udelay(10);
 334                        spin_lock_irq(&timer->lock);
 335                }
 336                spin_unlock_irq(&timer->lock);
 337                mutex_lock(&register_mutex);
 338                list_del(&timeri->open_list);
 339                if (timer && list_empty(&timer->open_list_head) &&
 340                    timer->hw.close)
 341                        timer->hw.close(timer);
 342                /* remove slave links */
 343                list_for_each_entry_safe(slave, tmp, &timeri->slave_list_head,
 344                                         open_list) {
 345                        spin_lock_irq(&slave_active_lock);
 346                        _snd_timer_stop(slave, 1, SNDRV_TIMER_EVENT_RESOLUTION);
 347                        list_move_tail(&slave->open_list, &snd_timer_slave_list);
 348                        slave->master = NULL;
 349                        slave->timer = NULL;
 350                        spin_unlock_irq(&slave_active_lock);
 351                }
 352                mutex_unlock(&register_mutex);
 353        }
 354        if (timeri->private_free)
 355                timeri->private_free(timeri);
 356        kfree(timeri->owner);
 357        kfree(timeri);
 358        if (timer)
 359                module_put(timer->module);
 360        return 0;
Show full sources