Showing error 1224

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: drivers/uwb/uwbd.c
Line in file: 326
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

296 * guaranteed we own the events in the private list.
297 *
298 * FIXME: should change so we don't have a 1HZ timer all the time, but
299 *        only if there are devices.
300 */
301static int uwbd(void *unused)
302{
303        unsigned long flags;
304        struct list_head list = LIST_HEAD_INIT(list);
305        struct uwb_event *evt, *nxt;
306        int should_stop = 0;
307        while (1) {
308                wait_event_interruptible_timeout(
309                        uwbd_wq,
310                        !list_empty(&uwbd_event_list)
311                          || (should_stop = kthread_should_stop()),
312                        HZ);
313                if (should_stop)
314                        break;
315                try_to_freeze();
316
317                mutex_lock(&uwbd_event_mutex);
318                spin_lock_irqsave(&uwbd_event_list_lock, flags);
319                list_splice_init(&uwbd_event_list, &list);
320                spin_unlock_irqrestore(&uwbd_event_list_lock, flags);
321                list_for_each_entry_safe(evt, nxt, &list, list_node) {
322                        list_del(&evt->list_node);
323                        uwbd_event_handle(evt);
324                        kfree(evt);
325                }
326                mutex_unlock(&uwbd_event_mutex);
327
328                uwb_beca_purge();        /* Purge devices that left */
329        }
330        return 0;
331}
332
333
334/** Start the UWB daemon */
335void uwbd_start(void)
336{
Show full sources