Showing error 1164

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


Source:

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)) {
367                        if (zone) {
368                                spin_unlock_irqrestore(&zone->lru_lock, flags);
369                                zone = NULL;
370                        }
371                        __pagevec_free(&pages_to_free);
372                        pagevec_reinit(&pages_to_free);
373                  }
374        }
375        if (zone)
376                spin_unlock_irqrestore(&zone->lru_lock, flags);
377
378        pagevec_free(&pages_to_free);
Show full sources