Re: VM: Bad swap entry 0044cb00

From: Hugh Dickins (hugh@veritas.com)
Date: Tue Aug 28 2001 - 10:02:44 EST


On Tue, 28 Aug 2001, Christian Borntraeger wrote:
>
> I am also interested in getting this patch as I face the same problem on an
> S/390, but with Kernel 2.4.7
> It is a SMP machine.
> I donīt know, if you can get informations about this issue from non-intel
> platforms, but we should try.

Please try the (untested) patch below, which I hope will identify the
failing function, giving the return address back to its caller - please
mail me the message(s), and your System.map entries immediately before
and immediately after the "from" address reported. Patch is based on
2.4.7, but should apply okay (at different offsets) to anything since.

Thanks,
Hugh

--- 247/mm/swapfile.c Wed Jul 4 19:50:38 2001
+++ 247tmp/mm/swapfile.c Tue Aug 28 15:37:26 2001
@@ -191,12 +191,12 @@
         printk("swap_free: offset exceeds max\n");
         goto out;
 bad_free:
- printk("VM: Bad swap entry %08lx\n", entry.val);
+ printk("swap_free from %p: Bad swap entry %08lx\n", __builtin_return_address(0), entry.val);
         goto out;
 bad_count:
         swap_device_unlock(p);
         swap_list_unlock();
- printk(KERN_ERR "VM: Bad count %hd current count %hd\n", count, p->swap_map[offset]);
+ printk(KERN_ERR "swap_free: Bad count %hd current count %hd\n", count, p->swap_map[offset]);
         goto out;
 }
 
@@ -867,7 +867,7 @@
         else {
                 static int overflow = 0;
                 if (overflow++ < 5)
- printk("VM: swap entry overflow\n");
+ printk("swap_dup: swap entry overflow\n");
                 p->swap_map[offset] = SWAP_MAP_MAX;
         }
         swap_device_unlock(p);
@@ -876,13 +876,13 @@
         return result;
 
 bad_file:
- printk("Bad swap file entry %08lx\n", entry.val);
+ printk("swap_dup: Bad swap file entry %08lx\n", entry.val);
         goto out;
 bad_offset:
- printk("Bad swap offset entry %08lx\n", entry.val);
+ printk("swap_dup: Bad swap offset entry %08lx\n", entry.val);
         goto out;
 bad_unused:
- printk("Unused swap offset entry in swap_dup %08lx\n", entry.val);
+ printk("swap_dup from %p: Unused swap offset entry %08lx\n", __builtin_return_address(0), entry.val);
         goto out;
 }
 
@@ -917,13 +917,13 @@
         printk(KERN_ERR "swap_count: null entry!\n");
         goto out;
 bad_file:
- printk("Bad swap file entry %08lx\n", entry.val);
+ printk("swap_count: Bad swap file entry %08lx\n", entry.val);
         goto out;
 bad_offset:
- printk("Bad swap offset entry %08lx\n", entry.val);
+ printk("swap_count: Bad swap offset entry %08lx\n", entry.val);
         goto out;
 bad_unused:
- printk("Unused swap offset entry in swap_count %08lx\n", entry.val);
+ printk("swap_count from %p: Unused swap offset entry in swap_count %08lx\n", __builtin_return_address(0), entry.val);
         goto out;
 }
 
@@ -938,7 +938,7 @@
 
         type = SWP_TYPE(entry);
         if (type >= nr_swapfiles) {
- printk("Internal error: bad swap-device\n");
+ printk("rw_swap_page: Internal error: bad swap-device\n");
                 return;
         }
 
@@ -949,7 +949,7 @@
                 return;
         }
         if (p->swap_map && !p->swap_map[*offset]) {
- printk("VM: Bad swap entry %08lx\n", entry.val);
+ printk("rw_swap_page from %p: Bad swap entry %08lx\n", __builtin_return_address(0), entry.val);
                 return;
         }
         if (!(p->flags & SWP_USED)) {

-
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 : Fri Aug 31 2001 - 21:00:29 EST