]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2017 22:32:36 +0000 (15:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2017 22:32:36 +0000 (15:32 -0700)
added patches:
alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch
arm64-mm-fix-show_pte-kern_cont-fallout.patch
asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch
hid-ignore-petzl-usb-headlamp.patch
nvmem-imx-ocotp-fix-wrong-register-size.patch
perf-symbols-robustify-reading-of-build-id-from-sysfs.patch
perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch
scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch
scsi-snic-return-error-code-on-memory-allocation-failure.patch
sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch
vfio-pci-handle-error-from-pci_iomap.patch
video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch

13 files changed:
queue-4.4/alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch [new file with mode: 0644]
queue-4.4/arm64-mm-fix-show_pte-kern_cont-fallout.patch [new file with mode: 0644]
queue-4.4/asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch [new file with mode: 0644]
queue-4.4/hid-ignore-petzl-usb-headlamp.patch [new file with mode: 0644]
queue-4.4/nvmem-imx-ocotp-fix-wrong-register-size.patch [new file with mode: 0644]
queue-4.4/perf-symbols-robustify-reading-of-build-id-from-sysfs.patch [new file with mode: 0644]
queue-4.4/perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch [new file with mode: 0644]
queue-4.4/scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch [new file with mode: 0644]
queue-4.4/scsi-snic-return-error-code-on-memory-allocation-failure.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch [new file with mode: 0644]
queue-4.4/vfio-pci-handle-error-from-pci_iomap.patch [new file with mode: 0644]
queue-4.4/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch [new file with mode: 0644]

diff --git a/queue-4.4/alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch b/queue-4.4/alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch
new file mode 100644 (file)
index 0000000..98efb19
--- /dev/null
@@ -0,0 +1,35 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Ioan-Adrian Ratiu <adi@adirat.com>
+Date: Thu, 5 Jan 2017 00:37:47 +0200
+Subject: ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion
+
+From: Ioan-Adrian Ratiu <adi@adirat.com>
+
+
+[ Upstream commit 13a6c8328e6056932dc680e447d4c5e8ad9add17 ]
+
+Testing EP_FLAG_RUNNING in snd_complete_urb() before running the completion
+logic allows us to save a few cpu cycles by returning early, skipping the
+pending urb in case the stream was stopped; the stop logic handles the urb
+and sets the completion callbacks to NULL.
+
+Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/endpoint.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/sound/usb/endpoint.c
++++ b/sound/usb/endpoint.c
+@@ -384,6 +384,9 @@ static void snd_complete_urb(struct urb
+       if (unlikely(atomic_read(&ep->chip->shutdown)))
+               goto exit_clear;
++      if (unlikely(!test_bit(EP_FLAG_RUNNING, &ep->flags)))
++              goto exit_clear;
++
+       if (usb_pipeout(ep->pipe)) {
+               retire_outbound_urb(ep, ctx);
+               /* can be stopped during retire callback */
diff --git a/queue-4.4/arm64-mm-fix-show_pte-kern_cont-fallout.patch b/queue-4.4/arm64-mm-fix-show_pte-kern_cont-fallout.patch
new file mode 100644 (file)
index 0000000..de684d4
--- /dev/null
@@ -0,0 +1,61 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Mark Rutland <mark.rutland@arm.com>
+Date: Tue, 3 Jan 2017 14:27:26 +0000
+Subject: arm64: mm: fix show_pte KERN_CONT fallout
+
+From: Mark Rutland <mark.rutland@arm.com>
+
+
+[ Upstream commit 6ef4fb387d50fa8f3bffdffc868b57e981cdd709 ]
+
+Recent changes made KERN_CONT mandatory for continued lines. In the
+absence of KERN_CONT, a newline may be implicit inserted by the core
+printk code.
+
+In show_pte, we (erroneously) use printk without KERN_CONT for continued
+prints, resulting in output being split across a number of lines, and
+not matching the intended output, e.g.
+
+[ff000000000000] *pgd=00000009f511b003
+, *pud=00000009f4a80003
+, *pmd=0000000000000000
+
+Fix this by using pr_cont() for all the continuations.
+
+Acked-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Mark Rutland <mark.rutland@arm.com>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/mm/fault.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/arm64/mm/fault.c
++++ b/arch/arm64/mm/fault.c
+@@ -66,21 +66,21 @@ void show_pte(struct mm_struct *mm, unsi
+                       break;
+               pud = pud_offset(pgd, addr);
+-              printk(", *pud=%016llx", pud_val(*pud));
++              pr_cont(", *pud=%016llx", pud_val(*pud));
+               if (pud_none(*pud) || pud_bad(*pud))
+                       break;
+               pmd = pmd_offset(pud, addr);
+-              printk(", *pmd=%016llx", pmd_val(*pmd));
++              pr_cont(", *pmd=%016llx", pmd_val(*pmd));
+               if (pmd_none(*pmd) || pmd_bad(*pmd))
+                       break;
+               pte = pte_offset_map(pmd, addr);
+-              printk(", *pte=%016llx", pte_val(*pte));
++              pr_cont(", *pte=%016llx", pte_val(*pte));
+               pte_unmap(pte);
+       } while(0);
+-      printk("\n");
++      pr_cont("\n");
+ }
+ #ifdef CONFIG_ARM64_HW_AFDBM
diff --git a/queue-4.4/asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch b/queue-4.4/asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch
new file mode 100644 (file)
index 0000000..7dde650
--- /dev/null
@@ -0,0 +1,39 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Patrick Lai <plai@codeaurora.org>
+Date: Sat, 31 Dec 2016 22:44:39 -0800
+Subject: ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
+
+From: Patrick Lai <plai@codeaurora.org>
+
+
+[ Upstream commit 9f169b9f52a4afccdab7a7d2311b0c53a78a1e6b ]
+
+When multiple front-ends are using the same back-end, putting state of a
+front-end to STOP state upon receiving pause command will result in backend
+stream getting released by DPCM framework unintentionally. In order to
+avoid backend to be released when another active front-end stream is
+present, put the stream state to PAUSED state instead of STOP state.
+
+Signed-off-by: Patrick Lai <plai@codeaurora.org>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/soc-pcm.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/sound/soc/soc-pcm.c
++++ b/sound/soc/soc-pcm.c
+@@ -2073,9 +2073,11 @@ static int dpcm_fe_dai_do_trigger(struct
+               break;
+       case SNDRV_PCM_TRIGGER_STOP:
+       case SNDRV_PCM_TRIGGER_SUSPEND:
+-      case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+               fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP;
+               break;
++      case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
++              fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED;
++              break;
+       }
+ out:
diff --git a/queue-4.4/hid-ignore-petzl-usb-headlamp.patch b/queue-4.4/hid-ignore-petzl-usb-headlamp.patch
new file mode 100644 (file)
index 0000000..189e226
--- /dev/null
@@ -0,0 +1,44 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Jiri Kosina <jkosina@suse.cz>
+Date: Thu, 5 Jan 2017 14:25:59 +0100
+Subject: HID: ignore Petzl USB headlamp
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+
+[ Upstream commit 08f9572671c8047e7234cbf150869aa3c3d59a97 ]
+
+This headlamp contains a dummy HID descriptor which pretends to be
+a mouse-like device, but can't be used as a mouse at all.
+
+Reported-by: Lukas Ocilka <lukas.ocilka@suse.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hid/hid-core.c |    1 +
+ drivers/hid/hid-ids.h  |    3 +++
+ 2 files changed, 4 insertions(+)
+
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -2427,6 +2427,7 @@ static const struct hid_device_id hid_ig
+       { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0002) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0003) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0004) },
++      { HID_USB_DEVICE(USB_VENDOR_ID_PETZL, USB_DEVICE_ID_PETZL_HEADLAMP) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_POWERCOM, USB_DEVICE_ID_POWERCOM_UPS) },
+ #if defined(CONFIG_MOUSE_SYNAPTICS_USB) || defined(CONFIG_MOUSE_SYNAPTICS_USB_MODULE)
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -777,6 +777,9 @@
+ #define USB_VENDOR_ID_PETALYNX                0x18b1
+ #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE  0x0037
++#define USB_VENDOR_ID_PETZL           0x2122
++#define USB_DEVICE_ID_PETZL_HEADLAMP  0x1234
++
+ #define USB_VENDOR_ID_PHILIPS         0x0471
+ #define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
diff --git a/queue-4.4/nvmem-imx-ocotp-fix-wrong-register-size.patch b/queue-4.4/nvmem-imx-ocotp-fix-wrong-register-size.patch
new file mode 100644 (file)
index 0000000..ddcf66c
--- /dev/null
@@ -0,0 +1,45 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Daniel Schultz <d.schultz@phytec.de>
+Date: Wed, 4 Jan 2017 16:18:10 +0000
+Subject: nvmem: imx-ocotp: Fix wrong register size
+
+From: Daniel Schultz <d.schultz@phytec.de>
+
+
+[ Upstream commit 14ba972842f9e84e6d3264bc0302101b8a792288 ]
+
+All i.MX6 SoCs have an OCOTP Controller with 4kbit fuses. The i.MX6SL is
+an exception and has only 2kbit fuses.
+
+In the TRM for the i.MX6DQ (IMX6QDRM - Rev 2, 06/2014) the fuses size is
+described in chapter 46.1.1 with:
+"32-bit word restricted program and read to 4Kbits of eFuse OTP(512x8)."
+
+In the TRM for the i.MX6SL (IMX6SLRM - Rev 2, 06/2015) the fuses size is
+described in chapter 34.1.1 with:
+"32-bit word restricted program and read to 2 kbit of eFuse OTP(128x8)."
+
+Since the Freescale Linux kernel OCOTP driver works with a fuses size of
+2 kbit for the i.MX6SL, it looks like the TRM is wrong and the formula
+to calculate the correct fuses size has to be 256x8.
+
+Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvmem/imx-ocotp.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/nvmem/imx-ocotp.c
++++ b/drivers/nvmem/imx-ocotp.c
+@@ -88,7 +88,7 @@ static struct nvmem_config imx_ocotp_nvm
+ static const struct of_device_id imx_ocotp_dt_ids[] = {
+       { .compatible = "fsl,imx6q-ocotp",  (void *)128 },
+-      { .compatible = "fsl,imx6sl-ocotp", (void *)32 },
++      { .compatible = "fsl,imx6sl-ocotp", (void *)64 },
+       { .compatible = "fsl,imx6sx-ocotp", (void *)128 },
+       { },
+ };
diff --git a/queue-4.4/perf-symbols-robustify-reading-of-build-id-from-sysfs.patch b/queue-4.4/perf-symbols-robustify-reading-of-build-id-from-sysfs.patch
new file mode 100644 (file)
index 0000000..a820ab9
--- /dev/null
@@ -0,0 +1,44 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+Date: Tue, 3 Jan 2017 15:19:21 -0300
+Subject: perf symbols: Robustify reading of build-id from sysfs
+
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+
+
+[ Upstream commit 7934c98a6e04028eb34c1293bfb5a6b0ab630b66 ]
+
+Markus reported that perf segfaults when reading /sys/kernel/notes from
+a kernel linked with GNU gold, due to what looks like a gold bug, so do
+some bounds checking to avoid crashing in that case.
+
+Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
+Report-Link: http://lkml.kernel.org/r/20161219161821.GA294@x4
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: David Ahern <dsahern@gmail.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Wang Nan <wangnan0@huawei.com>
+Link: http://lkml.kernel.org/n/tip-ryhgs6a6jxvz207j2636w31c@git.kernel.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/perf/util/symbol-elf.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/tools/perf/util/symbol-elf.c
++++ b/tools/perf/util/symbol-elf.c
+@@ -488,6 +488,12 @@ int sysfs__read_build_id(const char *fil
+                               break;
+               } else {
+                       int n = namesz + descsz;
++
++                      if (n > (int)sizeof(bf)) {
++                              n = sizeof(bf);
++                              pr_debug("%s: truncating reading of build id in sysfs file %s: n_namesz=%u, n_descsz=%u.\n",
++                                       __func__, filename, nhdr.n_namesz, nhdr.n_descsz);
++                      }
+                       if (read(fd, bf, n) != n)
+                               break;
+               }
diff --git a/queue-4.4/perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch b/queue-4.4/perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch
new file mode 100644 (file)
index 0000000..791a143
--- /dev/null
@@ -0,0 +1,43 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+Date: Tue, 3 Jan 2017 12:03:59 -0300
+Subject: perf tools: Install tools/lib/traceevent plugins with install-bin
+
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+
+
+[ Upstream commit 30a9c6444810429aa2b7cbfbd453ce339baaadbf ]
+
+Those are binaries as well, so should be installed by:
+
+  make -C tools/perf install-bin'
+
+too.
+
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Steven Rostedt <rostedt@goodmis.org>
+Link: http://lkml.kernel.org/n/tip-3841b37u05evxrs1igkyu6ks@git.kernel.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/perf/Makefile.perf |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tools/perf/Makefile.perf
++++ b/tools/perf/Makefile.perf
+@@ -563,9 +563,9 @@ install-tests: all install-gtk
+               $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \
+               $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'
+-install-bin: install-tools install-tests
++install-bin: install-tools install-tests install-traceevent-plugins
+-install: install-bin try-install-man install-traceevent-plugins
++install: install-bin try-install-man
+ install-python_ext:
+       $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
diff --git a/queue-4.4/scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch b/queue-4.4/scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch
new file mode 100644 (file)
index 0000000..99c048b
--- /dev/null
@@ -0,0 +1,65 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Satish Kharat <satishkh@cisco.com>
+Date: Wed, 14 Dec 2016 13:20:41 -0800
+Subject: scsi: fnic: Avoid sending reset to firmware when another reset is in progress
+
+From: Satish Kharat <satishkh@cisco.com>
+
+
+[ Upstream commit 9698b6f473555a722bf81a3371998427d5d27bde ]
+
+This fix is to avoid calling fnic_fw_reset_handler through
+fnic_host_reset when a finc reset is alreay in progress.
+
+Signed-off-by: Satish Kharat <satishkh@cisco.com>
+Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/fnic/fnic.h      |    1 +
+ drivers/scsi/fnic/fnic_scsi.c |   16 ++++++++++++++++
+ 2 files changed, 17 insertions(+)
+
+--- a/drivers/scsi/fnic/fnic.h
++++ b/drivers/scsi/fnic/fnic.h
+@@ -248,6 +248,7 @@ struct fnic {
+       struct completion *remove_wait; /* device remove thread blocks */
+       atomic_t in_flight;             /* io counter */
++      bool internal_reset_inprogress;
+       u32 _reserved;                  /* fill hole */
+       unsigned long state_flags;      /* protected by host lock */
+       enum fnic_state state;
+--- a/drivers/scsi/fnic/fnic_scsi.c
++++ b/drivers/scsi/fnic/fnic_scsi.c
+@@ -2533,6 +2533,19 @@ int fnic_host_reset(struct scsi_cmnd *sc
+       unsigned long wait_host_tmo;
+       struct Scsi_Host *shost = sc->device->host;
+       struct fc_lport *lp = shost_priv(shost);
++      struct fnic *fnic = lport_priv(lp);
++      unsigned long flags;
++
++      spin_lock_irqsave(&fnic->fnic_lock, flags);
++      if (fnic->internal_reset_inprogress == 0) {
++              fnic->internal_reset_inprogress = 1;
++      } else {
++              spin_unlock_irqrestore(&fnic->fnic_lock, flags);
++              FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
++                      "host reset in progress skipping another host reset\n");
++              return SUCCESS;
++      }
++      spin_unlock_irqrestore(&fnic->fnic_lock, flags);
+       /*
+        * If fnic_reset is successful, wait for fabric login to complete
+@@ -2553,6 +2566,9 @@ int fnic_host_reset(struct scsi_cmnd *sc
+               }
+       }
++      spin_lock_irqsave(&fnic->fnic_lock, flags);
++      fnic->internal_reset_inprogress = 0;
++      spin_unlock_irqrestore(&fnic->fnic_lock, flags);
+       return ret;
+ }
diff --git a/queue-4.4/scsi-snic-return-error-code-on-memory-allocation-failure.patch b/queue-4.4/scsi-snic-return-error-code-on-memory-allocation-failure.patch
new file mode 100644 (file)
index 0000000..5156b60
--- /dev/null
@@ -0,0 +1,54 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Burak Ok <burak-kernel@bur0k.de>
+Date: Wed, 21 Dec 2016 14:45:53 +0100
+Subject: scsi: snic: Return error code on memory allocation failure
+
+From: Burak Ok <burak-kernel@bur0k.de>
+
+
+[ Upstream commit 0371adcdaca92912baaa3256ed13e058a016e62d ]
+
+If a call to mempool_create_slab_pool() in snic_probe() returns NULL,
+return -ENOMEM to indicate failure. mempool_creat_slab_pool() only fails
+if it cannot allocate memory.
+
+https://bugzilla.kernel.org/show_bug.cgi?id=189061
+
+Reported-by: bianpan2010@ruc.edu.cn
+Signed-off-by: Burak Ok <burak-kernel@bur0k.de>
+Signed-off-by: Andreas Schaertl <andreas.schaertl@fau.de>
+Acked-by: Narsimhulu Musini <nmusini@cisco.com>
+Reviewed-by: Ewan D. Milne <emilne@redhat.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/snic/snic_main.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/scsi/snic/snic_main.c
++++ b/drivers/scsi/snic/snic_main.c
+@@ -584,6 +584,7 @@ snic_probe(struct pci_dev *pdev, const s
+       if (!pool) {
+               SNIC_HOST_ERR(shost, "dflt sgl pool creation failed\n");
++              ret = -ENOMEM;
+               goto err_free_res;
+       }
+@@ -594,6 +595,7 @@ snic_probe(struct pci_dev *pdev, const s
+       if (!pool) {
+               SNIC_HOST_ERR(shost, "max sgl pool creation failed\n");
++              ret = -ENOMEM;
+               goto err_free_dflt_sgl_pool;
+       }
+@@ -604,6 +606,7 @@ snic_probe(struct pci_dev *pdev, const s
+       if (!pool) {
+               SNIC_HOST_ERR(shost, "snic tmreq info pool creation failed.\n");
++              ret = -ENOMEM;
+               goto err_free_max_sgl_pool;
+       }
index 2181ad0e9a3a892e5bf392343b922b0a5ec5e222..6c26e806c7be1fc4524445a12a40b3fb895385c5 100644 (file)
@@ -76,4 +76,16 @@ usb-gadget-fix-copy-pasted-error-message.patch
 btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch
 tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch
 xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch
+perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch
+perf-symbols-robustify-reading-of-build-id-from-sysfs.patch
+video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch
+vfio-pci-handle-error-from-pci_iomap.patch
+arm64-mm-fix-show_pte-kern_cont-fallout.patch
+nvmem-imx-ocotp-fix-wrong-register-size.patch
+sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch
+alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch
+hid-ignore-petzl-usb-headlamp.patch
+scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch
+scsi-snic-return-error-code-on-memory-allocation-failure.patch
+asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch
 btrfs-use-down_read_nested-to-make-lockdep-silent.patch
diff --git a/queue-4.4/sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch b/queue-4.4/sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch
new file mode 100644 (file)
index 0000000..7aafd0c
--- /dev/null
@@ -0,0 +1,33 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
+Date: Wed, 4 Jan 2017 23:10:23 +0300
+Subject: sh_eth: enable RX descriptor word 0 shift on SH7734
+
+From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
+
+
+[ Upstream commit 71eae1ca77fd6be218d8a952d97bba827e56516d ]
+
+The RX descriptor word 0 on SH7734 has the RFS[9:0] field in bits 16-25
+(bits  0-15 usually used for that are occupied by the packet checksum).
+Thus  we need to set the 'shift_rd0'  field in the SH7734 SoC data...
+
+Fixes: f0e81fecd4f8 ("net: sh_eth: Add support SH7734")
+Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/renesas/sh_eth.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/renesas/sh_eth.c
++++ b/drivers/net/ethernet/renesas/sh_eth.c
+@@ -750,6 +750,7 @@ static struct sh_eth_cpu_data sh7734_dat
+       .tsu            = 1,
+       .hw_crc         = 1,
+       .select_mii     = 1,
++      .shift_rd0      = 1,
+ };
+ /* SH7763 */
diff --git a/queue-4.4/vfio-pci-handle-error-from-pci_iomap.patch b/queue-4.4/vfio-pci-handle-error-from-pci_iomap.patch
new file mode 100644 (file)
index 0000000..65ce501
--- /dev/null
@@ -0,0 +1,34 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Arvind Yadav <arvind.yadav.cs@gmail.com>
+Date: Tue, 3 Jan 2017 17:26:46 +0530
+Subject: vfio-pci: Handle error from pci_iomap
+
+From: Arvind Yadav <arvind.yadav.cs@gmail.com>
+
+
+[ Upstream commit e19f32da5ded958238eac1bbe001192acef191a2 ]
+
+Here, pci_iomap can fail, handle this case release selected
+pci regions and return -ENOMEM.
+
+Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
+Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/vfio/pci/vfio_pci.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/vfio/pci/vfio_pci.c
++++ b/drivers/vfio/pci/vfio_pci.c
+@@ -902,6 +902,10 @@ static int vfio_pci_mmap(void *device_da
+                       return ret;
+               vdev->barmap[index] = pci_iomap(pdev, index, 0);
++              if (!vdev->barmap[index]) {
++                      pci_release_selected_regions(pdev, 1 << index);
++                      return -ENOMEM;
++              }
+       }
+       vma->vm_private_data = vdev;
diff --git a/queue-4.4/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch b/queue-4.4/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch
new file mode 100644 (file)
index 0000000..1dfb18d
--- /dev/null
@@ -0,0 +1,37 @@
+From foo@baz Fri Aug  4 15:30:20 PDT 2017
+From: Arvind Yadav <arvind.yadav.cs@gmail.com>
+Date: Tue, 13 Dec 2016 13:50:52 +0530
+Subject: video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap
+
+From: Arvind Yadav <arvind.yadav.cs@gmail.com>
+
+
+[ Upstream commit 4dcd19bfabaee8f9f4bcf203afba09b98ccbaf76 ]
+
+Here, If devm_ioremap will fail. It will return NULL.
+Kernel can run into a NULL-pointer dereference.
+This error check will avoid NULL pointer dereference.
+
+Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
+Acked-by: Yoichi Yuasa <yuasa@linux-mips.org>
+Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/video/fbdev/cobalt_lcdfb.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/video/fbdev/cobalt_lcdfb.c
++++ b/drivers/video/fbdev/cobalt_lcdfb.c
+@@ -350,6 +350,11 @@ static int cobalt_lcdfb_probe(struct pla
+       info->screen_size = resource_size(res);
+       info->screen_base = devm_ioremap(&dev->dev, res->start,
+                                        info->screen_size);
++      if (!info->screen_base) {
++              framebuffer_release(info);
++              return -ENOMEM;
++      }
++
+       info->fbops = &cobalt_lcd_fbops;
+       info->fix = cobalt_lcdfb_fix;
+       info->fix.smem_start = res->start;