Showing error 916

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: net/core/dev.c
Line in file: 2403
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-02-27 21:22:42 UTC


Source:

2373        struct list_head *list = &__get_cpu_var(softnet_data).poll_list;
2374        unsigned long start_time = jiffies;
2375        int budget = netdev_budget;
2376        void *have;
2377
2378        local_irq_disable();
2379
2380        while (!list_empty(list)) {
2381                struct napi_struct *n;
2382                int work, weight;
2383
2384                /* If softirq window is exhuasted then punt.
2385                 *
2386                 * Note that this is a slight policy change from the
2387                 * previous NAPI code, which would allow up to 2
2388                 * jiffies to pass before breaking out.  The test
2389                 * used to be "jiffies - start_time > 1".
2390                 */
2391                if (unlikely(budget <= 0 || jiffies != start_time))
2392                        goto softnet_break;
2393
2394                local_irq_enable();
2395
2396                /* Even though interrupts have been re-enabled, this
2397                 * access is safe because interrupts can only add new
2398                 * entries to the tail of this list, and only ->poll()
2399                 * calls can remove this head entry from the list.
2400                 */
2401                n = list_entry(list->next, struct napi_struct, poll_list);
2402
2403                have = netpoll_poll_lock(n);
2404
2405                weight = n->weight;
2406
2407                /* This NAPI_STATE_SCHED test is for avoiding a race
2408                 * with netpoll's poll_napi().  Only the entity which
2409                 * obtains the lock and sees NAPI_STATE_SCHED set will
2410                 * actually make the ->poll() call.  Therefore we avoid
2411                 * accidently calling ->poll() when NAPI is not scheduled.
2412                 */
2413                work = 0;
Show full sources