Showing error 587

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: drivers/uwb/uwbd.c
Line in file: 246
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:59 UTC


Source:

216                printk(KERN_ERR "UWBD: event %s[%u]: unknown\n", type_table->name, event);
217                return -EINVAL;
218        }
219        return (*handler)(evt);
220}
221
222static void uwbd_event_handle_message(struct uwb_event *evt)
223{
224        struct uwb_rc *rc;
225        int result;
226
227        rc = evt->rc;
228
229        if (evt->message < 0 || evt->message >= ARRAY_SIZE(uwbd_message_handlers)) {
230                dev_err(&rc->uwb_dev.dev, "UWBD: invalid message type %d\n", evt->message);
231                return;
232        }
233
234        /* If this is a reset event we need to drop the
235         * uwbd_event_mutex or it deadlocks when the reset handler
236         * attempts to flush the uwbd events. */
237        if (evt->message == UWB_EVT_MSG_RESET)
238                mutex_unlock(&uwbd_event_mutex);
239
240        result = uwbd_message_handlers[evt->message].handler(evt);
241        if (result < 0)
242                dev_err(&rc->uwb_dev.dev, "UWBD: '%s' message failed: %d\n",
243                        uwbd_message_handlers[evt->message].name, result);
244
245        if (evt->message == UWB_EVT_MSG_RESET)
246                mutex_lock(&uwbd_event_mutex);
247}
248
249static void uwbd_event_handle(struct uwb_event *evt)
250{
251        struct uwb_rc *rc;
252        int should_keep;
253
254        rc = evt->rc;
255
256        if (rc->ready) {
Show full sources