]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Jul 2018 10:16:13 +0000 (12:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Jul 2018 10:16:13 +0000 (12:16 +0200)
added patches:
iw_cxgb4-correctly-enforce-the-max-reg_mr-depth.patch
tools-build-fix-escaping-in-.cmd-files-for-future-make.patch

queue-4.4/iw_cxgb4-correctly-enforce-the-max-reg_mr-depth.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/tools-build-fix-escaping-in-.cmd-files-for-future-make.patch [new file with mode: 0644]

diff --git a/queue-4.4/iw_cxgb4-correctly-enforce-the-max-reg_mr-depth.patch b/queue-4.4/iw_cxgb4-correctly-enforce-the-max-reg_mr-depth.patch
new file mode 100644 (file)
index 0000000..2292077
--- /dev/null
@@ -0,0 +1,35 @@
+From 7b72717a20bba8bdd01b14c0460be7d15061cd6b Mon Sep 17 00:00:00 2001
+From: Steve Wise <swise@opengridcomputing.com>
+Date: Thu, 21 Jun 2018 07:43:21 -0700
+Subject: iw_cxgb4: correctly enforce the max reg_mr depth
+
+From: Steve Wise <swise@opengridcomputing.com>
+
+commit 7b72717a20bba8bdd01b14c0460be7d15061cd6b upstream.
+
+The code was mistakenly using the length of the page array memory instead
+of the depth of the page array.
+
+This would cause MR creation to fail in some cases.
+
+Fixes: 8376b86de7d3 ("iw_cxgb4: Support the new memory registration API")
+Cc: stable@vger.kernel.org
+Signed-off-by: Steve Wise <swise@opengridcomputing.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/infiniband/hw/cxgb4/mem.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/infiniband/hw/cxgb4/mem.c
++++ b/drivers/infiniband/hw/cxgb4/mem.c
+@@ -926,7 +926,7 @@ static int c4iw_set_page(struct ib_mr *i
+ {
+       struct c4iw_mr *mhp = to_c4iw_mr(ibmr);
+-      if (unlikely(mhp->mpl_len == mhp->max_mpl_len))
++      if (unlikely(mhp->mpl_len == mhp->attr.pbl_size))
+               return -ENOMEM;
+       mhp->mpl[mhp->mpl_len++] = addr;
index 73859a6120edcbe72f17eb145be72978c1be0bac..397e3b71a8ae6ea376d15c317ce3531dd5cc1b2e 100644 (file)
@@ -11,3 +11,5 @@ usb-quirks-add-delay-quirks-for-corsair-strafe.patch
 xhci-xhci-mem-off-by-one-in-xhci_stream_id_to_ring.patch
 hid-usbhid-add-quirk-for-innomedia-innex-genesis-atari-adapter.patch
 fix-up-non-directory-creation-in-sgid-directories.patch
+tools-build-fix-escaping-in-.cmd-files-for-future-make.patch
+iw_cxgb4-correctly-enforce-the-max-reg_mr-depth.patch
diff --git a/queue-4.4/tools-build-fix-escaping-in-.cmd-files-for-future-make.patch b/queue-4.4/tools-build-fix-escaping-in-.cmd-files-for-future-make.patch
new file mode 100644 (file)
index 0000000..d9ad1df
--- /dev/null
@@ -0,0 +1,60 @@
+From 9feeb638cde083c737e295c0547f1b4f28e99583 Mon Sep 17 00:00:00 2001
+From: Paul Menzel <pmenzel@molgen.mpg.de>
+Date: Tue, 5 Jun 2018 19:00:22 +0200
+Subject: tools build: fix # escaping in .cmd files for future Make
+
+From: Paul Menzel <pmenzel@molgen.mpg.de>
+
+commit 9feeb638cde083c737e295c0547f1b4f28e99583 upstream.
+
+In 2016 GNU Make made a backwards incompatible change to the way '#'
+characters were handled in Makefiles when used inside functions or
+macros:
+
+http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b57
+
+Due to this change, when attempting to run `make prepare' I get a
+spurious make syntax error:
+
+    /home/earnest/linux/tools/objtool/.fixdep.o.cmd:1: *** missing separator.  Stop.
+
+When inspecting `.fixdep.o.cmd' it includes two lines which use
+unescaped comment characters at the top:
+
+    \# cannot find fixdep (/home/earnest/linux/tools/objtool//fixdep)
+    \# using basic dep data
+
+This is because `tools/build/Build.include' prints these '\#'
+characters:
+
+    printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
+    printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \
+
+This completes commit 9564a8cf422d ("Kbuild: fix # escaping in .cmd files
+for future Make").
+
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
+Cc: Randy Dunlap <rdunlap@infradead.org>
+Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+Cc: stable@vger.kernel.org
+Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/build/Build.include |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tools/build/Build.include
++++ b/tools/build/Build.include
+@@ -62,8 +62,8 @@ dep-cmd = $(if $(wildcard $(fixdep)),
+            $(fixdep) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;           \
+            rm -f $(depfile);                                                    \
+            mv -f $(dot-target).tmp $(dot-target).cmd,                           \
+-           printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
+-           printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \
++           printf '$(pound) cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
++           printf '$(pound) using basic dep data\n\n' >> $(dot-target).cmd;           \
+            cat $(depfile) >> $(dot-target).cmd;                                 \
+            printf '%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)