Re: [Fwd: shm swapping broken in 2.3.2[345]]

Larry Woodman (woodman@missioncriticallinux.com)
Wed, 03 Nov 1999 17:03:31 -0500


This is a multi-part message in MIME format.
--------------48276C80DF2A9C29B72442DE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

>
>
> Subject: shm swapping broken in 2.3.2[345]
> Date: 03 Nov 1999 11:25:34 +0100
> From: Christoph Rohland <hans-christoph.rohland@sap.com>
> To: linux-kernel@vger.rutgers.edu, Ingo Molnar <mingo@chiara.csoma.elte.hu>
>
> Hi,
>
> I am doing some shm swap tests on recent kernels. In the 2.3.25 Linux
> does not swap any shm pages out. I traced it down to the fact, that
> page_count is always > 0.
>
> I am not sure if this also happens in 2.3.2[34] since there other
> things also break.
>
> Any help appreciated
>
> Christoph
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

The problem appears to be in linux/ipc/shm.c in function shm_swap().

The "if (page_count(page_map))" should be "if (page_count(page_map) != 1)".

The page_map->count could not be zero here because it would have already
been freed by the last call to __free_page().

Larry Woodman
Mission Critical Linux(www.missioncriticallinux.com)

This patch applies to ipc/shm.c under 2.3.25.

--------------48276C80DF2A9C29B72442DE
Content-Type: text/plain; charset=us-ascii;
name="patch-2.3.25.shm"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-2.3.25.shm"

791c791
< if (page_count(page_map))

---
> 	if (page_count(page_map) != 1)

--------------48276C80DF2A9C29B72442DE--

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