Re: linux-next: build failure after merge of the driver-core tree

From: Eric W. Biederman
Date: Tue May 18 2010 - 06:35:23 EST

Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> writes:

> Hi Eric,
> On Tue, 18 May 2010 00:00:01 -0700 ebiederm@xxxxxxxxxxxx (Eric W. Biederman) wrote:
>> Stephen what is the easiest way to get a copy of Al's tree so I can take
>> a look to see what needs to happen?
> It is here:
> git://
> [The latest list of trees included in linux-next can always be found here:


I will cook up a proper incremental patch after I get some sleep. Stephen
it appears those two lines you have commented out are actually unnecessary.

We have
kill_sb aka sysfs_kill_sb

Nothing generic stomps on s_fs_info.

Which means that if I find a superblock on sb->s_instances sb->s_fs_info
still points to a valid sysfs_super_info.

As as for the race Al mentions between sysfs_exit_ns and
sysfs_readdir, I looked and a small race has crept in. The primary
prevention of problems is that all matching sysfs_dirents for that
namespace are required to be removed before sysfs_exit_ns is called.

What remains is the tiniest of races where a namespace structure is
freed and a new namespace structure of the same type is allocated at
the same address and sysfs_dirents for it are created, all during the
a single kernel readdir operation. Possible with slabs, and
copy_to_user triggering a page fault. Still the worst case is that we
tell userspace some name that it wasn't supposed to see on that mount
point. From a userspace point of view this seems to fall under a
readdir implementations license to return some odd things if the
directory is changing during the readdir call. Overall we do preserve
the property of returning everything that is in the directory between
opendir and the time readdir his the end of file.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at