Showing error 1161

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


Source:

311{
312        return schedule_on_each_cpu(lru_add_drain_per_cpu);
313}
314
315/*
316 * Batched page_cache_release().  Decrement the reference count on all the
317 * passed pages.  If it fell to zero then remove the page from the LRU and
318 * free it.
319 *
320 * Avoid taking zone->lru_lock if possible, but if it is taken, retain it
321 * for the remainder of the operation.
322 *
323 * The locking in this function is against shrink_inactive_list(): we recheck
324 * the page count inside the lock to see whether shrink_inactive_list()
325 * grabbed the page via the LRU.  If it did, give up: shrink_inactive_list()
326 * will free it.
327 */
328void release_pages(struct page **pages, int nr, int cold)
329{
330        int i;
331        struct pagevec pages_to_free;
332        struct zone *zone = NULL;
333        unsigned long uninitialized_var(flags);
334
335        pagevec_init(&pages_to_free, cold);
336        for (i = 0; i < nr; i++) {
337                struct page *page = pages[i];
338
339                if (unlikely(PageCompound(page))) {
340                        if (zone) {
341                                spin_unlock_irqrestore(&zone->lru_lock, flags);
342                                zone = NULL;
343                        }
344                        put_compound_page(page);
345                        continue;
346                }
347
348                if (!put_page_testzero(page))
349                        continue;
350
351                if (PageLRU(page)) {
Show full sources