Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1704274 > unrolled thread

[PATCH 4.9 000/105] 4.9.41-stable review

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-08-05 01:20 +0200
Last post2017-08-05 16:50 +0200
Articles 20 on this page of 106 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 4.9 000/105] 4.9.41-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 104/105] ASoC: Intel: Skylake: Release FW ctx in cleanup Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 047/105] r8169: add support for RTL8168 series add-on card. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 025/105] smp/hotplug: Replace BUG_ON and react useful Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 087/105] perf symbols: Robustify reading of build-id from sysfs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 054/105] ipv6: Should use consistent conditional judgement for ip6 fragment between __ip6_append_data and ip6_finish_output Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 030/105] isdn/i4l: fix buffer overflow Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 105/105] ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 077/105] ACPI / scan: Prefer devices without _HID/_CID for _ADR matching Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 003/105] net: reduce skb_warn_bad_offload() noise Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 004/105] jfs: Dont clear SGID when inheriting ACLs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 085/105] xfrm: Dont use sk_family for socket policy lookups Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 002/105] pstore: Make spinlock per zone instead of global Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 040/105] [media] v4l: s5c73m3: fix negation operator Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:20 +0200
    [PATCH 4.9 082/105] Btrfs: adjust outstanding_extents counter properly when dio write is split Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 076/105] ARM: s3c2410_defconfig: Fix invalid values for NF_CT_PROTO_* Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 089/105] vfio-pci: Handle error from pci_iomap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 092/105] net: usb: asix_devices: add .reset_resume for USB PM Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 095/105] ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 073/105] ARM64: zynqmp: Fix W=1 dtc 1.4 warnings Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 078/105] usb: gadget: Fix copy/pasted error message Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 102/105] scsi: snic: Return error code on memory allocation failure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 098/105] perf/x86: Set pmu->module in Intel PMU modules Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 103/105] scsi: bfa: Increase requested firmware version to 3.2.5.1 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 072/105] usb: dwc3: omap: fix race of pm runtime with irq handler in probe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 091/105] nvmem: imx-ocotp: Fix wrong register size Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 083/105] Xen: ARM: Zero reserved fields of xatp before making hypervisor call Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 097/105] x86/platform/intel-mid: Rename spidev to mrfld_spidev Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 086/105] perf tools: Install tools/lib/traceevent plugins with install-bin Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 101/105] scsi: fnic: Avoid sending reset to firmware when another reset is in progress Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 079/105] Btrfs: use down_read_nested to make lockdep silent Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 075/105] perf probe: Fix to get correct modname from elf header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 093/105] ASoC: fsl_ssi: set fifo watermark to more reliable value Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 090/105] arm64: mm: fix show_pte KERN_CONT fallout Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 099/105] ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 094/105] sh_eth: enable RX descriptor word 0 shift on SH7734 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 045/105] device-dax: fix sysfs duplicate warnings Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 096/105] ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 084/105] tools lib traceevent: Fix prev/next_prio for deadline tasks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 088/105] video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 100/105] HID: ignore Petzl USB headlamp Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 01:30 +0200
    [PATCH 4.9 013/105] crypto: authencesn - Fix digest_null crash Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 059/105] drm/msm: Put back the vaddr in submit_reloc() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 053/105] net/mlx5: Disable RoCE on the e-switch management port under switchdev mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 060/105] drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 062/105] irqchip/keystone: Fix "scheduling while atomic" on rt Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 066/105] irqchip/mxs: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 049/105] dt-bindings: power/supply: Update TPS65217 properties Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 065/105] ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 081/105] benet: stricter vxlan offloading check in be_features_check Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 064/105] spi: dw: Make debugfs name unique between instances Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 058/105] drm/msm: Ensure that the hardware write pointer is valid Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 046/105] x86/mce/AMD: Make the init code more robust Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 057/105] net/mlx4_core: Fix raw qp flow steering rules under SRIOV Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 007/105] parisc: Prevent TLB speculation on flushed pages on CPUs that only support equivalent aliases Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 051/105] ARM: dts: am57xx-idk: Put USB2 port in peripheral mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 044/105] net: skb_needs_check() accepts CHECKSUM_NONE for tx Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 061/105] vfio-pci: use 32-bit comparisons for register address for gcc-4.5 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 011/105] NFS: invalidate file size when taking a lock. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 070/105] l2tp: consider :: as wildcard address in l2tp_ip6 socket lookup Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 071/105] dmaengine: ti-dma-crossbar: Add some of_node_put() in error path. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 080/105] Btrfs: fix lockdep warning about log_mutex Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 041/105] pstore: Allow prz to control need for locking Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 056/105] net/mlx4: Remove BUG_ON from ICM allocation routine Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 069/105] dmaengine: ioatdma: workaround SKX ioatdma version Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 042/105] pstore: Correctly initialize spinlock and flags Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 043/105] pstore: Use dynamic spinlock initializer Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 063/105] ASoC: tlv320aic3x: Mark the RESET register as volatile Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 055/105] net/mlx4_core: Use-after-free causes a resource leak in flow-steering detach Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 067/105] openrisc: Add _text symbol to fix ksym build error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 050/105] dt-bindings: input: Specify the interrupt number of TPS65217 power button Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 048/105] ARM: omap2+: fixing wrong strcat for Non-NULL terminated string Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:10 +0200
    [PATCH 4.9 037/105] RDMA/uverbs: Fix the check for port number Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 009/105] parisc: Suspend lockup detectors before system halt Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 017/105] drm/nouveau/disp/nv50-: bump max chans to 21 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 032/105] wil6210: fix deadlock when using fw_no_recovery option Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 024/105] smp/hotplug: Move unparking of percpu threads to the control CPU Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 035/105] mailbox: handle empty message in tx_tick Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 018/105] drm/nouveau/bar/gf100: fix access to upper half of BAR2 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 016/105] drm/vmwgfx: Fix gcc-7.1.1 warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 008/105] parisc: Extend disabled preemption in copy_user_page Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 039/105] dentry name snapshots Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 029/105] isdn: Fix a sleep-in-atomic bug Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 020/105] KVM: PPC: Book3S HV: Save/restore host values of debug registers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 015/105] md/raid5: add thread_group worker async_tx_issue_pending_all Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 027/105] nfc: fdp: fix NULL pointer dereference Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 014/105] KVM: PPC: Book3S HV: Enable TM before accessing TM registers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 001/105] af_key: Add lock to key dump Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 033/105] mailbox: always wait in mbox_send_message for blocking Tx mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 028/105] net: phy: Do not perform software reset for Generic PHY Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 019/105] KVM: PPC: Book3S HV: Restore critical SPRs to host values on guest exit Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 012/105] NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails to wake a waiter Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 026/105] nfc: Fix hangup of RC-S380* in port100_send_ack() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 036/105] sched/cgroup: Move sched_online_group() back into css_online() to fix crash Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 038/105] ipmi/watchdog: fix watchdog timeout set on reboot Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 022/105] Staging: comedi: comedi_fops: Avoid orphaned proc entry Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 010/105] powerpc/pseries: Fix of_node_put() underflow during reconfig remove Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 021/105] Revert "powerpc/numa: Fix percpu allocations to be NUMA aware" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 034/105] mailbox: skip complete wait event if timer expired Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    [PATCH 4.9 031/105] ath10k: fix null deref on wmi-tlv when trying spectral scan Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 02:20 +0200
    Re: [PATCH 4.9 000/105] 4.9.41-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-08-05 04:00 +0200
      Re: [PATCH 4.9 000/105] 4.9.41-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 04:50 +0200
    Re: [PATCH 4.9 000/105] 4.9.41-stable review Randy Dunlap <rdunlap@infradead.org> - 2017-08-05 05:00 +0200
      Re: [PATCH 4.9 000/105] 4.9.41-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 05:10 +0200
    Re: [PATCH 4.9 000/105] 4.9.41-stable review Guenter Roeck <linux@roeck-us.net> - 2017-08-05 08:20 +0200
      Re: [PATCH 4.9 000/105] 4.9.41-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-05 16:50 +0200

Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6  Next page →


