On Thu, Jan 01, 2015 at 12:01:49AM +0000, Al Viro wrote: > Umm... How about just adding a function that would be used instead of > all those > struct filename filename = { .name = name }; > and created an object that would be destroyed later by putname()?
... such as getname_kernel(), actually. There are 5 places like that: fs/exec.c:open_exec(), fs/namei.c:do_path_lookup(), fs/namei.c:kern_path_mountpoint(), fs/namei.c:do_file_open_root(), fs/open.c:filp_open(). Said that, I'm not sure that no call chains allow names just under PATH_MAX, so getname_kernel() might need to be taught to handle those. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/