Showing error 628

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: mm/shmem.c
Line in file: 992
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

 962                error = 1;        /* not an error, but entry was found */
 963        }
 964        if (ptr)
 965                shmem_swp_unmap(ptr);
 966        spin_unlock(&info->lock);
 967        radix_tree_preload_end();
 968out:
 969        unlock_page(page);
 970        page_cache_release(page);
 971        iput(inode);                /* allows for NULL */
 972        return error;
 973}
 974
 975/*
 976 * shmem_unuse() search for an eventually swapped out shmem page.
 977 */
 978int shmem_unuse(swp_entry_t entry, struct page *page)
 979{
 980        struct list_head *p, *next;
 981        struct shmem_inode_info *info;
 982        int found = 0;
 983
 984        mutex_lock(&shmem_swaplist_mutex);
 985        list_for_each_safe(p, next, &shmem_swaplist) {
 986                info = list_entry(p, struct shmem_inode_info, swaplist);
 987                found = shmem_unuse_inode(info, entry, page);
 988                cond_resched();
 989                if (found)
 990                        goto out;
 991        }
 992        mutex_unlock(&shmem_swaplist_mutex);
 993out:        return found;        /* 0 or 1 or -ENOMEM */
 994}
 995
 996/*
 997 * Move the page from the page cache to the swap cache.
 998 */
 999static int shmem_writepage(struct page *page, struct writeback_control *wbc)
1000{
1001        struct shmem_inode_info *info;
1002        swp_entry_t *entry, swap;
Show full sources