summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-07-31 20:09:49 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-31 20:09:49 -0700
commit7a6fbd69ea8e85797971ccdd7551ca7ed483e288 (patch)
tree2130b58727728a14328e852d3f6124fa51e75ecd /init
parentb84ee08e94334263cb96428542dfbcacca75072b (diff)
[PATCH] fix read_dir()
This function tries to allocate increasingly large buffers, but it gets the bounds wrong by a factor of PAGE_SIZE. It causes boot-time devfs mounting to fail.
Diffstat (limited to 'init')
-rw-r--r--init/do_mounts_devfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/do_mounts_devfs.c b/init/do_mounts_devfs.c
index fe2bf5ad800f..652582658d28 100644
--- a/init/do_mounts_devfs.c
+++ b/init/do_mounts_devfs.c
@@ -54,7 +54,7 @@ static void * __init read_dir(char *path, int *len)
if (fd < 0)
return NULL;
- for (size = 1 << 9; size <= (1 << MAX_ORDER); size <<= 1) {
+ for (size = 1 << 9; size <= (PAGE_SIZE << MAX_ORDER); size <<= 1) {
void *p = kmalloc(size, GFP_KERNEL);
int n;
if (!p)