From: Greg Kroah-Hartman Date: Mon, 9 Apr 2018 11:54:23 +0000 (+0200) Subject: 4.15-stable patches X-Git-Tag: v3.18.104~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26f238fc710007147299ac8e41dd7c8a6bd4a9f0;p=thirdparty%2Fkernel%2Fstable-queue.git 4.15-stable patches added patches: bluetooth-hci_bcm-make-shutdown-and-device-wake-gpio-optional.patch drm-i915-cnp-ignore-vbt-request-for-know-invalid-ddc-pin.patch drm-i915-cnp-properly-handle-vbt-ddc-pin-out-of-bounds.patch nvme-fabrics-don-t-check-for-non-null-module-in-nvmf_register_transport.patch --- diff --git a/queue-4.15/bluetooth-hci_bcm-make-shutdown-and-device-wake-gpio-optional.patch b/queue-4.15/bluetooth-hci_bcm-make-shutdown-and-device-wake-gpio-optional.patch new file mode 100644 index 00000000000..b8303f42f9e --- /dev/null +++ b/queue-4.15/bluetooth-hci_bcm-make-shutdown-and-device-wake-gpio-optional.patch @@ -0,0 +1,44 @@ +From ab2f336cb7e629de74d8af06bcaf6b15e4230e19 Mon Sep 17 00:00:00 2001 +From: Stefan Wahren +Date: Sun, 25 Feb 2018 15:10:52 +0100 +Subject: Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional + +From: Stefan Wahren + +commit ab2f336cb7e629de74d8af06bcaf6b15e4230e19 upstream. + +According to the devicetree binding the shutdown and device wake +GPIOs are optional. Since commit 3e81a4ca51a1 ("Bluetooth: hci_bcm: +Mandate presence of shutdown and device wake GPIO") this driver +won't probe anymore on Raspberry Pi 3 and Zero W (no device wake GPIO +connected). So fix this regression by reverting this commit partially. + +Fixes: 3e81a4ca51a1 ("Bluetooth: hci_bcm: Mandate presence of shutdown and device wake GPIO") +Signed-off-by: Stefan Wahren +Reviewed-by: Lukas Wunner +Signed-off-by: Marcel Holtmann +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/bluetooth/hci_bcm.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/drivers/bluetooth/hci_bcm.c ++++ b/drivers/bluetooth/hci_bcm.c +@@ -775,12 +775,13 @@ static int bcm_get_resources(struct bcm_ + + dev->clk = devm_clk_get(dev->dev, NULL); + +- dev->device_wakeup = devm_gpiod_get(dev->dev, "device-wakeup", +- GPIOD_OUT_LOW); ++ dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup", ++ GPIOD_OUT_LOW); + if (IS_ERR(dev->device_wakeup)) + return PTR_ERR(dev->device_wakeup); + +- dev->shutdown = devm_gpiod_get(dev->dev, "shutdown", GPIOD_OUT_LOW); ++ dev->shutdown = devm_gpiod_get_optional(dev->dev, "shutdown", ++ GPIOD_OUT_LOW); + if (IS_ERR(dev->shutdown)) + return PTR_ERR(dev->shutdown); + diff --git a/queue-4.15/drm-i915-cnp-ignore-vbt-request-for-know-invalid-ddc-pin.patch b/queue-4.15/drm-i915-cnp-ignore-vbt-request-for-know-invalid-ddc-pin.patch new file mode 100644 index 00000000000..f50821646e5 --- /dev/null +++ b/queue-4.15/drm-i915-cnp-ignore-vbt-request-for-know-invalid-ddc-pin.patch @@ -0,0 +1,44 @@ +From f24c606c21a8cb6f75adc20edcd80b6d851991bf Mon Sep 17 00:00:00 2001 +From: Rodrigo Vivi +Date: Tue, 23 Jan 2018 09:40:50 -0800 +Subject: drm/i915/cnp: Ignore VBT request for know invalid DDC pin. + +From: Rodrigo Vivi + +commit f24c606c21a8cb6f75adc20edcd80b6d851991bf upstream. + +Let's ignore VBT request if the pin is clearly wrong. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104139 +Cc: Kai Heng Feng +Signed-off-by: Rodrigo Vivi +Link: https://patchwork.freedesktop.org/patch/msgid/20180123174050.4261-1-rodrigo.vivi@intel.com +Reviewed-by: Radhakrishna Sripada +(cherry picked from commit a8e6f3888b05c1e7b685800a3371ce050720368f) +Signed-off-by: Rodrigo Vivi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_bios.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_bios.c ++++ b/drivers/gpu/drm/i915/intel_bios.c +@@ -1115,9 +1115,14 @@ static const u8 cnp_ddc_pin_map[] = { + + static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin) + { +- if (HAS_PCH_CNP(dev_priv) && +- vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) +- return cnp_ddc_pin_map[vbt_pin]; ++ if (HAS_PCH_CNP(dev_priv)) { ++ if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) ++ return cnp_ddc_pin_map[vbt_pin]; ++ if (vbt_pin > GMBUS_PIN_4_CNP) { ++ DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin); ++ return 0; ++ } ++ } + + return vbt_pin; + } diff --git a/queue-4.15/drm-i915-cnp-properly-handle-vbt-ddc-pin-out-of-bounds.patch b/queue-4.15/drm-i915-cnp-properly-handle-vbt-ddc-pin-out-of-bounds.patch new file mode 100644 index 00000000000..984b56616fb --- /dev/null +++ b/queue-4.15/drm-i915-cnp-properly-handle-vbt-ddc-pin-out-of-bounds.patch @@ -0,0 +1,68 @@ +From 6e3322c226f15bc1838007f5a75566f1482b8e40 Mon Sep 17 00:00:00 2001 +From: Rodrigo Vivi +Date: Thu, 25 Jan 2018 14:25:24 -0800 +Subject: drm/i915/cnp: Properly handle VBT ddc pin out of bounds. + +From: Rodrigo Vivi + +commit 6e3322c226f15bc1838007f5a75566f1482b8e40 upstream. + +If the table result is out of bounds on the array map +there is something really wrong with VBT pin so we don't +return that vbt_pin, but only return 0 instead. + +This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp: +Ignore VBT request for know invalid DDC pin.")' + +Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl: +Map VBT DDC Pin to BSpec DDC Pin.") + +v2: Do in a way that we don't break other platforms. (Jani) + +v3: Keep debug message (Jani) + +v4: Don't mess with 0 mapping was noticed by Jani and + addressed with a simple solution suggested by Lucas + that makes this even simpler. + +Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.") +Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.") +Cc: Radhakrishna Sripada +Cc: Jani Nikula +Cc: Kai Heng Feng +Cc: Lucas De Marchi +Suggested-by: Lucas De Marchi +Signed-off-by: Rodrigo Vivi +Reviewed-by: Lucas De Marchi +Tested-by: Kai-Heng Feng +Link: https://patchwork.freedesktop.org/patch/msgid/20180125222524.22059-1-rodrigo.vivi@intel.com +(cherry picked from commit 3393ce1ed8fc43dbdb83952facaf04e644ca1d54) +Signed-off-by: Rodrigo Vivi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_bios.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_bios.c ++++ b/drivers/gpu/drm/i915/intel_bios.c +@@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i + } + + static const u8 cnp_ddc_pin_map[] = { ++ [0] = 0, /* N/A */ + [DDC_BUS_DDI_B] = GMBUS_PIN_1_BXT, + [DDC_BUS_DDI_C] = GMBUS_PIN_2_BXT, + [DDC_BUS_DDI_D] = GMBUS_PIN_4_CNP, /* sic */ +@@ -1116,9 +1117,9 @@ static const u8 cnp_ddc_pin_map[] = { + static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin) + { + if (HAS_PCH_CNP(dev_priv)) { +- if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) ++ if (vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) { + return cnp_ddc_pin_map[vbt_pin]; +- if (vbt_pin > GMBUS_PIN_4_CNP) { ++ } else { + DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin); + return 0; + } diff --git a/queue-4.15/netfilter-core-only-allow-one-nat-hook-per-hook-point.patch b/queue-4.15/netfilter-core-only-allow-one-nat-hook-per-hook-point.patch deleted file mode 100644 index 85e923ac109..00000000000 --- a/queue-4.15/netfilter-core-only-allow-one-nat-hook-per-hook-point.patch +++ /dev/null @@ -1,160 +0,0 @@ -From foo@baz Mon Apr 9 10:16:32 CEST 2018 -From: Florian Westphal -Date: Fri, 8 Dec 2017 17:01:54 +0100 -Subject: netfilter: core: only allow one nat hook per hook point - -From: Florian Westphal - - -[ Upstream commit f92b40a8b2645af38bd6814651c59c1e690db53d ] - -The netfilter NAT core cannot deal with more than one NAT hook per hook -location (prerouting, input ...), because the NAT hooks install a NAT null -binding in case the iptables nat table (iptable_nat hooks) or the -corresponding nftables chain (nft nat hooks) doesn't specify a nat -transformation. - -Null bindings are needed to detect port collsisions between NAT-ed and -non-NAT-ed connections. - -This causes nftables NAT rules to not work when iptable_nat module is -loaded, and vice versa because nat binding has already been attached -when the second nat hook is consulted. - -The netfilter core is not really the correct location to handle this -(hooks are just hooks, the core has no notion of what kinds of side - effects a hook implements), but its the only place where we can check -for conflicts between both iptables hooks and nftables hooks without -adding dependencies. - -So add nat annotation to hook_ops to describe those hooks that will -add NAT bindings and then make core reject if such a hook already exists. -The annotation fills a padding hole, in case further restrictions appar -we might change this to a 'u8 type' instead of bool. - -iptables error if nft nat hook active: -iptables -t nat -A POSTROUTING -j MASQUERADE -iptables v1.4.21: can't initialize iptables table `nat': File exists -Perhaps iptables or your kernel needs to be upgraded. - -nftables error if iptables nat table present: -nft -f /etc/nftables/ipv4-nat -/usr/etc/nftables/ipv4-nat:3:1-2: Error: Could not process rule: File exists -table nat { -^^ - -Signed-off-by: Florian Westphal -Signed-off-by: Pablo Neira Ayuso -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - include/linux/netfilter.h | 1 + - net/ipv4/netfilter/iptable_nat.c | 4 ++++ - net/ipv6/netfilter/ip6table_nat.c | 4 ++++ - net/netfilter/core.c | 6 ++++++ - net/netfilter/nf_tables_api.c | 2 ++ - 5 files changed, 17 insertions(+) - ---- a/include/linux/netfilter.h -+++ b/include/linux/netfilter.h -@@ -67,6 +67,7 @@ struct nf_hook_ops { - struct net_device *dev; - void *priv; - u_int8_t pf; -+ bool nat_hook; - unsigned int hooknum; - /* Hooks are ordered in ascending priority. */ - int priority; ---- a/net/ipv4/netfilter/iptable_nat.c -+++ b/net/ipv4/netfilter/iptable_nat.c -@@ -72,6 +72,7 @@ static const struct nf_hook_ops nf_nat_i - { - .hook = iptable_nat_ipv4_in, - .pf = NFPROTO_IPV4, -+ .nat_hook = true, - .hooknum = NF_INET_PRE_ROUTING, - .priority = NF_IP_PRI_NAT_DST, - }, -@@ -79,6 +80,7 @@ static const struct nf_hook_ops nf_nat_i - { - .hook = iptable_nat_ipv4_out, - .pf = NFPROTO_IPV4, -+ .nat_hook = true, - .hooknum = NF_INET_POST_ROUTING, - .priority = NF_IP_PRI_NAT_SRC, - }, -@@ -86,6 +88,7 @@ static const struct nf_hook_ops nf_nat_i - { - .hook = iptable_nat_ipv4_local_fn, - .pf = NFPROTO_IPV4, -+ .nat_hook = true, - .hooknum = NF_INET_LOCAL_OUT, - .priority = NF_IP_PRI_NAT_DST, - }, -@@ -93,6 +96,7 @@ static const struct nf_hook_ops nf_nat_i - { - .hook = iptable_nat_ipv4_fn, - .pf = NFPROTO_IPV4, -+ .nat_hook = true, - .hooknum = NF_INET_LOCAL_IN, - .priority = NF_IP_PRI_NAT_SRC, - }, ---- a/net/ipv6/netfilter/ip6table_nat.c -+++ b/net/ipv6/netfilter/ip6table_nat.c -@@ -74,6 +74,7 @@ static const struct nf_hook_ops nf_nat_i - { - .hook = ip6table_nat_in, - .pf = NFPROTO_IPV6, -+ .nat_hook = true, - .hooknum = NF_INET_PRE_ROUTING, - .priority = NF_IP6_PRI_NAT_DST, - }, -@@ -81,6 +82,7 @@ static const struct nf_hook_ops nf_nat_i - { - .hook = ip6table_nat_out, - .pf = NFPROTO_IPV6, -+ .nat_hook = true, - .hooknum = NF_INET_POST_ROUTING, - .priority = NF_IP6_PRI_NAT_SRC, - }, -@@ -88,12 +90,14 @@ static const struct nf_hook_ops nf_nat_i - { - .hook = ip6table_nat_local_fn, - .pf = NFPROTO_IPV6, -+ .nat_hook = true, - .hooknum = NF_INET_LOCAL_OUT, - .priority = NF_IP6_PRI_NAT_DST, - }, - /* After packet filtering, change source */ - { - .hook = ip6table_nat_fn, -+ .nat_hook = true, - .pf = NFPROTO_IPV6, - .hooknum = NF_INET_LOCAL_IN, - .priority = NF_IP6_PRI_NAT_SRC, ---- a/net/netfilter/core.c -+++ b/net/netfilter/core.c -@@ -135,6 +135,12 @@ nf_hook_entries_grow(const struct nf_hoo - ++i; - continue; - } -+ -+ if (reg->nat_hook && orig_ops[i]->nat_hook) { -+ kvfree(new); -+ return ERR_PTR(-EEXIST); -+ } -+ - if (inserted || reg->priority > orig_ops[i]->priority) { - new_ops[nhooks] = (void *)orig_ops[i]; - new->hooks[nhooks] = old->hooks[i]; ---- a/net/netfilter/nf_tables_api.c -+++ b/net/netfilter/nf_tables_api.c -@@ -1400,6 +1400,8 @@ static int nf_tables_addchain(struct nft - ops->hook = hookfn; - if (afi->hook_ops_init) - afi->hook_ops_init(ops, i); -+ if (basechain->type->type == NFT_CHAIN_T_NAT) -+ ops->nat_hook = true; - } - - chain->flags |= NFT_BASE_CHAIN; diff --git a/queue-4.15/nvme-fabrics-don-t-check-for-non-null-module-in-nvmf_register_transport.patch b/queue-4.15/nvme-fabrics-don-t-check-for-non-null-module-in-nvmf_register_transport.patch new file mode 100644 index 00000000000..c55fc70217c --- /dev/null +++ b/queue-4.15/nvme-fabrics-don-t-check-for-non-null-module-in-nvmf_register_transport.patch @@ -0,0 +1,34 @@ +From 5a1e59533380a3fd04593e4ab2d4633ebf7745c1 Mon Sep 17 00:00:00 2001 +From: Christoph Hellwig +Date: Thu, 22 Feb 2018 07:24:08 -0800 +Subject: nvme-fabrics: don't check for non-NULL module in nvmf_register_transport + +From: Christoph Hellwig + +commit 5a1e59533380a3fd04593e4ab2d4633ebf7745c1 upstream. + +THIS_MODULE evaluates to NULL when used from code built into the kernel, +thus breaking built-in transport modules. Remove the bogus check. + +Fixes: 0de5cd36 ("nvme-fabrics: protect against module unload during create_ctrl") +Signed-off-by: Christoph Hellwig +Reviewed-by: Sagi Grimberg +Reviewed-by: Johannes Thumshirn +Signed-off-by: Keith Busch +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/nvme/host/fabrics.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvme/host/fabrics.c ++++ b/drivers/nvme/host/fabrics.c +@@ -493,7 +493,7 @@ EXPORT_SYMBOL_GPL(nvmf_should_reconnect) + */ + int nvmf_register_transport(struct nvmf_transport_ops *ops) + { +- if (!ops->create_ctrl || !ops->module) ++ if (!ops->create_ctrl) + return -EINVAL; + + down_write(&nvmf_transports_rwsem); diff --git a/queue-4.15/series b/queue-4.15/series index 38602c0fb14..af2d344cf35 100644 --- a/queue-4.15/series +++ b/queue-4.15/series @@ -54,6 +54,7 @@ blk-mq-avoid-to-map-cpu-into-stale-hw-queue.patch blk-mq-fix-race-between-updating-nr_hw_queues-and-switching-io-sched.patch backlight-tdo24m-fix-the-spi-cs-between-transfers.patch nvme-fabrics-protect-against-module-unload-during-create_ctrl.patch +nvme-fabrics-don-t-check-for-non-null-module-in-nvmf_register_transport.patch pinctrl-baytrail-enable-glitch-filter-for-gpios-used-as-interrupts.patch nvme_fcloop-disassocate-local-port-structs.patch nvme_fcloop-fix-abort-race-condition.patch @@ -61,7 +62,6 @@ tpm-return-a-tpm_rc_command_code-response-if-command-is-not-implemented.patch perf-report-fix-a-no-annotate-browser-displayed-issue.patch staging-lustre-disable-preempt-while-sampling-processor-id.patch asoc-intel-sst-fix-the-return-value-of-sst_send_byte_stream_mrfld.patch -netfilter-core-only-allow-one-nat-hook-per-hook-point.patch power-supply-axp288_charger-properly-stop-work-on-probe-error-remove.patch rt2x00-do-not-pause-queue-unconditionally-on-error-path.patch wl1251-check-return-from-call-to-wl1251_acx_arp_ip_filter.patch @@ -87,6 +87,7 @@ edac-mv64x60-fix-an-error-handling-path.patch uio_hv_generic-check-that-host-supports-monitor-page.patch bluetooth-hci_bcm-mandate-presence-of-shutdown-and-device-wake-gpio.patch bluetooth-hci_bcm-validate-irq-before-using-it.patch +bluetooth-hci_bcm-make-shutdown-and-device-wake-gpio-optional.patch i40evf-don-t-rely-on-netif_running-outside-rtnl_lock.patch drm-amd-powerplay-fix-memory-leakage-when-reload-v2.patch cxgb4vf-fix-sge-fl-buffer-initialization-logic-for-64k-pages.patch @@ -107,3 +108,5 @@ signal-powerpc-document-conflicts-with-si_user-and-sigfpe-and-sigtrap.patch signal-arm-document-conflicts-with-si_user-and-sigfpe.patch tcmu-release-blocks-for-partially-setup-cmds.patch thermal-int3400_thermal-fix-error-handling-in-int3400_thermal_probe.patch +drm-i915-cnp-ignore-vbt-request-for-know-invalid-ddc-pin.patch +drm-i915-cnp-properly-handle-vbt-ddc-pin-out-of-bounds.patch