Re: Kernel BUG at swap.c:62 [2.4.19 vanilla]

From: Emiliano Gabrielli (Emiliano.Gabrielli@roma2.infn.it)
Date: Wed Oct 16 2002 - 09:38:45 EST


On 15:01, mercoledì 16 ottobre 2002, Thomas Langås wrote:
> Reading Oops report from the terminal
> kernel BUG at swap.c:62!
> kernel BUG at swap.c:62!
> invalid operand: 0000
> CPU: 1
> EIP: 0010:[<c01329ca>] Not tainted
> EFLAGS: 00010202
> invalid operand: 0000

>
> This is a vanilla 2.4.19 kernel, and we've seen this bug on several
> machines, but we haven't been able to find out what triggers it. And I
> don't see a BUG-statement at swap.c line 62. So, anyone with an idea of
> what to do is welcome with suggestions :)

well, the BUG() is inplicit in add_page_to_inactive_list in linux.c:61, this
macro is defined in linux/swap.h:197.

Could this one is a patch ?!?:

@linux/swap.h
#define DEBUG_LRU_PAGE(page) \
do { \
- if (!PageLRU(page)) \
- BUG(); \
- if (PageActive(page)) \
- BUG(); \
+ BUG_ON(!PageLRU(page)) \
+ BUG_ON (PageActive(page)) \
} while (0)

@mm/swap.c
void lru_cache_add(struct page * page)
{
+ spin_lock(&pagemap_lru_lock);
        if (!TestSetPageLRU(page)) {
- spin_lock(&pagemap_lru_lock);
        add_page_to_inactive_list(page);
- spin_unlock(&pagemap_lru_lock);
        }
+ spin_unlock(&pagemap_lru_lock);
}

best reguards

Emiliano 'AlberT' Gabrielli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:28 EST