#1704339 — [PATCH 4.9 100/105] HID: ignore Petzl USB headlamp

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 01:30 +0200
Subject[PATCH 4.9 100/105] HID: ignore Petzl USB headlamp
Message-ID<uaUcB-5a1-105@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

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
@@ -2484,6 +2484,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 IS_ENABLED(CONFIG_MOUSE_SYNAPTICS_USB)
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -819,6 +819,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
 

[toc] | [prev] | [next] | [standalone]


#1704459 — [PATCH 4.9 013/105] crypto: authencesn - Fix digest_null crash

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 013/105] crypto: authencesn - Fix digest_null crash
Message-ID<uaUPf-5G0-5@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Herbert Xu <herbert@gondor.apana.org.au>

commit 41cdf7a45389e01991ee31e3301ed83cb3e3f7dc upstream.

When authencesn is used together with digest_null a crash will
occur on the decrypt path.  This is because normally we perform
a special setup to preserve the ESN, but this is skipped if there
is no authentication.  However, on the post-authentication path
it always expects the preservation to be in place, thus causing
a crash when digest_null is used.

This patch fixes this by also skipping the post-processing when
there is no authentication.

Fixes: 104880a6b470 ("crypto: authencesn - Convert to new AEAD...")
Reported-by: Jan Tluka <jtluka@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/authencesn.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/crypto/authencesn.c
+++ b/crypto/authencesn.c
@@ -248,6 +248,9 @@ static int crypto_authenc_esn_decrypt_ta
 	u8 *ihash = ohash + crypto_ahash_digestsize(auth);
 	u32 tmp[2];
 
+	if (!authsize)
+		goto decrypt;
+
 	/* Move high-order bits of sequence number back. */
 	scatterwalk_map_and_copy(tmp, dst, 4, 4, 0);
 	scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0);
@@ -256,6 +259,8 @@ static int crypto_authenc_esn_decrypt_ta
 	if (crypto_memneq(ihash, ohash, authsize))
 		return -EBADMSG;
 
+decrypt:
+
 	sg_init_table(areq_ctx->dst, 2);
 	dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen);
 

[toc] | [prev] | [next] | [standalone]


#1704460 — [PATCH 4.9 059/105] drm/msm: Put back the vaddr in submit_reloc()

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 059/105] drm/msm: Put back the vaddr in submit_reloc()
Message-ID<uaUPf-5G0-7@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jordan Crouse <jcrouse@codeaurora.org>


[ Upstream commit 6490abc4bc35fa4f3bdb9c7e49096943c50e29ea ]

