LWN.net Logo

Kernel prepatch 2.6.28-rc6

Another 2.6.28 rc is available with the release of 2.6.28-rc6. Most of the fixes are to CIFS and the mips architecture, though there are some other small fixes included. The long-format changelog has all the details. Linus is hoping that while he is gone for a week scuba diving, "you will all have tested it extensively and sent me fixes for any regressions found. Please don't disappoint me."
(Log in to post comments)

CIFS fixes

Posted Nov 21, 2008 9:07 UTC (Fri) by rvfh (subscriber, #31018) [Link]

Anybody knows whether they fixed the bug with readdir() that sometimes returns less entries than there really are? I can't see it in the log...

CIFS fixes

Posted Nov 21, 2008 15:31 UTC (Fri) by ajax (guest, #7251) [Link]

Why is that a bug? The read family is always allowed to return less data than was requested, or is available.

CIFS fixes

Posted Nov 21, 2008 16:22 UTC (Fri) by rvfh (subscriber, #31018) [Link]

Well scandir should only return NULL when reaching EOF, i.e. the end of the file list. In CIFS, it sometimes returns NULL early, without setting errno.

I have now switched to scandir which behaves the same wrong way (the problem is in the layer below). Calling it twice in a row allows me to detect the problem, but it's neither safe nor neat.

I have send the issue to the CIFS mailing list and someone answered there was indeed an issue somewhere they knew about, so I'm kinda hoping someone worked on it and has fixed it...

CIFS fixes

Posted Nov 21, 2008 16:23 UTC (Fri) by rvfh (subscriber, #31018) [Link]

The first sentence was actually about readdir, not scandir, sorry for the confusion.

CIFS fixes

Posted Nov 21, 2008 16:26 UTC (Fri) by tialaramex (subscriber, #21167) [Link]

Well, let's assume we're talking POSIX readdir() not the Linux syscall

So, readdir() returns exactly one dir entry per call, but presumably 'rvfh' is doing that and finding that when it returns NULL (indicating no further entries) this is in fact not true, in the sense that other software shows more directory entries in the same directory.

Now, there's a famous old bug relating to this in which it's actually a Samba server bug and was hopefully fixed long ago, but I'm guessing that's not the problem here since they're looking for a fix in Linux. Still a reference (or sample code that doesn't work) would be helpful.

CIFS fixes

Posted Nov 21, 2008 18:31 UTC (Fri) by jlayton (subscriber, #31672) [Link]

I think that was fixed in an earlier set of 2.6.28 patches.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds