O_ATOMICLOOKUP in RHEL4 and RHEL5 kernels uses the same flag number that O_CLOEXEC flag in latest mainstream kernels http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f23513e8d96cf5e6cf8d2ff0cb5dd6bbc33995e4
btw I've found dentry leak in do_lookup(): fs/namei.c:: static int do_lookup(struct nameidata *nd, struct qstr *name, struct path *path, int atomic) { struct vfsmount *mnt = nd->mnt; struct dentry *dentry = __d_lookup(nd->dentry, name); if (!dentry) goto need_lookup; if (dentry->d_op && dentry->d_op->d_revalidate) goto need_revalidate; >>>>> VvS: dentry was taken but requires revalidation need_revalidate: if (atomic) return -EWOULDBLOCKIO; >>>>> VvS: ... however if atomic is set, we forget to call dput before exit
Both problem come from the TUX patch. I wonder if someone actually use it.
I do not know who uses TUX, but people will use O_CLOEXEC in new binaries. And it will lead to the troubles on filesystems where d_revalidate is implemented. Also It would be great to look at https://bugzilla.redhat.com/show_bug.cgi?id=315051
Yes sure. I wondered if we should get rid of TUX in the future. If it's not used, it's just a source of trouble.
just a note that bug #315051: open(O_ATOMICLOOKUP) leaks dentry covers the leak problem for RHEL5.
I'll close it as a duplicate of bug 358661. It is a private bug for some reason, but it says basically the same and it's already in POST status. It means a patch has been proposed and it is considered for 5.2. The patch simply removes all references to O_ATOMICLOOKUP from the kernel, because I found no users of it - not even the userspace part of tux used it. *** This bug has been marked as a duplicate of 358661 ***
Quoting Don Zickus's comment from bug 358661: in 2.6.18-62.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5