The error cases in submit_reloc() need to put back the virtual
address of the bo before failling. Add a single failure path
for the function.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/msm/msm_gem_submit.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -290,7 +290,7 @@ static int submit_reloc(struct msm_gem_s
 {
 	uint32_t i, last_offset = 0;
 	uint32_t *ptr;
-	int ret;
+	int ret = 0;
 
 	if (offset % 4) {
 		DRM_ERROR("non-aligned cmdstream buffer: %u\n", offset);
@@ -317,12 +317,13 @@ static int submit_reloc(struct msm_gem_s
 
 		ret = copy_from_user(&submit_reloc, userptr, sizeof(submit_reloc));
 		if (ret)
-			return -EFAULT;
+			goto out;
 
 		if (submit_reloc.submit_offset % 4) {
 			DRM_ERROR("non-aligned reloc offset: %u\n",
 					submit_reloc.submit_offset);
-			return -EINVAL;
+			ret = -EINVAL;
+			goto out;
 		}
 
 		/* offset in dwords: */
@@ -331,12 +332,13 @@ static int submit_reloc(struct msm_gem_s
 		if ((off >= (obj->base.size / 4)) ||
 				(off < last_offset)) {
 			DRM_ERROR("invalid offset %u at reloc %u\n", off, i);
-			return -EINVAL;
+			ret = -EINVAL;
+			goto out;
 		}
 
 		ret = submit_bo(submit, submit_reloc.reloc_idx, NULL, &iova, &valid);
 		if (ret)
-			return ret;
+			goto out;
 
 		if (valid)
 			continue;
@@ -353,9 +355,10 @@ static int submit_reloc(struct msm_gem_s
 		last_offset = off;
 	}
 
+out:
 	msm_gem_put_vaddr_locked(&obj->base);
 
-	return 0;
+	return ret;
 }
 
 static void submit_cleanup(struct msm_gem_submit *submit)

[toc] | [prev] | [next] | [standalone]


#1704462 — [PATCH 4.9 053/105] net/mlx5: Disable RoCE on the e-switch management port under switchdev mode

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 053/105] net/mlx5: Disable RoCE on the e-switch management port under switchdev mode
Message-ID<uaUPg-5G0-13@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Or Gerlitz <ogerlitz@mellanox.com>


[ Upstream commit 9da34cd34e85aacc55af8774b81b1f23e86014f9 ]

Under the switchdev/offloads mode, packets that don't match any
e-switch steering rule are sent towards the e-switch management
port. We use a NIC HW steering rule set per vport (uplink and VFs)
to make them be received into the host OS through the respective
vport representor netdevice.

Currnetly such missed RoCE packets will not get to this NIC steering
rule, and hence VF RoCE will not work over the slow path of the offloads
mode. This is b/c these packets will be matched by a steering rule added
by the firmware that serves RoCE traffic set on the PF NIC vport which
is also the e-switch management port under SRIOV.

Disabling RoCE on the e-switch management vport when we are in the offloads
mode, will signal to the firmware to remove their RoCE rule, and then the
missed RoCE packets will be matched by the representor NIC steering rule
as any other missed packets.

To achieve that, we disable RoCE on the PF vport. We do that by removing
(hot-unplugging) the IB device instance associated with the PF. This is
also required by our current model where the PF serves as the uplink
representor and hence only SW switching (TC, bridge, OVS) applications
and slow path vport mlx5e net-device should be running over that vport.

Fixes: c930a3ad7453 ('net/mlx5e: Add devlink based SRIOV mode changes')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.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/mellanox/mlx5/core/eswitch_offloads.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -672,6 +672,12 @@ int esw_offloads_init(struct mlx5_eswitc
 		if (err)
 			goto err_reps;
 	}
+
+	/* disable PF RoCE so missed packets don't go through RoCE steering */
+	mlx5_dev_list_lock();
+	mlx5_remove_dev_by_protocol(esw->dev, MLX5_INTERFACE_PROTOCOL_IB);
+	mlx5_dev_list_unlock();
+
 	return 0;
 
 err_reps:
@@ -695,6 +701,11 @@ static int esw_offloads_stop(struct mlx5
 {
 	int err, err1, num_vfs = esw->dev->priv.sriov.num_vfs;
 
+	/* enable back PF RoCE */
+	mlx5_dev_list_lock();
+	mlx5_add_dev_by_protocol(esw->dev, MLX5_INTERFACE_PROTOCOL_IB);
+	mlx5_dev_list_unlock();
+
 	mlx5_eswitch_disable_sriov(esw);
 	err = mlx5_eswitch_enable_sriov(esw, num_vfs, SRIOV_LEGACY);
 	if (err) {

[toc] | [prev] | [next] | [standalone]


#1704463 — [PATCH 4.9 060/105] drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 060/105] drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set
Message-ID<uaUPg-5G0-11@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jordan Crouse <jcrouse@codeaurora.org>


[ Upstream commit a6cb3b864b21b7345f824a4faa12b723c8aaf099 ]

For every submission buffer object one of MSM_SUBMIT_BO_WRITE
and MSM_SUBMIT_BO_READ must be set (and nothing else). If we
allowed zero then the buffer object would never get queued to
be unreferenced.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/msm/msm_gem_submit.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -106,7 +106,8 @@ static int submit_lookup_objects(struct
 			pagefault_disable();
 		}
 
-		if (submit_bo.flags & ~MSM_SUBMIT_BO_FLAGS) {
+		if ((submit_bo.flags & ~MSM_SUBMIT_BO_FLAGS) ||
+			!(submit_bo.flags & MSM_SUBMIT_BO_FLAGS)) {
 			DRM_ERROR("invalid flags: %x\n", submit_bo.flags);
 			ret = -EINVAL;
 			goto out_unlock;

[toc] | [prev] | [next] | [standalone]


#1704464 — [PATCH 4.9 062/105] irqchip/keystone: Fix "scheduling while atomic" on rt

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 062/105] irqchip/keystone: Fix "scheduling while atomic" on rt
Message-ID<uaUPg-5G0-17@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: "Strashko, Grygorii" <grygorii.strashko@ti.com>


[ Upstream commit 2f884e6e688a0deb69e6c9552e51aef8b7e3f5f1 ]

The below call chain generates "scheduling while atomic" backtrace and
causes system crash when Keystone 2 IRQ chip driver is used with RT-kernel:

gic_handle_irq()
 |-__handle_domain_irq()
  |-generic_handle_irq()
   |-keystone_irq_handler()
    |-regmap_read()
     |-regmap_lock_spinlock()
      |-rt_spin_lock()

The reason is that Keystone driver dispatches IRQ using chained IRQ handler
and accesses I/O memory through syscon->regmap(mmio) which is implemented
as fast_io regmap and uses regular spinlocks for synchronization, but
spinlocks transformed to rt_mutexes on RT.

Hence, convert Keystone 2 IRQ driver to use generic irq handler instead of
chained IRQ handler. This way it will be compatible with RT kernel where it
will be forced thread IRQ handler while in non-RT kernel it still will be
executed in HW IRQ context.

Cc: Suman Anna <s-anna@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Suman Anna <s-anna@ti.com>
Link: https://lkml.kernel.org/r/20161208233310.10329-1-grygorii.strashko@ti.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/irqchip/irq-keystone.c |   28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

--- a/drivers/irqchip/irq-keystone.c
+++ b/drivers/irqchip/irq-keystone.c
@@ -19,9 +19,9 @@
 #include <linux/bitops.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/interrupt.h>
 #include <linux/irqdomain.h>
 #include <linux/irqchip.h>
-#include <linux/irqchip/chained_irq.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/mfd/syscon.h>
@@ -39,6 +39,7 @@ struct keystone_irq_device {
 	struct irq_domain	*irqd;
 	struct regmap		*devctrl_regs;
 	u32			devctrl_offset;
+	raw_spinlock_t		wa_lock;
 };
 
 static inline u32 keystone_irq_readl(struct keystone_irq_device *kirq)
@@ -83,17 +84,15 @@ static void keystone_irq_ack(struct irq_
 	/* nothing to do here */
 }
 
-static void keystone_irq_handler(struct irq_desc *desc)
+static irqreturn_t keystone_irq_handler(int irq, void *keystone_irq)
 {
-	unsigned int irq = irq_desc_get_irq(desc);
-	struct keystone_irq_device *kirq = irq_desc_get_handler_data(desc);
+	struct keystone_irq_device *kirq = keystone_irq;
+	unsigned long wa_lock_flags;
 	unsigned long pending;
 	int src, virq;
 
 	dev_dbg(kirq->dev, "start irq %d\n", irq);
 
-	chained_irq_enter(irq_desc_get_chip(desc), desc);
-
 	pending = keystone_irq_readl(kirq);
 	keystone_irq_writel(kirq, pending);
 
@@ -111,13 +110,15 @@ static void keystone_irq_handler(struct
 			if (!virq)
 				dev_warn(kirq->dev, "spurious irq detected hwirq %d, virq %d\n",
 					 src, virq);
+			raw_spin_lock_irqsave(&kirq->wa_lock, wa_lock_flags);
 			generic_handle_irq(virq);
+			raw_spin_unlock_irqrestore(&kirq->wa_lock,
+						   wa_lock_flags);
 		}
 	}
 
-	chained_irq_exit(irq_desc_get_chip(desc), desc);
-
 	dev_dbg(kirq->dev, "end irq %d\n", irq);
+	return IRQ_HANDLED;
 }
 
 static int keystone_irq_map(struct irq_domain *h, unsigned int virq,
@@ -182,9 +183,16 @@ static int keystone_irq_probe(struct pla
 		return -ENODEV;
 	}
 
+	raw_spin_lock_init(&kirq->wa_lock);
+
 	platform_set_drvdata(pdev, kirq);
 
-	irq_set_chained_handler_and_data(kirq->irq, keystone_irq_handler, kirq);
+	ret = request_irq(kirq->irq, keystone_irq_handler,
+			  0, dev_name(dev), kirq);
+	if (ret) {
+		irq_domain_remove(kirq->irqd);
+		return ret;
+	}
 
 	/* clear all source bits */
 	keystone_irq_writel(kirq, ~0x0);
@@ -199,6 +207,8 @@ static int keystone_irq_remove(struct pl
 	struct keystone_irq_device *kirq = platform_get_drvdata(pdev);
 	int hwirq;
 
+	free_irq(kirq->irq, kirq);
+
 	for (hwirq = 0; hwirq < KEYSTONE_N_IRQ; hwirq++)
 		irq_dispose_mapping(irq_find_mapping(kirq->irqd, hwirq));
 

[toc] | [prev] | [next] | [standalone]


#1704467 — [PATCH 4.9 066/105] irqchip/mxs: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 066/105] irqchip/mxs: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND
Message-ID<uaUPg-5G0-23@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stefan Wahren <stefan.wahren@i2se.com>


[ Upstream commit 88e20c74ee020f9e0c99dfce0dd9aa61c3f0cca0 ]

The ICOLL controller doesn't provide any facility to configure the
wakeup sources. That's the reason why this implementation lacks
the irq_set_wake implementation. But this prevent us from properly
entering power management states like "suspend to idle".

So enable the flags IRQCHIP_SKIP_SET_WAKE and
IRQCHIP_MASK_ON_SUSPEND to let the irqchip core allows and handles
the power management.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Link: https://lkml.kernel.org/r/1482863397-11400-1-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/irqchip/irq-mxs.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/irqchip/irq-mxs.c
+++ b/drivers/irqchip/irq-mxs.c
@@ -131,12 +131,16 @@ static struct irq_chip mxs_icoll_chip =
 	.irq_ack = icoll_ack_irq,
 	.irq_mask = icoll_mask_irq,
 	.irq_unmask = icoll_unmask_irq,
+	.flags = IRQCHIP_MASK_ON_SUSPEND |
+		 IRQCHIP_SKIP_SET_WAKE,
 };
 
 static struct irq_chip asm9260_icoll_chip = {
 	.irq_ack = icoll_ack_irq,
 	.irq_mask = asm9260_mask_irq,
 	.irq_unmask = asm9260_unmask_irq,
+	.flags = IRQCHIP_MASK_ON_SUSPEND |
+		 IRQCHIP_SKIP_SET_WAKE,
 };
 
 asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs)

[toc] | [prev] | [next] | [standalone]


#1704468 — [PATCH 4.9 049/105] dt-bindings: power/supply: Update TPS65217 properties

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 049/105] dt-bindings: power/supply: Update TPS65217 properties
Message-ID<uaUPg-5G0-27@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Milo Kim <woogyom.kim@gmail.com>


[ Upstream commit 81d7358d7038dd1001547950087e5b0641732f3f ]

Add interrupt specifiers for USB and AC charger input. Interrupt numbers
are from the datasheet.
Fix wrong property for compatible string.

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 Documentation/devicetree/bindings/power/supply/tps65217_charger.txt |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
+++ b/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
@@ -2,11 +2,16 @@ TPS65217 Charger
 
 Required Properties:
 -compatible: "ti,tps65217-charger"
+-interrupts: TPS65217 interrupt numbers for the AC and USB charger input change.
+             Should be <0> for the USB charger and <1> for the AC adapter.
+-interrupt-names: Should be "USB" and "AC"
 
 This node is a subnode of the tps65217 PMIC.
 
 Example:
 
 	tps65217-charger {
-		compatible = "ti,tps65090-charger";
+		compatible = "ti,tps65217-charger";
+		interrupts = <0>, <1>;
+		interrupt-names = "USB", "AC";
 	};

[toc] | [prev] | [next] | [standalone]


#1704469 — [PATCH 4.9 065/105] ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 065/105] ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL
Message-ID<uaUPg-5G0-25@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: John Hsu <KCHSU0@nuvoton.com>


[ Upstream commit a1792cda51300e15b03549cccf0b09f3be82e697 ]

The clk_ref_div is not configured in the correct position of the
register. The patch fixes that clk_ref_div, Pre-Scalar, is assigned
the wrong value.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
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/codecs/nau8825.c |    3 ++-
 sound/soc/codecs/nau8825.h |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -1928,7 +1928,8 @@ static void nau8825_fll_apply(struct nau
 			NAU8825_FLL_INTEGER_MASK, fll_param->fll_int);
 	/* FLL pre-scaler */
 	regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4,
-			NAU8825_FLL_REF_DIV_MASK, fll_param->clk_ref_div);
+			NAU8825_FLL_REF_DIV_MASK,
+			fll_param->clk_ref_div << NAU8825_FLL_REF_DIV_SFT);
 	/* select divided VCO input */
 	regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5,
 		NAU8825_FLL_CLK_SW_MASK, NAU8825_FLL_CLK_SW_REF);
--- a/sound/soc/codecs/nau8825.h
+++ b/sound/soc/codecs/nau8825.h
@@ -129,7 +129,8 @@
 #define NAU8825_FLL_CLK_SRC_FS			(0x3 << NAU8825_FLL_CLK_SRC_SFT)
 
 /* FLL4 (0x07) */
-#define NAU8825_FLL_REF_DIV_MASK		(0x3 << 10)
+#define NAU8825_FLL_REF_DIV_SFT	10
+#define NAU8825_FLL_REF_DIV_MASK	(0x3 << NAU8825_FLL_REF_DIV_SFT)
 
 /* FLL5 (0x08) */
 #define NAU8825_FLL_PDB_DAC_EN		(0x1 << 15)

[toc] | [prev] | [next] | [standalone]


#1704470 — [PATCH 4.9 081/105] benet: stricter vxlan offloading check in be_features_check

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 081/105] benet: stricter vxlan offloading check in be_features_check
Message-ID<uaUPg-5G0-29@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sabrina Dubroca <sd@queasysnail.net>


[ Upstream commit 096de2f83ebc8e0404c5b7e847a4abd27b9739da ]

When VXLAN offloading is enabled, be_features_check() tries to check if
an encapsulated packet is indeed a VXLAN packet. The check is not strict
enough, and considers any UDP-encapsulated ethernet frame with a 8-byte
tunnel header as being VXLAN. Unfortunately, both GENEVE and VXLAN-GPE
have a 8-byte header, so they get through this check.

Force the UDP destination port to be the one that has been offloaded to
hardware.

Without this, GENEVE-encapsulated packets can end up having an incorrect
checksum when both a GENEVE and a VXLAN (offloaded) tunnel are
configured.

This is similar to commit a547224dceed ("mlx4e: Do not attempt to
offload VXLAN ports that are unrecognized").

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
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/emulex/benet/be_main.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -5186,7 +5186,9 @@ static netdev_features_t be_features_che
 	    skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
 	    skb->inner_protocol != htons(ETH_P_TEB) ||
 	    skb_inner_mac_header(skb) - skb_transport_header(skb) !=
-	    sizeof(struct udphdr) + sizeof(struct vxlanhdr))
+		sizeof(struct udphdr) + sizeof(struct vxlanhdr) ||
+	    !adapter->vxlan_port ||
+	    udp_hdr(skb)->dest != adapter->vxlan_port)
 		return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 
 	return features;

