]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Jun 2017 07:28:53 +0000 (09:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Jun 2017 07:28:53 +0000 (09:28 +0200)
added patches:
call-echo-service-immediately-after-socket-reconnect.patch
partitions-msdos-freebsd-ufs2-file-systems-are-not-recognized.patch
s390-vmem-fix-identity-mapping.patch

queue-3.18/call-echo-service-immediately-after-socket-reconnect.patch [new file with mode: 0644]
queue-3.18/partitions-msdos-freebsd-ufs2-file-systems-are-not-recognized.patch [new file with mode: 0644]
queue-3.18/s390-vmem-fix-identity-mapping.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/call-echo-service-immediately-after-socket-reconnect.patch b/queue-3.18/call-echo-service-immediately-after-socket-reconnect.patch
new file mode 100644 (file)
index 0000000..ba88d63
--- /dev/null
@@ -0,0 +1,74 @@
+From b8c600120fc87d53642476f48c8055b38d6e14c7 Mon Sep 17 00:00:00 2001
+From: Sachin Prabhu <sprabhu@redhat.com>
+Date: Thu, 20 Oct 2016 19:52:24 -0400
+Subject: Call echo service immediately after socket reconnect
+
+From: Sachin Prabhu <sprabhu@redhat.com>
+
+commit b8c600120fc87d53642476f48c8055b38d6e14c7 upstream.
+
+Commit 4fcd1813e640 ("Fix reconnect to not defer smb3 session reconnect
+long after socket reconnect") changes the behaviour of the SMB2 echo
+service and causes it to renegotiate after a socket reconnect. However
+under default settings, the echo service could take up to 120 seconds to
+be scheduled.
+
+The patch forces the echo service to be called immediately resulting a
+negotiate call being made immediately on reconnect.
+
+Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
+Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
+Signed-off-by: Steve French <smfrench@gmail.com>
+Acked-by: Sachin Prabhu <sprabhu@redhat.com>
+Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/cifs/connect.c |   24 ++++++++++++++++++------
+ 1 file changed, 18 insertions(+), 6 deletions(-)
+
+--- a/fs/cifs/connect.c
++++ b/fs/cifs/connect.c
+@@ -400,6 +400,9 @@ cifs_reconnect(struct TCP_Server_Info *s
+               mutex_unlock(&server->srv_mutex);
+       } while (server->tcpStatus == CifsNeedReconnect);
++      if (server->tcpStatus == CifsNeedNegotiate)
++              mod_delayed_work(cifsiod_wq, &server->echo, 0);
++
+       return rc;
+ }
+@@ -409,18 +412,27 @@ cifs_echo_request(struct work_struct *wo
+       int rc;
+       struct TCP_Server_Info *server = container_of(work,
+                                       struct TCP_Server_Info, echo.work);
++      unsigned long echo_interval;
++
++      /*
++       * If we need to renegotiate, set echo interval to zero to
++       * immediately call echo service where we can renegotiate.
++       */
++      if (server->tcpStatus == CifsNeedNegotiate)
++              echo_interval = 0;
++      else
++              echo_interval = SMB_ECHO_INTERVAL;
+       /*
+-       * We cannot send an echo if it is disabled or until the
+-       * NEGOTIATE_PROTOCOL request is done, which is indicated by
+-       * server->ops->need_neg() == true. Also, no need to ping if
+-       * we got a response recently.
++       * We cannot send an echo if it is disabled.
++       * Also, no need to ping if we got a response recently.
+        */
+       if (server->tcpStatus == CifsNeedReconnect ||
+-          server->tcpStatus == CifsExiting || server->tcpStatus == CifsNew ||
++          server->tcpStatus == CifsExiting ||
++          server->tcpStatus == CifsNew ||
+           (server->ops->can_echo && !server->ops->can_echo(server)) ||
+-          time_before(jiffies, server->lstrp + SMB_ECHO_INTERVAL - HZ))
++          time_before(jiffies, server->lstrp + echo_interval - HZ))
+               goto requeue_echo;
+       rc = server->ops->echo ? server->ops->echo(server) : -ENOSYS;
diff --git a/queue-3.18/partitions-msdos-freebsd-ufs2-file-systems-are-not-recognized.patch b/queue-3.18/partitions-msdos-freebsd-ufs2-file-systems-are-not-recognized.patch
new file mode 100644 (file)
index 0000000..be51bc1
--- /dev/null
@@ -0,0 +1,44 @@
+From 223220356d5ebc05ead9a8d697abb0c0a906fc81 Mon Sep 17 00:00:00 2001
+From: Richard <richard@aaazen.com>
+Date: Sun, 21 May 2017 12:27:00 -0700
+Subject: partitions/msdos: FreeBSD UFS2 file systems are not recognized
+
+From: Richard <richard@aaazen.com>
+
+commit 223220356d5ebc05ead9a8d697abb0c0a906fc81 upstream.
+
+The code in block/partitions/msdos.c recognizes FreeBSD, OpenBSD
+and NetBSD partitions and does a reasonable job picking out OpenBSD
+and NetBSD UFS subpartitions.
+
+But for FreeBSD the subpartitions are always "bad".
+
+    Kernel: <bsd:bad subpartition - ignored
+
+Though all 3 of these BSD systems use UFS as a file system, only
+FreeBSD uses relative start addresses in the subpartition
+declarations.
+
+The following patch fixes this for FreeBSD partitions and leaves
+the code for OpenBSD and NetBSD intact:
+
+Signed-off-by: Richard Narron <comet.berkeley@gmail.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Jens Axboe <axboe@fb.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ block/partitions/msdos.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/block/partitions/msdos.c
++++ b/block/partitions/msdos.c
+@@ -300,6 +300,8 @@ static void parse_bsd(struct parsed_part
+                       continue;
+               bsd_start = le32_to_cpu(p->p_offset);
+               bsd_size = le32_to_cpu(p->p_size);
++              if (memcmp(flavour, "bsd\0", 4) == 0)
++                      bsd_start += offset;
+               if (offset == bsd_start && size == bsd_size)
+                       /* full parent partition, we have it already */
+                       continue;
diff --git a/queue-3.18/s390-vmem-fix-identity-mapping.patch b/queue-3.18/s390-vmem-fix-identity-mapping.patch
new file mode 100644 (file)
index 0000000..8832394
--- /dev/null
@@ -0,0 +1,47 @@
+From c34a69059d7876e0793eb410deedfb08ccb22b02 Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Date: Tue, 10 May 2016 12:10:22 +0200
+Subject: s390/vmem: fix identity mapping
+
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+
+commit c34a69059d7876e0793eb410deedfb08ccb22b02 upstream.
+
+The identity mapping is suboptimal for the last 2GB frame. The mapping
+will be established with a mix of 4KB and 1MB mappings instead of a
+single 2GB mapping.
+
+This happens because of a off-by-one bug introduced with
+commit 50be63450728 ("s390/mm: Convert bootmem to memblock").
+
+Currently the identity mapping looks like this:
+
+0x0000000080000000-0x0000000180000000        4G PUD RW
+0x0000000180000000-0x00000001fff00000     2047M PMD RW
+0x00000001fff00000-0x0000000200000000        1M PTE RW
+
+With the bug fixed it looks like this:
+
+0x0000000080000000-0x0000000200000000        6G PUD RW
+
+Fixes: 50be63450728 ("s390/mm: Convert bootmem to memblock")
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Cc: Jean Delvare <jdelvare@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/s390/mm/vmem.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/s390/mm/vmem.c
++++ b/arch/s390/mm/vmem.c
+@@ -378,7 +378,7 @@ void __init vmem_map_init(void)
+       ro_end = (unsigned long)&_eshared & PAGE_MASK;
+       for_each_memblock(memory, reg) {
+               start = reg->base;
+-              end = reg->base + reg->size - 1;
++              end = reg->base + reg->size;
+               if (start >= ro_end || end <= ro_start)
+                       vmem_add_mem(start, end - start, 0);
+               else if (start >= ro_start && end <= ro_end)
index 92a611005bacce5203839a22950a1f58d57c5854..ec4d0d856a816cbfc7ca406724ea58b835673b1e 100644 (file)
@@ -1 +1,3 @@
 s390-vmem-fix-identity-mapping.patch
+partitions-msdos-freebsd-ufs2-file-systems-are-not-recognized.patch
+call-echo-service-immediately-after-socket-reconnect.patch