Re: [PATCH mm] limit the mm->map_count not greater than sysctl_max_map_count

From: Cong Wang
Date: Wed Apr 18 2012 - 09:28:09 EST

On 04/18/2012 05:27 PM, Li Zhong wrote:
When reading the mmap codes, I found the checking of mm->map_count
against sysctl_max_map_count is not consistent. At some places, ">" is
used; at some other places, ">=" is used.

This patch changes ">" to">=", so they are consistent, and makes sure
the value is not greater (one more) than sysctl_max_map_count.

Well, according to Documentation/sysctl/vm.txt,


This file contains the maximum number of memory map areas a process
may have. [...]

I think ->map_count == sysctl_max_map_count should be allowed, so using '>' is correct.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at