[LTP] [PATCH v2] finit_module02: fix exp. errno for O_WRONLY testcase

Cyril Hrubis chrubis@suse.cz
Tue Oct 26 12:52:50 CEST 2021


Hi!
> commit 032146cda855 ("vfs: check fd has read access in
> kernel_read_file_from_fd()") changed errno back to EBADF,
> which is correct value according to man page. Drop the
> workaround and always expect EBADF for O_WRONLY testcase.

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

Also I'm starting to wonder if the errno from dir_setup() should be
fixed in the kernel as well. I guess that EISDIR sounds much better
error than EINVAL. But in this case the manual page seems to be silent
on what is going to happen if you pass a directory fd to the
finit_module().

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list