[LTP] [PATCH v2] Regression check for unlink fail issue after successful mknod

Richard Palethorpe rpalethorpe@suse.de
Wed Aug 30 10:59:00 CEST 2023


Hello,

Wei Gao via ltp <ltp@lists.linux.it> writes:

> Write a regression test once making unix_bind() undo mknod on failure patchset is merged.
>
> Kernel patch detail:
> git describe --contains c0c3b8d380a8f54c75786d41f6f9efbe761dac6c
> v5.14-rc1119^286
> git log -p c0c3b8d380a8f54c75786d41f6f9efbe761dac6c
> commit c0c3b8d380a8f54c75786d41f6f9efbe761dac6c
> Author: Al Viro viro@zeniv.linux.org.uk
> Date: Sat Jun 19 03:50:32 2021 +0000
> unix_bind_bsd(): unlink if we fail after successful mknod
>
> Signed-off-by: Wei Gao <wegao@suse.com>
> ---
>  testcases/kernel/syscalls/bind/bind03.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/bind/bind03.c b/testcases/kernel/syscalls/bind/bind03.c
> index 37a040b29..8c95cd799 100644
> --- a/testcases/kernel/syscalls/bind/bind03.c
> +++ b/testcases/kernel/syscalls/bind/bind03.c
> @@ -43,8 +43,12 @@ static void run(void)
>  	 * locks the socket and does all the checks and the node is not removed
>  	 * in the error path. For now we will unlink the node here so that the
>  	 * test works fine when the run() function is executed in a loop.
> +	 * From v5.14-rc1 the kernel has fix above issue.

Usually we don't work around kernel bugs, so really the workaround
should be removed for all versions. However because the workaround was
already accepted, it's a less serious bug and you are removing it on a
subset of kernels, I will just merge it.

-- 
Thank you,
Richard.


More information about the ltp mailing list