diff --git a/scripts/kernel-functions b/scripts/kernel-functions index af499d0a0..d9ad40f4d 100644 --- a/scripts/kernel-functions +++ b/scripts/kernel-functions @@ -64,10 +64,22 @@ function download_kernel { } function extract_kernel_archive { + local kver="$(kernel_version $1)" + local plevel="$(patchlevel $1)" + local series="$1" + if [ -e "${kernel_sources}/linux-$1.tar.xz" ]; then xz -cd "${kernel_sources}/linux-$1.tar.xz" | tar xf - - else + elif [ -e "${kernel_sources}/linux-$kver.tar.xz" ]; then + xz -cd "${kernel_sources}/linux-$kver.tar.xz" | tar xf - && + mv linux-$kver linux-$1 + elif [ -e "${kernel_sources}/linux-$1.tar.bz2" ]; then tar xjf "${kernel_sources}/linux-$1.tar.bz2" + elif [ -e "${kernel_sources}/linux-$kver.tar.bz2" ]; then + tar xjf "${kernel_sources}/linux-$kver.tar.bz2" && + mv linux-$kver linux-$1 + else + return 1 fi } @@ -213,6 +225,13 @@ index 3f2793d..96e45ea 100644 EOF fi fi + # After patch-v4.14.1[12] has been applied, the execute bit has to be + # set for sync-check.sh since patch can't do that. + for f in "tools/objtool/sync-check.sh"; do + if [ -e "$f" ]; then + chmod a+x "$f" + fi + done ) rmdir "${tmpdir}" } diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index e2abb8b9b..db53c5d0c 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8083,7 +8083,12 @@ static struct request *blk_make_request(struct request_queue *q, blk_put_request(rq); return ERR_PTR(ret); } -#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) + /* + * See also commit commit 0abc2a10389f ("block: fix + * blk_rq_append_bio"). That commit has been backported to + * kernel v4.14.11 as 88da02868f77. + */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 11) ret = blk_rq_append_bio(rq, bio); if (unlikely(ret)) { blk_put_request(rq);