]> Gentwo Git Trees - linux/.git/commit
gen_init_cpio: Ignore fsync() returning EINVAL on pipes
authorDmitry Safonov <dima@arista.com>
Tue, 7 Oct 2025 03:46:47 +0000 (04:46 +0100)
committerNathan Chancellor <nathan@kernel.org>
Tue, 7 Oct 2025 16:53:05 +0000 (09:53 -0700)
commit38492c5743f8b7213ca86f0cd72ea625af35d5ef
treeaa7d10e06c7c6c18c194926b2f0c5cbe44087398
parent7ded7d37e5f5b36b4acd74380156cf07b6640c5b
gen_init_cpio: Ignore fsync() returning EINVAL on pipes

The reproducer:
echo | ./usr/gen_init_cpio /dev/stdin > /dev/null

fsync() on a pipe fd returns -EINVAL, which makes gen_init_cpio fail.
Ignore -EINVAL from fsync().

Fixes: ae18b94099b0 ("gen_init_cpio: support -o <output_file> parameter")
Cc: David Disseldorp <ddiss@suse.de>
Cc: Nicolas Schier <nsc@kernel.org>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Link: https://patch.msgid.link/20251007-gen_init_cpio-pipe-v2-1-b098ab94b58a@arista.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
usr/gen_init_cpio.c