Re: Q. Switch open_exec() and sys_uselib() to do_open_filp()

From: hooanon05
Date: Mon May 11 2009 - 01:23:10 EST



Al Viro:
> Nope. It ended up in nd->intent.open.flags due to path_lookup_open().

Yes.


> Then lookup_instantiate_filp() from a filesystem that might care about
> intents did
> nd->intent.open.file = __dentry_open(dget(dentry), mntget(nd->mnt),
> nd->intent.open.flags - 1,
> nd->intent.open.file,
> open);
> and nameidata_to_filp() ended up picking nd->intent.open.file.

FS supporting lookup_instantiate_filp() is rare, isn't it?
Simple grep told me it is called by fuse, nfsv4, cifs, and 9p only.
In other FS, FMODE_EXEC was dropped since nameidata_to_filp() (from
open_exec() directly) doesn't pick intent.open.flags up.

Anyway, I could confirm that setting FMODE_EXEC to f_flags is intended.
Thank you for your quick responces.


J. R. Okajima
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/