]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Jun 2017 07:29:47 +0000 (09:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Jun 2017 07:29:47 +0000 (09:29 +0200)
added patches:
netfilter-nf_conntrack_sip-fix-wrong-memory-initialisation.patch
partitions-msdos-freebsd-ufs2-file-systems-are-not-recognized.patch

queue-4.9/netfilter-nf_conntrack_sip-fix-wrong-memory-initialisation.patch [new file with mode: 0644]
queue-4.9/partitions-msdos-freebsd-ufs2-file-systems-are-not-recognized.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/netfilter-nf_conntrack_sip-fix-wrong-memory-initialisation.patch b/queue-4.9/netfilter-nf_conntrack_sip-fix-wrong-memory-initialisation.patch
new file mode 100644 (file)
index 0000000..45da550
--- /dev/null
@@ -0,0 +1,37 @@
+From da2f27e9e615d1c799c9582b15262458da61fddc Mon Sep 17 00:00:00 2001
+From: Christophe Leroy <christophe.leroy@c-s.fr>
+Date: Wed, 1 Mar 2017 15:33:26 +0100
+Subject: netfilter: nf_conntrack_sip: fix wrong memory initialisation
+
+From: Christophe Leroy <christophe.leroy@c-s.fr>
+
+commit da2f27e9e615d1c799c9582b15262458da61fddc upstream.
+
+In commit 82de0be6862cd ("netfilter: Add helper array
+register/unregister functions"),
+struct nf_conntrack_helper sip[MAX_PORTS][4] was changed to
+sip[MAX_PORTS * 4], so the memory init should have been changed to
+memset(&sip[4 * i], 0, 4 * sizeof(sip[i]));
+
+But as the sip[] table is allocated in the BSS, it is already set to 0
+
+Fixes: 82de0be6862cd ("netfilter: Add helper array register/unregister functions")
+Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/netfilter/nf_conntrack_sip.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/net/netfilter/nf_conntrack_sip.c
++++ b/net/netfilter/nf_conntrack_sip.c
+@@ -1630,8 +1630,6 @@ static int __init nf_conntrack_sip_init(
+               ports[ports_c++] = SIP_PORT;
+       for (i = 0; i < ports_c; i++) {
+-              memset(&sip[i], 0, sizeof(sip[i]));
+-
+               nf_ct_helper_init(&sip[4 * i], AF_INET, IPPROTO_UDP, "sip",
+                                 SIP_PORT, ports[i], i, sip_exp_policy,
+                                 SIP_EXPECT_MAX,
diff --git a/queue-4.9/partitions-msdos-freebsd-ufs2-file-systems-are-not-recognized.patch b/queue-4.9/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;
index 176b15e569e7a95080983675eae720acf814bf64..163d937f1158725091e7b7d2466ccc2f4a9e515d 100644 (file)
@@ -1,2 +1,4 @@
 pci-pm-add-needs_resume-flag-to-avoid-suspend-complete-optimization.patch
 drm-i915-prevent-the-system-suspend-complete-optimization.patch
+partitions-msdos-freebsd-ufs2-file-systems-are-not-recognized.patch
+netfilter-nf_conntrack_sip-fix-wrong-memory-initialisation.patch