From 675b717cb4a6fd07360dd13af59d76b7b52f41b9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 Aug 2017 15:32:36 -0700 Subject: [PATCH] 4.4-stable patches 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 --- ...st-ep_flag_running-at-urb-completion.patch | 35 ++++++++++ ...64-mm-fix-show_pte-kern_cont-fallout.patch | 61 +++++++++++++++++ ...ate-to-stop-when-fe-stream-is-paused.patch | 39 +++++++++++ queue-4.4/hid-ignore-petzl-usb-headlamp.patch | 44 +++++++++++++ ...em-imx-ocotp-fix-wrong-register-size.patch | 45 +++++++++++++ ...stify-reading-of-build-id-from-sysfs.patch | 44 +++++++++++++ ...-traceevent-plugins-with-install-bin.patch | 43 ++++++++++++ ...re-when-another-reset-is-in-progress.patch | 65 +++++++++++++++++++ ...or-code-on-memory-allocation-failure.patch | 54 +++++++++++++++ queue-4.4/series | 12 ++++ ...rx-descriptor-word-0-shift-on-sh7734.patch | 33 ++++++++++ ...vfio-pci-handle-error-from-pci_iomap.patch | 34 ++++++++++ ...-return-null-error-from-devm_ioremap.patch | 37 +++++++++++ 13 files changed, 546 insertions(+) create mode 100644 queue-4.4/alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch create mode 100644 queue-4.4/arm64-mm-fix-show_pte-kern_cont-fallout.patch create mode 100644 queue-4.4/asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch create mode 100644 queue-4.4/hid-ignore-petzl-usb-headlamp.patch create mode 100644 queue-4.4/nvmem-imx-ocotp-fix-wrong-register-size.patch create mode 100644 queue-4.4/perf-symbols-robustify-reading-of-build-id-from-sysfs.patch create mode 100644 queue-4.4/perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch create mode 100644 queue-4.4/scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch create mode 100644 queue-4.4/scsi-snic-return-error-code-on-memory-allocation-failure.patch create mode 100644 queue-4.4/sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch create mode 100644 queue-4.4/vfio-pci-handle-error-from-pci_iomap.patch create mode 100644 queue-4.4/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch 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 index 00000000000..98efb19a0b3 --- /dev/null +++ b/queue-4.4/alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch @@ -0,0 +1,35 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Ioan-Adrian Ratiu +Date: Thu, 5 Jan 2017 00:37:47 +0200 +Subject: ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion + +From: Ioan-Adrian Ratiu + + +[ 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 +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..de684d4b027 --- /dev/null +++ b/queue-4.4/arm64-mm-fix-show_pte-kern_cont-fallout.patch @@ -0,0 +1,61 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Mark Rutland +Date: Tue, 3 Jan 2017 14:27:26 +0000 +Subject: arm64: mm: fix show_pte KERN_CONT fallout + +From: Mark Rutland + + +[ 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 +Signed-off-by: Mark Rutland +Signed-off-by: Catalin Marinas +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..7dde650b5ad --- /dev/null +++ b/queue-4.4/asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch @@ -0,0 +1,39 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Patrick Lai +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 + + +[ 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 +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..189e2261523 --- /dev/null +++ b/queue-4.4/hid-ignore-petzl-usb-headlamp.patch @@ -0,0 +1,44 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Jiri Kosina +Date: Thu, 5 Jan 2017 14:25:59 +0100 +Subject: HID: ignore Petzl USB headlamp + +From: Jiri Kosina + + +[ 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 +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..ddcf66cd876 --- /dev/null +++ b/queue-4.4/nvmem-imx-ocotp-fix-wrong-register-size.patch @@ -0,0 +1,45 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Daniel Schultz +Date: Wed, 4 Jan 2017 16:18:10 +0000 +Subject: nvmem: imx-ocotp: Fix wrong register size + +From: Daniel Schultz + + +[ 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 +Signed-off-by: Srinivas Kandagatla +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..a820ab9d4e1 --- /dev/null +++ b/queue-4.4/perf-symbols-robustify-reading-of-build-id-from-sysfs.patch @@ -0,0 +1,44 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Arnaldo Carvalho de Melo +Date: Tue, 3 Jan 2017 15:19:21 -0300 +Subject: perf symbols: Robustify reading of build-id from sysfs + +From: Arnaldo Carvalho de Melo + + +[ 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 +Report-Link: http://lkml.kernel.org/r/20161219161821.GA294@x4 +Cc: Adrian Hunter +Cc: David Ahern +Cc: Jiri Olsa +Cc: Namhyung Kim +Cc: Wang Nan +Link: http://lkml.kernel.org/n/tip-ryhgs6a6jxvz207j2636w31c@git.kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..791a143ecd6 --- /dev/null +++ b/queue-4.4/perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch @@ -0,0 +1,43 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Arnaldo Carvalho de Melo +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 + + +[ Upstream commit 30a9c6444810429aa2b7cbfbd453ce339baaadbf ] + +Those are binaries as well, so should be installed by: + + make -C tools/perf install-bin' + +too. + +Cc: Alexander Shishkin +Cc: Daniel Bristot de Oliveira +Cc: Jiri Olsa +Cc: Peter Zijlstra +Cc: Steven Rostedt +Link: http://lkml.kernel.org/n/tip-3841b37u05evxrs1igkyu6ks@git.kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..99c048b978f --- /dev/null +++ b/queue-4.4/scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch @@ -0,0 +1,65 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Satish Kharat +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 + + +[ 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 +Signed-off-by: Sesidhar Baddela +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..5156b60df32 --- /dev/null +++ b/queue-4.4/scsi-snic-return-error-code-on-memory-allocation-failure.patch @@ -0,0 +1,54 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Burak Ok +Date: Wed, 21 Dec 2016 14:45:53 +0100 +Subject: scsi: snic: Return error code on memory allocation failure + +From: Burak Ok + + +[ 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 +Signed-off-by: Andreas Schaertl +Acked-by: Narsimhulu Musini +Reviewed-by: Ewan D. Milne +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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; + } + diff --git a/queue-4.4/series b/queue-4.4/series index 2181ad0e9a3..6c26e806c7b 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -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 index 00000000000..7aafd0c6483 --- /dev/null +++ b/queue-4.4/sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch @@ -0,0 +1,33 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Sergei Shtylyov +Date: Wed, 4 Jan 2017 23:10:23 +0300 +Subject: sh_eth: enable RX descriptor word 0 shift on SH7734 + +From: Sergei Shtylyov + + +[ 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 +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..65ce501c4fd --- /dev/null +++ b/queue-4.4/vfio-pci-handle-error-from-pci_iomap.patch @@ -0,0 +1,34 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Arvind Yadav +Date: Tue, 3 Jan 2017 17:26:46 +0530 +Subject: vfio-pci: Handle error from pci_iomap + +From: Arvind Yadav + + +[ Upstream commit e19f32da5ded958238eac1bbe001192acef191a2 ] + +Here, pci_iomap can fail, handle this case release selected +pci regions and return -ENOMEM. + +Signed-off-by: Arvind Yadav +Signed-off-by: Alex Williamson +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..1dfb18d0ffd --- /dev/null +++ b/queue-4.4/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch @@ -0,0 +1,37 @@ +From foo@baz Fri Aug 4 15:30:20 PDT 2017 +From: Arvind Yadav +Date: Tue, 13 Dec 2016 13:50:52 +0530 +Subject: video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap + +From: Arvind Yadav + + +[ 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 +Acked-by: Yoichi Yuasa +Signed-off-by: Bartlomiej Zolnierkiewicz +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + 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; -- 2.47.3