Re: suspect list_empty( {NULL, NULL} )

Andrew Morton (akpm@digeo.com)
Sat, 28 Sep 2002 18:31:57 -0700


Zach Brown wrote:
>
> A cute list_head debugging patch seems to have found strange list_entry
> use in vmscan.c in stock 2.5.39.
>
> page_mapping_inuse:
>
> if (!list_empty(&mapping->i_mmap) || !list_empty(&mapping->i_mmap_shared))
>
> ...
> (gdb) print *mapping
> $22 = {host = 0xc03b6e00

That's swapper_space.

--- 2.5.39/mm/swap_state.c~swapper_space-state Sat Sep 28 18:30:45 2002
+++ 2.5.39-akpm/mm/swap_state.c Sat Sep 28 18:31:26 2002
@@ -43,6 +43,8 @@ struct address_space swapper_space = {
.a_ops = &swap_aops,
.backing_dev_info = &swap_backing_dev_info,
.i_shared_lock = SPIN_LOCK_UNLOCKED,
+ .i_mmap = LIST_HEAD_INIT(swapper_space.i_mmap),
+ .i_mmap_shared = LIST_HEAD_INIT(swapper_space.i_mmap_shared),
.private_lock = SPIN_LOCK_UNLOCKED,
.private_list = LIST_HEAD_INIT(swapper_space.private_list),
};

.
-
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/