From: Milton Miller <miltonm@bga.com>
To: linux-kernel@vger.kernel.org
Cc: Helge Hafting <helgehaf@aitel.hist.no>, Andrew Morton <akpm@digeo.com>
Subject: [PATCH] fix CONFIG_DEVFS=y root=<number>
Date: Sat, 4 Jan 2003 02:01:38 -0600 (CST) [thread overview]
Message-ID: <200301040801.h0481cf00212@sullivan.realtime.net> (raw)
Based on a patch by Adam J. Richter <adam@yggdrasil.com> [1], this fixes
the problem since 2.5.47 with mounting a devfs=y system with root=<number>
sys_get_dents64 returns -EINVAL if there is not space for an entry, so
we need to activate the loop code to expand the buffer.
[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=103762980207529&w=2
Tested with 2.5.53-um2
diff -Nru a/init/do_mounts.c b/init/do_mounts.c
--- a/init/do_mounts.c Sat Jan 4 00:14:34 2003
+++ b/init/do_mounts.c Sat Jan 4 00:14:34 2003
@@ -333,7 +333,7 @@
for (bytes = 0, p = buf; bytes < len; bytes += n, p+=n) {
n = sys_getdents64(fd, p, len - bytes);
if (n < 0)
- return -1;
+ return n;
if (n == 0)
return bytes;
}
@@ -361,7 +361,7 @@
return p;
}
kfree(p);
- if (n < 0)
+ if (n < 0 && n != -EINVAL)
break;
}
close(fd);
next reply other threads:[~2003-01-04 7:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-04 8:01 Milton Miller [this message]
2003-01-04 8:36 ` [PATCH] fix CONFIG_DEVFS=y root=<number> Andrew Morton
2003-01-05 7:46 ` Milton Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200301040801.h0481cf00212@sullivan.realtime.net \
--to=miltonm@bga.com \
--cc=akpm@digeo.com \
--cc=helgehaf@aitel.hist.no \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox