Showing error 1162

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: 356
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

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)) {
352                        struct zone *pagezone = page_zone(page);
353
354                        if (pagezone != zone) {
355                                if (zone)
356                                        spin_unlock_irqrestore(&zone->lru_lock,
357                                                                        flags);
358                                zone = pagezone;
359                                spin_lock_irqsave(&zone->lru_lock, flags);
360                        }
361                        VM_BUG_ON(!PageLRU(page));
362                        __ClearPageLRU(page);
363                        del_page_from_lru(zone, page);
364                }
365
366                if (!pagevec_add(&pages_to_free, page)) {
Show full sources