Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2018-10-02 08:33:51 +0200
committerMichal Kubecek <mkubecek@suse.cz>2018-10-02 08:43:37 +0200
commit82521a6a07422516478b7d3154435b628daaa12d (patch)
tree066bb0fd26ef0a04783fdf41c86a7802d3fcaa82
parent1bae024c946891c4f3d8ca2634f220631c35fa47 (diff)
dm-mpath: do not try to access NULL rq (bsc#1110337).rpm-4.4.156-94.57
-rw-r--r--patches.fixes/dm-mpath-do-not-try-to-access-NULL-rq.patch35
-rw-r--r--series.conf1
2 files changed, 36 insertions, 0 deletions
diff --git a/patches.fixes/dm-mpath-do-not-try-to-access-NULL-rq.patch b/patches.fixes/dm-mpath-do-not-try-to-access-NULL-rq.patch
new file mode 100644
index 0000000000..b07b862c31
--- /dev/null
+++ b/patches.fixes/dm-mpath-do-not-try-to-access-NULL-rq.patch
@@ -0,0 +1,35 @@
+From: Hannes Reinecke <hare@suse.de>
+Date: Tue, 2 Oct 2018 08:25:57 +0200
+Subject: [PATCH] dm-mpath: do not try to access NULL rq
+References: bsc#1110337
+Patch-Mainline: no, SLE12-SP3 specific
+
+When checking existing cmd_flags we should first check if we have
+a request to look at in the first place.
+
+Signed-off-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/md/dm-mpath.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
+index b2a7c7e0ed0e..6d116deb2ba4 100644
+--- a/drivers/md/dm-mpath.c
++++ b/drivers/md/dm-mpath.c
+@@ -561,8 +561,11 @@ static int __multipath_map(struct dm_target *ti, struct request *clone,
+ */
+ clone->q = bdev_get_queue(bdev);
+ clone->rq_disk = bdev->bd_disk;
+- clone->cmd_flags = rq->cmd_flags | REQ_NOMERGE;
+- clone->cmd_flags |= REQ_FAILFAST_TRANSPORT;
++ if (rq)
++ clone->cmd_flags = rq->cmd_flags;
++ else
++ clone->cmd_flags = 0;
++ clone->cmd_flags |= REQ_NOMERGE | REQ_FAILFAST_TRANSPORT;
+ } else {
+ /*
+ * blk-mq request-based interface; used by both:
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 59e4ea72e7..38ecbcf7b9 100644
--- a/series.conf
+++ b/series.conf
@@ -20344,6 +20344,7 @@
patches.drivers/dm-mpath-do-not-lock-up-a-CPU-with-requeuing-activit.patch
patches.suse/dm-Always-copy-cmd_flags-when-cloning-a-request.patch
+ patches.fixes/dm-mpath-do-not-try-to-access-NULL-rq.patch
# bsc#1078609
patches.fixes/0001-md-raid1-Use-a-new-variable-to-count-flighting-sync-.patch
patches.fixes/0002-md-document-lifetime-of-internal-rdev-pointer.patch