[toc] | [prev] | [next] | [standalone]


#1704471 — [PATCH 4.9 064/105] spi: dw: Make debugfs name unique between instances

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 064/105] spi: dw: Make debugfs name unique between instances
Message-ID<uaUPh-5G0-33@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Phil Reid <preid@electromag.com.au>


[ Upstream commit 13288bdf4adbaa6bd1267f10044c1bc25d90ce7f ]

Some system have multiple dw devices. Currently the driver uses a
fixed name for the debugfs dir. Append dev name to the debugfs dir
name to make it unique.

Signed-off-by: Phil Reid <preid@electromag.com.au>
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>
---
 drivers/spi/spi-dw.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -107,7 +107,10 @@ static const struct file_operations dw_s
 
 static int dw_spi_debugfs_init(struct dw_spi *dws)
 {
-	dws->debugfs = debugfs_create_dir("dw_spi", NULL);
+	char name[128];
+
+	snprintf(name, 128, "dw_spi-%s", dev_name(&dws->master->dev));
+	dws->debugfs = debugfs_create_dir(name, NULL);
 	if (!dws->debugfs)
 		return -ENOMEM;
 

[toc] | [prev] | [next] | [standalone]


#1704472 — [PATCH 4.9 058/105] drm/msm: Ensure that the hardware write pointer is valid

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 058/105] drm/msm: Ensure that the hardware write pointer is valid
Message-ID<uaUPg-5G0-31@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jordan Crouse <jcrouse@codeaurora.org>


