]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jul 2017 07:25:44 +0000 (09:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jul 2017 07:25:44 +0000 (09:25 +0200)
added patches:
xen-blkback-don-t-use-xen_blkif_get-in-xen-blkback-kthread.patch

queue-4.11/series
queue-4.11/xen-blkback-don-t-use-xen_blkif_get-in-xen-blkback-kthread.patch [new file with mode: 0644]

index af20690607296e3eafd92e7395170d08db490acd..f5337f2f91eedc17f7247dded7c1164731e3e03f 100644 (file)
@@ -32,3 +32,4 @@ ipv6-do-not-leak-throw-route-references.patch
 rtnetlink-add-ifla_group-to-ifla_policy.patch
 netfilter-synproxy-fix-conntrackd-interaction.patch
 nfsv4.x-callback-create-the-callback-service-through-svc_create_pooled.patch
+xen-blkback-don-t-use-xen_blkif_get-in-xen-blkback-kthread.patch
diff --git a/queue-4.11/xen-blkback-don-t-use-xen_blkif_get-in-xen-blkback-kthread.patch b/queue-4.11/xen-blkback-don-t-use-xen_blkif_get-in-xen-blkback-kthread.patch
new file mode 100644 (file)
index 0000000..82186e6
--- /dev/null
@@ -0,0 +1,61 @@
+From a24fa22ce22ae302b3bf8f7008896d52d5d57b8d Mon Sep 17 00:00:00 2001
+From: Juergen Gross <jgross@suse.com>
+Date: Thu, 18 May 2017 17:28:49 +0200
+Subject: xen/blkback: don't use xen_blkif_get() in xen-blkback kthread
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Juergen Gross <jgross@suse.com>
+
+commit a24fa22ce22ae302b3bf8f7008896d52d5d57b8d upstream.
+
+There is no need to use xen_blkif_get()/xen_blkif_put() in the kthread
+of xen-blkback. Thread stopping is synchronous and using the blkif
+reference counting in the kthread will avoid to ever let the reference
+count drop to zero at the end of an I/O running concurrent to
+disconnecting and multiple rings.
+
+Setting ring->xenblkd to NULL after stopping the kthread isn't needed
+as the kthread does this already.
+
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Tested-by: Steven Haigh <netwiz@crc.id.au>
+Acked-by: Roger Pau MonnĂ© <roger.pau@citrix.com>
+Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/block/xen-blkback/blkback.c |    3 ---
+ drivers/block/xen-blkback/xenbus.c  |    1 -
+ 2 files changed, 4 deletions(-)
+
+--- a/drivers/block/xen-blkback/blkback.c
++++ b/drivers/block/xen-blkback/blkback.c
+@@ -609,8 +609,6 @@ int xen_blkif_schedule(void *arg)
+       unsigned long timeout;
+       int ret;
+-      xen_blkif_get(blkif);
+-
+       set_freezable();
+       while (!kthread_should_stop()) {
+               if (try_to_freeze())
+@@ -665,7 +663,6 @@ purge_gnt_list:
+               print_stats(ring);
+       ring->xenblkd = NULL;
+-      xen_blkif_put(blkif);
+       return 0;
+ }
+--- a/drivers/block/xen-blkback/xenbus.c
++++ b/drivers/block/xen-blkback/xenbus.c
+@@ -255,7 +255,6 @@ static int xen_blkif_disconnect(struct x
+               if (ring->xenblkd) {
+                       kthread_stop(ring->xenblkd);
+                       wake_up(&ring->shutdown_wq);
+-                      ring->xenblkd = NULL;
+               }
+               /* The above kthread_stop() guarantees that at this point we