linuxolator problem on i386
Alexander Leidinger
Alexander at Leidinger.net
Thu Sep 20 01:19:51 PDT 2007
Quoting Roman Divacky <rdivacky at freebsd.org> (from Wed, 19 Sep 2007
15:25:46 +0200):
>> > @@ -442,8 +443,7 @@
>>
>> > off = fp->f_offset;
>>
>> > - buflen = max(LINUX_DIRBLKSIZ, nbytes);
>> > - buflen = min(buflen, MAXBSIZE);
>> > + buflen = max(buflen, MAXBSIZE);
>> > buf = malloc(buflen, M_TEMP, M_WAITOK);
>> > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
>>
>> No. It limits buflen to which is smaller, buflen or MAXBSIZE.
>
> yes... brain does not work real good today :(
>
> I wonder why the limitation is there.
Isn't this the code where we made sure that we don't use more buffer
than we have? In some part of the code we specially made sure that we
don't overflow either the FreeBSD size nor the linux size.
You could check if nbytes is with or without the \0.
Bye,
Alexander.
--
People never lie so much as after a hunt, during a war, or before an
election.
-- Otto von Bismarck
http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
More information about the freebsd-emulation
mailing list