[ Upstream commit 88b333b0ed790f9433ff542b163bf972953b74d3 ]

Currently the value written to CP_RB_WPTR is calculated on the fly as
(rb->next - rb->start). But as the code is designed rb->next is wrapped
before writing the commands so if a series of commands happened to
fit perfectly in the ringbuffer, rb->next would end up being equal to
rb->size / 4 and thus result in an out of bounds address to CP_RB_WPTR.

The easiest way to fix this is to mask WPTR when writing it to the
hardware; it makes the hardware happy and the rest of the ringbuffer
math appears to work and there isn't any point in upsetting anything.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
[squash in is_power_of_2() check]
Signed-off-by: Rob Clark <robdclark@gmail.com>

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c |    9 ++++++++-
 drivers/gpu/drm/msm/msm_ringbuffer.c    |    3 ++-
 2 files changed, 10 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -210,7 +210,14 @@ void adreno_submit(struct msm_gpu *gpu,
 void adreno_flush(struct msm_gpu *gpu)
 {
 	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
-	uint32_t wptr = get_wptr(gpu->rb);
+	uint32_t wptr;
+
+	/*
+	 * Mask wptr value that we calculate to fit in the HW range. This is
+	 * to account for the possibility that the last command fit exactly into
+	 * the ringbuffer and rb->next hasn't wrapped to zero yet
+	 */
+	wptr = get_wptr(gpu->rb) & ((gpu->rb->size / 4) - 1);
 
 	/* ensure writes to ringbuffer have hit system memory: */
 	mb();
--- a/drivers/gpu/drm/msm/msm_ringbuffer.c
+++ b/drivers/gpu/drm/msm/msm_ringbuffer.c
@@ -23,7 +23,8 @@ struct msm_ringbuffer *msm_ringbuffer_ne
 	struct msm_ringbuffer *ring;
 	int ret;
 
-	size = ALIGN(size, 4);   /* size should be dword aligned */
+	if (WARN_ON(!is_power_of_2(size)))
+		return ERR_PTR(-EINVAL);
 
 	ring = kzalloc(sizeof(*ring), GFP_KERNEL);
 	if (!ring) {

[toc] | [prev] | [next] | [standalone]


#1704474 — [PATCH 4.9 046/105] x86/mce/AMD: Make the init code more robust

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 046/105] x86/mce/AMD: Make the init code more robust
Message-ID<uaUPh-5G0-37@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Gleixner <tglx@linutronix.de>


[ Upstream commit 0dad3a3014a0b9e72521ff44f17e0054f43dcdea ]

If mce_device_init() fails then the mce device pointer is NULL and the
AMD mce code happily dereferences it.

Add a sanity check.

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/x86/kernel/cpu/mcheck/mce_amd.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -955,6 +955,9 @@ static int threshold_create_bank(unsigne
 	const char *name = get_name(bank, NULL);
 	int err = 0;
 
+	if (!dev)
+		return -ENODEV;
+
 	if (is_shared_bank(bank)) {
 		nb = node_to_amd_nb(amd_get_nb_id(cpu));
 

[toc] | [prev] | [next] | [standalone]


#1704475 — [PATCH 4.9 057/105] net/mlx4_core: Fix raw qp flow steering rules under SRIOV

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 057/105] net/mlx4_core: Fix raw qp flow steering rules under SRIOV
Message-ID<uaUPh-5G0-39@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jack Morgenstein <jackm@dev.mellanox.co.il>


[ Upstream commit 10b1c04e92229ebeb38ccd0dcf2b6d3ec73c0575 ]

Demoting simple flow steering rule priority (for DPDK) was achieved by
wrapping FW commands MLX4_QP_FLOW_STEERING_ATTACH/DETACH for the PF
as well, and forcing the priority to MLX4_DOMAIN_NIC in the wrapper
function for the PF and all VFs.

In function mlx4_ib_create_flow(), this change caused the main rule
creation for the PF to be wrapped, while it left the associated
tunnel steering rule creation unwrapped for the PF.

This mismatch caused rule deletion failures in mlx4_ib_destroy_flow()
for the PF when the detach wrapper function did not find the associated
tunnel-steering rule (since creation of that rule for the PF did not
go through the wrapper function).

Fix this by setting MLX4_QP_FLOW_STEERING_ATTACH/DETACH to be "native"
(so that the PF invocation does not go through the wrapper), and perform
the required priority demotion for the PF in the mlx4_ib_create_flow()
code path.

Fixes: 48564135cba8 ("net/mlx4_core: Demote simple multicast and broadcast flow steering rules")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Tariq Toukan <tariqt@mellanox.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/infiniband/hw/mlx4/main.c                     |   14 +++++++++--
 drivers/net/ethernet/mellanox/mlx4/main.c             |   18 ++++++++++++++
 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c |   22 ------------------
 include/linux/mlx4/device.h                           |    2 +
 4 files changed, 33 insertions(+), 23 deletions(-)

--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -1680,9 +1680,19 @@ static int __mlx4_ib_create_flow(struct
 		size += ret;
 	}
 
+	if (mlx4_is_master(mdev->dev) && flow_type == MLX4_FS_REGULAR &&
+	    flow_attr->num_of_specs == 1) {
+		struct _rule_hw *rule_header = (struct _rule_hw *)(ctrl + 1);
+		enum ib_flow_spec_type header_spec =
+			((union ib_flow_spec *)(flow_attr + 1))->type;
+
+		if (header_spec == IB_FLOW_SPEC_ETH)
+			mlx4_handle_eth_header_mcast_prio(ctrl, rule_header);
+	}
+
 	ret = mlx4_cmd_imm(mdev->dev, mailbox->dma, reg_id, size >> 2, 0,
 			   MLX4_QP_FLOW_STEERING_ATTACH, MLX4_CMD_TIME_CLASS_A,
-			   MLX4_CMD_WRAPPED);
+			   MLX4_CMD_NATIVE);
 	if (ret == -ENOMEM)
 		pr_err("mcg table is full. Fail to register network rule.\n");
 	else if (ret == -ENXIO)
@@ -1699,7 +1709,7 @@ static int __mlx4_ib_destroy_flow(struct
 	int err;
 	err = mlx4_cmd(dev, reg_id, 0, 0,
 		       MLX4_QP_FLOW_STEERING_DETACH, MLX4_CMD_TIME_CLASS_A,
-		       MLX4_CMD_WRAPPED);
+		       MLX4_CMD_NATIVE);
 	if (err)
 		pr_err("Fail to detach network rule. registration id = 0x%llx\n",
 		       reg_id);
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -42,6 +42,7 @@
 #include <linux/io-mapping.h>
 #include <linux/delay.h>
 #include <linux/kmod.h>
+#include <linux/etherdevice.h>
 #include <net/devlink.h>
 
 #include <linux/mlx4/device.h>
@@ -782,6 +783,23 @@ int mlx4_is_slave_active(struct mlx4_dev
 }
 EXPORT_SYMBOL(mlx4_is_slave_active);
 
+void mlx4_handle_eth_header_mcast_prio(struct mlx4_net_trans_rule_hw_ctrl *ctrl,
+				       struct _rule_hw *eth_header)
+{
+	if (is_multicast_ether_addr(eth_header->eth.dst_mac) ||
+	    is_broadcast_ether_addr(eth_header->eth.dst_mac)) {
+		struct mlx4_net_trans_rule_hw_eth *eth =
+			(struct mlx4_net_trans_rule_hw_eth *)eth_header;
+		struct _rule_hw *next_rule = (struct _rule_hw *)(eth + 1);
+		bool last_rule = next_rule->size == 0 && next_rule->id == 0 &&
+			next_rule->rsvd == 0;
+
+		if (last_rule)
+			ctrl->prio = cpu_to_be16(MLX4_DOMAIN_NIC);
+	}
+}
+EXPORT_SYMBOL(mlx4_handle_eth_header_mcast_prio);
+
 static void slave_adjust_steering_mode(struct mlx4_dev *dev,
 				       struct mlx4_dev_cap *dev_cap,
 				       struct mlx4_init_hca_param *hca_param)
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -4165,22 +4165,6 @@ static int validate_eth_header_mac(int s
 	return 0;
 }
 
-static void handle_eth_header_mcast_prio(struct mlx4_net_trans_rule_hw_ctrl *ctrl,
-					 struct _rule_hw *eth_header)
-{
-	if (is_multicast_ether_addr(eth_header->eth.dst_mac) ||
-	    is_broadcast_ether_addr(eth_header->eth.dst_mac)) {
-		struct mlx4_net_trans_rule_hw_eth *eth =
-			(struct mlx4_net_trans_rule_hw_eth *)eth_header;
-		struct _rule_hw *next_rule = (struct _rule_hw *)(eth + 1);
-		bool last_rule = next_rule->size == 0 && next_rule->id == 0 &&
-			next_rule->rsvd == 0;
-
-		if (last_rule)
-			ctrl->prio = cpu_to_be16(MLX4_DOMAIN_NIC);
-	}
-}
-
 /*
  * In case of missing eth header, append eth header with a MAC address
  * assigned to the VF.
@@ -4364,10 +4348,7 @@ int mlx4_QP_FLOW_STEERING_ATTACH_wrapper
 	header_id = map_hw_to_sw_id(be16_to_cpu(rule_header->id));
 
 	if (header_id == MLX4_NET_TRANS_RULE_ID_ETH)
-		handle_eth_header_mcast_prio(ctrl, rule_header);
-
-	if (slave == dev->caps.function)
-		goto execute;
+		mlx4_handle_eth_header_mcast_prio(ctrl, rule_header);
 
 	switch (header_id) {
 	case MLX4_NET_TRANS_RULE_ID_ETH:
@@ -4395,7 +4376,6 @@ int mlx4_QP_FLOW_STEERING_ATTACH_wrapper
 		goto err_put_qp;
 	}
 
-execute:
 	err = mlx4_cmd_imm(dev, inbox->dma, &vhcr->out_param,
 			   vhcr->in_modifier, 0,
 			   MLX4_QP_FLOW_STEERING_ATTACH, MLX4_CMD_TIME_CLASS_A,
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -1384,6 +1384,8 @@ int set_phv_bit(struct mlx4_dev *dev, u8
 int get_phv_bit(struct mlx4_dev *dev, u8 port, int *phv);
 int mlx4_get_is_vlan_offload_disabled(struct mlx4_dev *dev, u8 port,
 				      bool *vlan_offload_disabled);
+void mlx4_handle_eth_header_mcast_prio(struct mlx4_net_trans_rule_hw_ctrl *ctrl,
+				       struct _rule_hw *eth_header);
 int mlx4_find_cached_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *idx);
 int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx);
 int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index);

[toc] | [prev] | [next] | [standalone]


#1704476 — [PATCH 4.9 007/105] parisc: Prevent TLB speculation on flushed pages on CPUs that only support equivalent aliases

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 007/105] parisc: Prevent TLB speculation on flushed pages on CPUs that only support equivalent aliases
Message-ID<uaUPh-5G0-41@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: John David Anglin <dave.anglin@bell.net>

commit ae7a609c34b6fb12328c553b5f9aab26ae74a28e upstream.

Helge noticed that we flush the TLB page in flush_cache_page but not in
flush_cache_range or flush_cache_mm.

For a long time, we have had random segmentation faults building
packages on machines with PA8800/8900 processors.  These machines only
support equivalent aliases.  We don't see these faults on machines that
don't require strict coherency.  So, it appears TLB speculation
sometimes leads to cache corruption on machines that require coherency.

This patch adds TLB flushes to flush_cache_range and flush_cache_mm when
coherency is required.  We only flush the TLB in flush_cache_page when
coherency is required.

The patch also optimizes flush_cache_range.  It turns out we always have
the right context to use flush_user_dcache_range_asm and
flush_user_icache_range_asm.

The patch has been tested for some time on rp3440, rp3410 and A500-44.
It's been boot tested on c8000.  No random segmentation faults were
observed during testing.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/parisc/kernel/cache.c |   34 ++++++++++++++--------------------
 1 file changed, 14 insertions(+), 20 deletions(-)

--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -538,6 +538,10 @@ void flush_cache_mm(struct mm_struct *mm
 	struct vm_area_struct *vma;
 	pgd_t *pgd;
 
+	/* Flush the TLB to avoid speculation if coherency is required. */
+	if (parisc_requires_coherency())
+		flush_tlb_all();
+
 	/* Flushing the whole cache on each cpu takes forever on
 	   rp3440, etc.  So, avoid it if the mm isn't too big.  */
 	if (mm_total_size(mm) >= parisc_cache_flush_threshold) {
@@ -594,33 +598,22 @@ flush_user_icache_range(unsigned long st
 void flush_cache_range(struct vm_area_struct *vma,
 		unsigned long start, unsigned long end)
 {
-	unsigned long addr;
-	pgd_t *pgd;
-
 	BUG_ON(!vma->vm_mm->context);
 
+	/* Flush the TLB to avoid speculation if coherency is required. */
+	if (parisc_requires_coherency())
+		flush_tlb_range(vma, start, end);
+
 	if ((end - start) >= parisc_cache_flush_threshold) {
 		flush_cache_all();
 		return;
 	}
 
-	if (vma->vm_mm->context == mfsp(3)) {
-		flush_user_dcache_range_asm(start, end);
-		if (vma->vm_flags & VM_EXEC)
-			flush_user_icache_range_asm(start, end);
-		return;
-	}
+	BUG_ON(vma->vm_mm->context != mfsp(3));
 
-	pgd = vma->vm_mm->pgd;
-	for (addr = start & PAGE_MASK; addr < end; addr += PAGE_SIZE) {
-		unsigned long pfn;
-		pte_t *ptep = get_ptep(pgd, addr);
-		if (!ptep)
-			continue;
-		pfn = pte_pfn(*ptep);
-		if (pfn_valid(pfn))
-			__flush_cache_page(vma, addr, PFN_PHYS(pfn));
-	}
+	flush_user_dcache_range_asm(start, end);
+	if (vma->vm_flags & VM_EXEC)
+		flush_user_icache_range_asm(start, end);
 }
 
 void
@@ -629,7 +622,8 @@ flush_cache_page(struct vm_area_struct *
 	BUG_ON(!vma->vm_mm->context);
 
 	if (pfn_valid(pfn)) {
-		flush_tlb_page(vma, vmaddr);
+		if (parisc_requires_coherency())
+			flush_tlb_page(vma, vmaddr);
 		__flush_cache_page(vma, vmaddr, PFN_PHYS(pfn));
 	}
 }

[toc] | [prev] | [next] | [standalone]


#1704477 — [PATCH 4.9 051/105] ARM: dts: am57xx-idk: Put USB2 port in peripheral mode

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 051/105] ARM: dts: am57xx-idk: Put USB2 port in peripheral mode
Message-ID<uaUPh-5G0-45@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Roger Quadros <rogerq@ti.com>


[ Upstream commit 5acd016c88937be3667ba4e6b60f0f74455b5e80 ]

USB2 port can be operated in dual-role mode but till we
have dual-role support in dwc3 driver let's limit this
port to peripheral mode.

If we don't do so it defaults to host mode. USB1 port
is meant for host only operation and we don't want
both ports in host only mode.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/boot/dts/am57xx-idk-common.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm/boot/dts/am57xx-idk-common.dtsi
+++ b/arch/arm/boot/dts/am57xx-idk-common.dtsi
@@ -294,7 +294,7 @@
 };
 
 &usb2 {
-	dr_mode = "otg";
+	dr_mode = "peripheral";
 };
 
 &mmc2 {

[toc] | [prev] | [next] | [standalone]


#1704478 — [PATCH 4.9 044/105] net: skb_needs_check() accepts CHECKSUM_NONE for tx

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 044/105] net: skb_needs_check() accepts CHECKSUM_NONE for tx
Message-ID<uaUPh-5G0-47@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Eric Dumazet <edumazet@google.com>

commit 6e7bc478c9a006c701c14476ec9d389a484b4864 upstream.

My recent change missed fact that UFO would perform a complete
UDP checksum before segmenting in frags.

In this case skb->ip_summed is set to CHECKSUM_NONE.

We need to add this valid case to skb_needs_check()

Fixes: b2504a5dbef3 ("net: reduce skb_warn_bad_offload() noise")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/core/dev.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2702,9 +2702,10 @@ EXPORT_SYMBOL(skb_mac_gso_segment);
 static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
 {
 	if (tx_path)
-		return skb->ip_summed != CHECKSUM_PARTIAL;
-	else
-		return skb->ip_summed == CHECKSUM_NONE;
+		return skb->ip_summed != CHECKSUM_PARTIAL &&
+		       skb->ip_summed != CHECKSUM_NONE;
+
+	return skb->ip_summed == CHECKSUM_NONE;
 }
 
 /**

[toc] | [prev] | [next] | [standalone]


#1704479 — [PATCH 4.9 061/105] vfio-pci: use 32-bit comparisons for register address for gcc-4.5

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 061/105] vfio-pci: use 32-bit comparisons for register address for gcc-4.5
Message-ID<uaUPh-5G0-43@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Arnd Bergmann <arnd@arndb.de>


[ Upstream commit 45e869714489431625c569d21fc952428d761476 ]

Using ancient compilers (gcc-4.5 or older) on ARM, we get a link
failure with the vfio-pci driver:

ERROR: "__aeabi_lcmp" [drivers/vfio/pci/vfio-pci.ko] undefined!

The reason is that the compiler tries to do a comparison of
a 64-bit range. This changes it to convert to a 32-bit number
explicitly first, as newer compilers do for themselves.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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_rdwr.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/vfio/pci/vfio_pci_rdwr.c
+++ b/drivers/vfio/pci/vfio_pci_rdwr.c
@@ -193,7 +193,10 @@ ssize_t vfio_pci_vga_rw(struct vfio_pci_
 	if (!vdev->has_vga)
 		return -EINVAL;
 
-	switch (pos) {
+	if (pos > 0xbfffful)
+		return -EINVAL;
+
+	switch ((u32)pos) {
 	case 0xa0000 ... 0xbffff:
 		count = min(count, (size_t)(0xc0000 - pos));
 		iomem = ioremap_nocache(0xa0000, 0xbffff - 0xa0000 + 1);

[toc] | [prev] | [next] | [standalone]


#1704481 — [PATCH 4.9 011/105] NFS: invalidate file size when taking a lock.

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 011/105] NFS: invalidate file size when taking a lock.
Message-ID<uaUPh-5G0-51@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: NeilBrown <neilb@suse.com>

commit 442ce0499c0535f8972b68fa1fda357357a5c953 upstream.

Prior to commit ca0daa277aca ("NFS: Cache aggressively when file is open
for writing"), NFS would revalidate, or invalidate, the file size when
taking a lock.  Since that commit it only invalidates the file content.

If the file size is changed on the server while wait for the lock, the
client will have an incorrect understanding of the file size and could
corrupt data.  This particularly happens when writing beyond the
(supposed) end of file and can be easily be demonstrated with
posix_fallocate().

If an application opens an empty file, waits for a write lock, and then
calls posix_fallocate(), glibc will determine that the underlying
filesystem doesn't support fallocate (assuming version 4.1 or earlier)
and will write out a '0' byte at the end of each 4K page in the region
being fallocated that is after the end of the file.
NFS will (usually) detect that these writes are beyond EOF and will
expand them to cover the whole page, and then will merge the pages.
Consequently, NFS will write out large blocks of zeroes beyond where it
thought EOF was.  If EOF had moved, the pre-existing part of the file
will be over-written.  Locking should have protected against this,
but it doesn't.

This patch restores the use of nfs_zap_caches() which invalidated the
cached attributes.  When posix_fallocate() asks for the file size, the
request will go to the server and get a correct answer.

Fixes: ca0daa277aca ("NFS: Cache aggressively when file is open for writing")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfs/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -757,7 +757,7 @@ do_setlk(struct file *filp, int cmd, str
 	 */
 	nfs_sync_mapping(filp->f_mapping);
 	if (!NFS_PROTO(inode)->have_delegation(inode, FMODE_READ))
-		nfs_zap_mapping(inode, filp->f_mapping);
+		nfs_zap_caches(inode);
 out:
 	return status;
 }

[toc] | [prev] | [next] | [standalone]


#1704482 — [PATCH 4.9 070/105] l2tp: consider :: as wildcard address in l2tp_ip6 socket lookup

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-08-05 02:10 +0200
Subject[PATCH 4.9 070/105] l2tp: consider :: as wildcard address in l2tp_ip6 socket lookup
Message-ID<uaUPh-5G0-53@gated-at.bofh.it>
In reply to#1704274
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Guillaume Nault <g.nault@alphalink.fr>


[ Upstream commit 97b84fd6d91766ea57dcc350d78f42639e011c30 ]

An L2TP socket bound to the unspecified address should match with any
address. If not, it can't receive any packet and __l2tp_ip6_bind_lookup()
can't prevent another socket from binding on the same device/tunnel ID.

While there, rename the 'addr' variable to 'sk_laddr' (local addr), to
make following patch clearer.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
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>
---
 net/l2tp/l2tp_ip6.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -64,7 +64,7 @@ static struct sock *__l2tp_ip6_bind_look
 	struct sock *sk;
 
 	sk_for_each_bound(sk, &l2tp_ip6_bind_table) {
-		const struct in6_addr *addr = inet6_rcv_saddr(sk);
+		const struct in6_addr *sk_laddr = inet6_rcv_saddr(sk);
 		struct l2tp_ip6_sock *l2tp = l2tp_ip6_sk(sk);
 
 		if (l2tp == NULL)
@@ -72,7 +72,7 @@ static struct sock *__l2tp_ip6_bind_look
 
 		if ((l2tp->conn_id == tunnel_id) &&
 		    net_eq(sock_net(sk), net) &&
-		    (!addr || ipv6_addr_equal(addr, laddr)) &&
+		    (!sk_laddr || ipv6_addr_any(sk_laddr) || ipv6_addr_equal(sk_laddr, laddr)) &&
 		    (!sk->sk_bound_dev_if || !dif ||
 		     sk->sk_bound_dev_if == dif))
 			goto found;

[toc] | [prev] | [next] | [standalone]


Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6  Next page →

Back to top | Article view | linux.kernel


csiph-web