Showing error 1163

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


Source:

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);
379}
380
381/*
382 * The pages which we're about to release may be in the deferred lru-addition
383 * queues.  That would prevent them from really being freed right now.  That's
384 * OK from a correctness point of view but is inefficient - those pages may be
385 * cache-warm and we want to give them back to the page allocator ASAP.
386 *
Show full sources