From c01916b9d0c309a381c0ce075b8eca2877be0ac0 Mon Sep 17 00:00:00 2001 From: Sumanth Korikkar Date: Sun, 19 Sep 2021 19:05:36 +0200 Subject: [PATCH] kpatch-build: Handle error in create-klp-module create-klp-module could error out and in this case ensure that kpatch-build does not proceed further. Signed-off-by: Sumanth Korikkar --- kpatch-build/kpatch-build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index efdaffe99..0d1364df5 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -1155,6 +1155,7 @@ else rm -f checksum.tmp "$TOOLSDIR"/create-kpatch-module "$TEMPDIR"/patch/tmp_output.o "$TEMPDIR"/patch/output.o 2>&1 | logger 1 check_pipe_status create-kpatch-module + test $rc -ne 0 && die "create-kpatch-module: exited with return code: $rc" fi cd "$TEMPDIR/patch" || die @@ -1181,6 +1182,7 @@ if [[ "$USE_KLP" -eq 1 ]]; then cp -f "$TEMPDIR/patch/$MODNAME.ko" "$TEMPDIR/patch/tmp.ko" || die "$TOOLSDIR"/create-klp-module $extra_flags "$TEMPDIR/patch/tmp.ko" "$TEMPDIR/patch/$MODNAME.ko" 2>&1 | logger 1 check_pipe_status create-klp-module + test $rc -ne 0 && die "create-klp-module: exited with return code: $rc" fi if [[ "$CONFIG_MODVERSIONS" -eq 1 ]]; then