Comment 5 for bug 1122094

Revision history for this message
Roman Valov (reddot) wrote :

Joseph, please refer to the commit link on ubuntu kernel's git at the bug description. That's the point where the problem was introduced. Thus neither upstream vanilla 3.5 kernel, nor mszeredi's overlayfs kernel doesn't have reported problem. The merge conflict pointed at bug description was introduced due to mszeredi's overlayfs v13 was based on kernel 3.4. And both, mszeredi's overlayfs v13 patch and 3.4 to 3.5 patch modify 'nameidata_to_filp' behavior. Next version of overlayfs v14 is based on kernel 3.6, where open.c was greatly modified and there is no 'nameidata_to_filp' function.

Your arguments about kernel patching are reasonable. So I will provide links to various variants of open.c and ask you to investigate how 'nameidata_to_filp' is working at different kernels:

----

vanilla v3.4: http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/open.c;h=5720854156dbd61e28598da83a529294401eb119;hb=76e10d158efb6d4516018846f60c2ab5501900bc

call sequence: nameidata_to_filp -> __dentry_open -> all dirty stuff here

----

overlayfs v13: http://git.kernel.org/?p=linux/kernel/git/mszeredi/vfs.git;a=blob;f=fs/open.c;h=3e132ba8576030460673c1b75f8b4fdbee4bb930;hb=refs/heads/overlayfs.v13

call sequence: nameidata_to_filp -> vfs_open -> __dentry_open -> all dirty stuff here

----

vanilla v3.5: http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/open.c;h=1540632d8387fe98a51d0193201346acb18ae70e;hb=28a33cbc24e4256c143dce96c7d93bf423229f92

call sequence: nameidata_to_filp [post-proc] -> do_dentry_open -> most of dirty stuff here

----

ubuntu quantal: http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-quantal.git;a=blob;f=fs/open.c;h=7be104a4e0aecbd3ecd7df20a2d3f7825a795af7;hb=HEAD

call sequence: nameidata_to_filp [post-proc] -> vfs_open -> __dentry_open [post-proc] -> do_dentry_open -> most of dirty stuff here

----

Well, in v3.4 and overlayfs v13 "all dirty stuff" was done at the '__dentry_open'. In v3.5 that "all dirty stuff" was split into "most of dirty stuff" in the 'do_dentry_open' and other part of "all dirty stuff" (post-processing) was left at the '__dentry_open'. Besides this post-processing stuff was duplicated at 'nameidata_to_filp' and 'nameidata_to_filp' calls only 'do_dentry_open', not '__dentry_open'.

So at vanilla v3.5 'nameidata_to_filp' now calls only 'do_dentry_open' and performs post-processing by itself. In quantal's kernel (merged from v3.5 and overlayfs v13) post-processing done at 'nameidata_to_filp' like in vanilla kernel. But also post-processing done at '__dentry_open' called by 'vfs_open' ported from overlayfs v13.

----

I hope this information and investigating on provided points will be enough to accept the patch.