Merge pull request #3078 from dm0-/linux

Backport an iSCSI fix to Linux 4.14 in master
This commit is contained in:
David Michael 2018-02-20 16:05:04 -05:00 committed by GitHub
commit 58a7ac5ccd
9 changed files with 48 additions and 7 deletions

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=5 EAPI=5
COREOS_SOURCE_REVISION="" COREOS_SOURCE_REVISION="-r1"
inherit coreos-kernel inherit coreos-kernel
DESCRIPTION="CoreOS Linux kernel" DESCRIPTION="CoreOS Linux kernel"

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=5 EAPI=5
COREOS_SOURCE_REVISION="" COREOS_SOURCE_REVISION="-r1"
inherit coreos-kernel savedconfig inherit coreos-kernel savedconfig
DESCRIPTION="CoreOS Linux kernel modules" DESCRIPTION="CoreOS Linux kernel modules"

View File

@ -36,4 +36,5 @@ UNIPATCH_LIST="
${PATCH_DIR}/z0003-block-factor-out-__blkdev_issue_zero_pages.patch \ ${PATCH_DIR}/z0003-block-factor-out-__blkdev_issue_zero_pages.patch \
${PATCH_DIR}/z0004-block-cope-with-WRITE-ZEROES-failing-in-blkdev_issue.patch \ ${PATCH_DIR}/z0004-block-cope-with-WRITE-ZEROES-failing-in-blkdev_issue.patch \
${PATCH_DIR}/z0005-tools-objtool-Makefile-Don-t-fail-on-fallthrough-wit.patch \ ${PATCH_DIR}/z0005-tools-objtool-Makefile-Don-t-fail-on-fallthrough-wit.patch \
${PATCH_DIR}/z0006-scsi-core-check-for-device-state-in-__scsi_remove_ta.patch \
" "

View File

@ -1,7 +1,7 @@
From 0fca0c005654446e06d4f0bd5ebd6da837f759fa Mon Sep 17 00:00:00 2001 From 0fca0c005654446e06d4f0bd5ebd6da837f759fa Mon Sep 17 00:00:00 2001
From: Vito Caputo <vito.caputo@coreos.com> From: Vito Caputo <vito.caputo@coreos.com>
Date: Wed, 25 Nov 2015 02:59:45 -0800 Date: Wed, 25 Nov 2015 02:59:45 -0800
Subject: [PATCH 1/5] kbuild: derive relative path for KBUILD_SRC from CURDIR Subject: [PATCH 1/6] kbuild: derive relative path for KBUILD_SRC from CURDIR
This enables relocating source and build trees to different roots, This enables relocating source and build trees to different roots,
provided they stay reachable relative to one another. Useful for provided they stay reachable relative to one another. Useful for

View File

@ -1,7 +1,7 @@
From f09f2ff8ea5d11d80aa01b79408ed16f8495695c Mon Sep 17 00:00:00 2001 From f09f2ff8ea5d11d80aa01b79408ed16f8495695c Mon Sep 17 00:00:00 2001
From: Geoff Levand <geoff@infradead.org> From: Geoff Levand <geoff@infradead.org>
Date: Fri, 11 Nov 2016 17:28:52 -0800 Date: Fri, 11 Nov 2016 17:28:52 -0800
Subject: [PATCH 2/5] Add arm64 coreos verity hash Subject: [PATCH 2/6] Add arm64 coreos verity hash
Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
--- ---

View File

@ -1,7 +1,7 @@
From 47ee25d1e40caddede4d112ed31981a75ac044a5 Mon Sep 17 00:00:00 2001 From 47ee25d1e40caddede4d112ed31981a75ac044a5 Mon Sep 17 00:00:00 2001
From: Ilya Dryomov <idryomov@gmail.com> From: Ilya Dryomov <idryomov@gmail.com>
Date: Mon, 16 Oct 2017 15:59:09 +0200 Date: Mon, 16 Oct 2017 15:59:09 +0200
Subject: [PATCH 3/5] block: factor out __blkdev_issue_zero_pages() Subject: [PATCH 3/6] block: factor out __blkdev_issue_zero_pages()
blkdev_issue_zeroout() will use this in !BLKDEV_ZERO_NOFALLBACK case. blkdev_issue_zeroout() will use this in !BLKDEV_ZERO_NOFALLBACK case.

View File

@ -1,7 +1,7 @@
From e5118a5a1f0c2d93b031c0abf052796cac467abf Mon Sep 17 00:00:00 2001 From e5118a5a1f0c2d93b031c0abf052796cac467abf Mon Sep 17 00:00:00 2001
From: Ilya Dryomov <idryomov@gmail.com> From: Ilya Dryomov <idryomov@gmail.com>
Date: Mon, 16 Oct 2017 15:59:10 +0200 Date: Mon, 16 Oct 2017 15:59:10 +0200
Subject: [PATCH 4/5] block: cope with WRITE ZEROES failing in Subject: [PATCH 4/6] block: cope with WRITE ZEROES failing in
blkdev_issue_zeroout() blkdev_issue_zeroout()
sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to

View File

@ -1,7 +1,7 @@
From 2d24ec4d7da24bcf2d54cafd9629ee7ec6215c11 Mon Sep 17 00:00:00 2001 From 2d24ec4d7da24bcf2d54cafd9629ee7ec6215c11 Mon Sep 17 00:00:00 2001
From: David Michael <david.michael@coreos.com> From: David Michael <david.michael@coreos.com>
Date: Thu, 8 Feb 2018 21:23:12 -0500 Date: Thu, 8 Feb 2018 21:23:12 -0500
Subject: [PATCH 5/5] tools/objtool/Makefile: Don't fail on fallthrough with Subject: [PATCH 5/6] tools/objtool/Makefile: Don't fail on fallthrough with
new GCCs new GCCs
--- ---

View File

@ -0,0 +1,40 @@
From 0767c48172ef761cffa22929298ec900be8aba4a Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 13 Dec 2017 14:21:37 +0100
Subject: [PATCH 6/6] scsi: core: check for device state in
__scsi_remove_target()
As it turned out device_get() doesn't use kref_get_unless_zero(), so we
will be always getting a device pointer. Consequently, we need to check
for the device state in __scsi_remove_target() to avoid tripping over
deleted objects.
Fixes: fbce4d97fd43 ("scsi: fixup kernel warning during rmmod()")
Reported-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
drivers/scsi/scsi_sysfs.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index f796bd61f3f0..40406c162d0d 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -1383,7 +1383,10 @@ static void __scsi_remove_target(struct scsi_target *starget)
* check.
*/
if (sdev->channel != starget->channel ||
- sdev->id != starget->id ||
+ sdev->id != starget->id)
+ continue;
+ if (sdev->sdev_state == SDEV_DEL ||
+ sdev->sdev_state == SDEV_CANCEL ||
!get_device(&sdev->sdev_gendev))
continue;
spin_unlock_irqrestore(shost->host_lock, flags);
--
2.14.3