Messages in this thread Patch in this message | | | Date | Fri, 17 Feb 2006 16:03:32 -0500 (EST) | From | Rik van Riel <> | Subject | [PATCH] fix overflow in inode.c |
| |
The following patch fixes an overflow in inode.c. This overflow can cause a system to stop reclaiming inodes, with a large amount of memory and zillions of inodes. This has caused systems to run out of low memory in real world situations.
Thanks go out to Larry Woodman, as well as the unnamed customer who first tracked this problem down. You know who you are.
Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Larry Woodman <lwoodman@redhat.com>
--- linux-2.4.32/fs/inode.c.overflow 2006-02-17 15:55:16.000000000 -0500 +++ linux-2.4.32/fs/inode.c 2006-02-17 15:56:37.000000000 -0500 @@ -854,8 +854,8 @@ void prune_icache(int goal) */ if (goal <= 0) return; - if (inodes_stat.nr_unused * sizeof(struct inode) * 10 < - freeable_lowmem() * PAGE_SIZE) + if (inodes_stat.nr_unused < + (freeable_lowmem() * PAGE_SIZE) / (sizeof(struct inode) * 10)) return; wakeup_bdflush(); - 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/
| |