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

Jan Stancek jstancek@redhat.com
Tue Oct 26 13:57:11 CEST 2021


On Tue, Oct 26, 2021 at 12:52 PM Cyril Hrubis <chrubis@suse.cz> wrote:
>
> 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>

Pushed.

>
> 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.

It does.

> 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