OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
6 years agoMerge "soc: qcom: hab: check the buffer's pointer before exporting it"
Linux Build Service Account [Tue, 17 Jul 2018 04:54:09 +0000 (21:54 -0700)]
Merge "soc: qcom: hab: check the buffer's pointer before exporting it"

6 years agoMerge "mmc: core: Update SD card removal logic based on cd gpio state"
Linux Build Service Account [Mon, 16 Jul 2018 18:36:26 +0000 (11:36 -0700)]
Merge "mmc: core: Update SD card removal logic based on cd gpio state"

6 years agoMerge "soc: qcom: hab: resolve NULL pointer dereference issues"
Linux Build Service Account [Mon, 16 Jul 2018 08:31:34 +0000 (01:31 -0700)]
Merge "soc: qcom: hab: resolve NULL pointer dereference issues"

6 years agoMerge "defconfig: gvm: enable msm hardware random generator"
Linux Build Service Account [Mon, 16 Jul 2018 08:31:33 +0000 (01:31 -0700)]
Merge "defconfig: gvm: enable msm hardware random generator"

6 years agoMerge "ssusb: vplatform: enable otg passthrough in la-gvm"
Linux Build Service Account [Mon, 16 Jul 2018 08:31:32 +0000 (01:31 -0700)]
Merge "ssusb: vplatform: enable otg passthrough in la-gvm"

6 years agoMerge "iommu/debug: Add mutex to make attach/detach thread safe"
Linux Build Service Account [Mon, 16 Jul 2018 08:31:31 +0000 (01:31 -0700)]
Merge "iommu/debug: Add mutex to make attach/detach thread safe"

6 years agoMerge "ARM: dts: msm: Add clock skew values for msm8996 CV2X boards"
Linux Build Service Account [Sun, 15 Jul 2018 20:23:50 +0000 (13:23 -0700)]
Merge "ARM: dts: msm: Add clock skew values for msm8996 CV2X boards"

6 years agoMerge "Documentation: devicetree: net: Add clock skew parameters for neutrino"
Linux Build Service Account [Sat, 14 Jul 2018 07:36:46 +0000 (00:36 -0700)]
Merge "Documentation: devicetree: net: Add clock skew parameters for neutrino"

6 years agoMerge "cnss2: Refactor PCIe bus related code"
Linux Build Service Account [Sat, 14 Jul 2018 07:36:46 +0000 (00:36 -0700)]
Merge "cnss2: Refactor PCIe bus related code"

6 years agoARM: dts: msm: Add clock skew values for msm8996 CV2X boards
Aditya Mathur [Fri, 13 Jul 2018 19:27:43 +0000 (12:27 -0700)]
ARM: dts: msm: Add clock skew values for msm8996 CV2X boards

Add phy clock skew values for the neutrino driver
on msm8996 CV2X boards.

Change-Id: Ic06b054dd6d5e4267fdec64d7d73786b54466444
Signed-off-by: Aditya Mathur <aditmath@codeaurora.org>
6 years agoDocumentation: devicetree: net: Add clock skew parameters for neutrino
Aditya Mathur [Fri, 13 Jul 2018 19:21:05 +0000 (12:21 -0700)]
Documentation: devicetree: net: Add clock skew parameters for neutrino

Add documentation for new PHY clock skew parameters
in the neutrino driver.

Change-Id: Ibefa49ef0f91e42e3bb6d050eeac4a4adfc67ee1
Signed-off-by: Aditya Mathur <aditmath@codeaurora.org>
6 years agoMerge "drm: msm: error notification and handling"
Linux Build Service Account [Fri, 13 Jul 2018 21:31:17 +0000 (14:31 -0700)]
Merge "drm: msm: error notification and handling"

6 years agoiommu/debug: Add mutex to make attach/detach thread safe
VENKATA RAO KAKANI [Fri, 13 Jul 2018 11:44:00 +0000 (17:14 +0530)]
iommu/debug: Add mutex to make attach/detach thread safe

This mutex lock will help to synchronise the usage of iommu domain
structure which is getting used by multiple threads to perform
iommu attach and iommu detach in case of any error.

Without this change we are seeing page poisoning - write after free
when running stress tests using iommu-debug test cases.

Change-Id: I388a90084ab8cc7e7097bac9a41ed5fed6dad312
Acked-by: Ankur Saxena <c_ankusa@qti.qualcomm.com>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: VENKATA RAO KAKANI <vkakani@codeaurora.org>
6 years agoMerge "adv7481: Fix AVI infoframe read"
Linux Build Service Account [Fri, 13 Jul 2018 10:01:25 +0000 (03:01 -0700)]
Merge "adv7481: Fix AVI infoframe read"

6 years agoMerge "cnss2: Add bus layer"
Linux Build Service Account [Fri, 13 Jul 2018 03:13:14 +0000 (20:13 -0700)]
Merge "cnss2: Add bus layer"

6 years agoMerge "net: core: null pointer derefernce in sockev_client_cb"
Linux Build Service Account [Fri, 13 Jul 2018 03:13:12 +0000 (20:13 -0700)]
Merge "net: core: null pointer derefernce in sockev_client_cb"

6 years agoMerge "usb: gadget: ffs: Remove IPC context create failure log"
Linux Build Service Account [Thu, 12 Jul 2018 12:37:43 +0000 (05:37 -0700)]
Merge "usb: gadget: ffs: Remove IPC context create failure log"

6 years agoMerge "msm: camera: isp: Add null check for vfe_dev."
Linux Build Service Account [Thu, 12 Jul 2018 12:37:33 +0000 (05:37 -0700)]
Merge "msm: camera: isp: Add null check for vfe_dev."

6 years agoMerge "cnss2: Do not load board data file if bdf_bypass is enabled"
Linux Build Service Account [Thu, 12 Jul 2018 12:37:15 +0000 (05:37 -0700)]
Merge "cnss2: Do not load board data file if bdf_bypass is enabled"

6 years agoMerge "iommu/debug: Add mutex to make attach/detach thread safe"
Linux Build Service Account [Thu, 12 Jul 2018 12:36:59 +0000 (05:36 -0700)]
Merge "iommu/debug: Add mutex to make attach/detach thread safe"

6 years agodefconfig: gvm: enable msm hardware random generator
Venkata Rao Kakani [Tue, 10 Jul 2018 12:23:35 +0000 (17:53 +0530)]
defconfig: gvm: enable msm hardware random generator

Enable MSM hardware random generator in LA-GVM.

Change-Id: I970986fd302dfc56544409682faa97c9e0a508bd
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
6 years agosoc: qcom: hab: resolve NULL pointer dereference issues
Yong Ding [Thu, 12 Jul 2018 05:35:43 +0000 (13:35 +0800)]
soc: qcom: hab: resolve NULL pointer dereference issues

Some NULL pointer dereference issues are fixed.

Change-Id: I0f7f8ede860c81d451f2105520750692fd4eee50
Signed-off-by: Yong Ding <yongding@codeaurora.org>
6 years agomsm: camera: isp: Add null check for vfe_dev.
Shobhit Singh [Tue, 26 Jun 2018 13:15:40 +0000 (18:45 +0530)]
msm: camera: isp: Add null check for vfe_dev.

In some cases, observed that vfe node information is
not filled in the stream information, this will lead
to a null pointer access. To avoid such scenarios,
a null check is added.

Change-Id: Ibe8e095629574e2d8b8fbb097449d49bc0a762b3
Signed-off-by: Shobhit Singh <shobsi@codeaurora.org>
6 years agocnss2: Refactor PCIe bus related code
Yue Ma [Wed, 27 Jun 2018 10:47:37 +0000 (16:17 +0530)]
cnss2: Refactor PCIe bus related code

PCIe bus related APIs should not directly called from common files.
Instead, create equivalent abstract BUS APIs from where it can
decide which corresponding PCIe bus APIs to be invoked. This will
help to extend other buses like USB and SDIO in the future.

Change-Id: I1f115173f2e6c34e3a8cb6f975349112f52697e4
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
6 years agocnss2: Add bus layer
Yue Ma [Tue, 26 Jun 2018 14:06:01 +0000 (19:36 +0530)]
cnss2: Add bus layer

Bus layer is a shim layer for potential buses (PCIe, USB and SDIO)
of WLAN devices. It abstracts all the bus related APIs for common
files of the driver so that it can help make them bus independent.

Change-Id: I06e19a26d34168fe0fcc65229a4519b868cd97c1
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
6 years agocnss2: Do not load board data file if bdf_bypass is enabled
Yue Ma [Fri, 8 Jun 2018 00:55:04 +0000 (17:55 -0700)]
cnss2: Do not load board data file if bdf_bypass is enabled

Send dummy board data file to firmware if bdf_bypass is enabled,
no matter the real file is present or not.

Change-Id: I042d0ce7190fa56f362baf99c5847edf50419377
Signed-off-by: Yue Ma <yuem@codeaurora.org>
6 years agoMerge "msm: adsprpc: destroy mutex before file free"
Linux Build Service Account [Wed, 11 Jul 2018 22:18:41 +0000 (15:18 -0700)]
Merge "msm: adsprpc: destroy mutex before file free"

6 years agoMerge "net: sockev: code cleanup"
Linux Build Service Account [Wed, 11 Jul 2018 14:09:25 +0000 (07:09 -0700)]
Merge "net: sockev: code cleanup"

6 years agoMerge "xhci: Fix use-after-free in xhci_free_virt_device"
Linux Build Service Account [Wed, 11 Jul 2018 14:09:24 +0000 (07:09 -0700)]
Merge "xhci: Fix use-after-free in xhci_free_virt_device"

6 years agoMerge "ufs: scsi: fix redzone overwritten error when print utp hci testbus"
Linux Build Service Account [Wed, 11 Jul 2018 14:09:23 +0000 (07:09 -0700)]
Merge "ufs: scsi: fix redzone overwritten error when print utp hci testbus"

6 years agoMerge "usb: dwc3-msm: Enable PHY IRQ wakeup only for non-auto targets"
Linux Build Service Account [Wed, 11 Jul 2018 14:09:23 +0000 (07:09 -0700)]
Merge "usb: dwc3-msm: Enable PHY IRQ wakeup only for non-auto targets"

6 years agoMerge "clk: msm: clock-mmss-8996: disable cache based clk rate"
Linux Build Service Account [Wed, 11 Jul 2018 14:09:22 +0000 (07:09 -0700)]
Merge "clk: msm: clock-mmss-8996: disable cache based clk rate"

6 years agomsm: adsprpc: destroy mutex before file free
Tharun Kumar Merugu [Wed, 11 Jul 2018 09:50:08 +0000 (15:20 +0530)]
msm: adsprpc: destroy mutex before file free

Destroy mutex before file free, to avoid use after free of mutex.

Change-Id: I4ff73dc17b15043eacbb299219a379bfd1a8efa6
Acked-by: Himateja Reddy <hmreddy@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
6 years agodrm: msm: error notification and handling
Rahul Sharma [Mon, 9 Jul 2018 10:09:27 +0000 (15:39 +0530)]
drm: msm: error notification and handling

This implementation facilitates a framework to report and recover the
errors in display hardware pipeline.

Change-Id: Ie4059dd8bcdd83f73b5a5165ae5a8363ae4efb94
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
6 years agonet: core: null pointer derefernce in sockev_client_cb
Tejaswi Tanikella [Tue, 12 Jun 2018 04:39:53 +0000 (10:09 +0530)]
net: core: null pointer derefernce in sockev_client_cb

sockev_client_cb creates a netlink message and populates
the nlmsg_data using the socket->sock information.
If socket is closed, while the nlmsg_data is being
populated, a null pointer dereference occurs.

BUG: KASAN: null-ptr-deref in sockev_client_cb+0x1e4/0x310 net/core/sockev_nlmcast.c:98
Read of size 2 at addr 0000000000000010 by task syz-executor/9398
CPU: 6 PID: 9398 Comm: syz-executor Tainted: G W O 4.9.92+ #1

Call trace:
[<ffffff94e2bebec4>] sockev_client_cb+0x1e4/0x310 net/core/sockev_nlmcast.c:98
[<ffffff94e14fb20c>] notifier_call_chain+0x94/0xe0 kernel/notifier.c:93
[<ffffff94e14fb894>] __blocking_notifier_call_chain+0x6c/0xb8 kernel/notifier.c:317
[<ffffff94e14fb920>] blocking_notifier_call_chain+0x40/0x50 kernel/notifier.c:328
[<ffffff94e2b727f8>] sockev_notify net/socket.c:180 [inline]
[<ffffff94e2b727f8>] SYSC_listen net/socket.c:1446 [inline]
[<ffffff94e2b727f8>] SyS_listen+0x1e0/0x1f8 net/socket.c:1428
[<ffffff94e1483f70>] el0_svc_naked+0x24/0x28

CR's Fixed: 2251042
Change-Id: Iad9eb58cd05fcdc0b5cc1ed24de56b69abb532b4
Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org>
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
6 years agonet: sockev: code cleanup
Tejaswi Tanikella [Wed, 11 Jul 2018 08:05:11 +0000 (13:35 +0530)]
net: sockev: code cleanup

Replace with cleaner NULL checks. Needed for dependent change
commit 59f6fd5f1905 ("net: core: null pointer derefernce in
sockev_client_cb").

Change-Id: Icdd7a5c9f3e3f343bb20b1f9b75fa580ea75a2dc
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
6 years agoufs: scsi: fix redzone overwritten error when print utp hci testbus
Can Guo [Tue, 20 Mar 2018 05:46:17 +0000 (22:46 -0700)]
ufs: scsi: fix redzone overwritten error when print utp hci testbus

When print UTP HCI testbus data, a redzone overwritten error is triggered
because the max select minor value goes across its border. This change
fixes it.

Change-Id: Ib085288f3770aa0ab3683926247fb95f5e50cb08
Signed-off-by: Can Guo <cang@codeaurora.org>
6 years agoMerge "Merge android-4.4.139 (7ba5557) into msm-4.4"
Linux Build Service Account [Wed, 11 Jul 2018 05:43:57 +0000 (22:43 -0700)]
Merge "Merge android-4.4.139 (7ba5557) into msm-4.4"

6 years agoMerge "ASoC: msm: Fix config control indices for TX DAIs"
Linux Build Service Account [Wed, 11 Jul 2018 05:43:54 +0000 (22:43 -0700)]
Merge "ASoC: msm: Fix config control indices for TX DAIs"

6 years agoMerge "include: qdsp6v2: avoid returning error code from stubbed function"
Linux Build Service Account [Wed, 11 Jul 2018 05:43:49 +0000 (22:43 -0700)]
Merge "include: qdsp6v2: avoid returning error code from stubbed function"

6 years agoMerge "Revert "drm/msm/sde: output black frame during resume operation""
Linux Build Service Account [Tue, 10 Jul 2018 15:50:42 +0000 (08:50 -0700)]
Merge "Revert "drm/msm/sde: output black frame during resume operation""

6 years agoMerge "mdss: mdp: Constant fetch start across dfps change"
Linux Build Service Account [Tue, 10 Jul 2018 15:50:39 +0000 (08:50 -0700)]
Merge "mdss: mdp: Constant fetch start across dfps change"

6 years agoMerge "DRM: DSI: setup software context during DSI prepare with splash"
Linux Build Service Account [Tue, 10 Jul 2018 15:50:36 +0000 (08:50 -0700)]
Merge "DRM: DSI:  setup software context during DSI prepare with splash"

6 years agoASoC: msm: Fix config control indices for TX DAIs
Satish Babu Patakokila [Thu, 5 Jul 2018 06:50:34 +0000 (12:20 +0530)]
ASoC: msm: Fix config control indices for TX DAIs

Correct the config control indices for TX DAIs of MI2S interface.

Change-Id: Ie8bf646a0c1fbd30abdb34703ae1f90ed9b484e8
Signed-off-by: Satish Babu Patakokila <sbpata@codeaurora.org>
6 years agousb: dwc3-msm: Enable PHY IRQ wakeup only for non-auto targets
Ajay Agarwal [Wed, 4 Jul 2018 05:26:28 +0000 (10:56 +0530)]
usb: dwc3-msm: Enable PHY IRQ wakeup only for non-auto targets

On automotive targets, we do not want the system to wakeup if the
connected peripheral is issuing remote wakeup when the system is
PM suspended. Do not enable the system wakeup capability of the
PHY IRQs if the target is automotive.

Change-Id: I0bd986fdfab8f978692b605a44301086de3d0a87
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
6 years agoadv7481: Fix AVI infoframe read
Suprith Malligere Shankaregowda [Sat, 7 Jul 2018 09:53:34 +0000 (15:23 +0530)]
adv7481: Fix AVI infoframe read

Change the AVI infoframe read to check avi_info_raw bit in
hdmi lvl raw status register instead of new_avi_info_raw
in hdmi edg raw status register. This is required so as not
to miss AVI infoframes if we disconnect and reconnect the
HDMI cable or close and reopen the application. Also return
error if no AVI infoframe is found and change some error
logs to be more specific.

Change-Id: If30ba820d255149f1b54f422b8e075e634271aaf
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
6 years agoMerge "usb: misc: Fix incorrect use of keywords in Kconfig"
Linux Build Service Account [Tue, 10 Jul 2018 07:19:33 +0000 (00:19 -0700)]
Merge "usb: misc: Fix incorrect use of keywords in Kconfig"

6 years agoMerge "scsi: ufs: print TSTBUS_UTP_HCI testbus data"
Linux Build Service Account [Tue, 10 Jul 2018 07:19:31 +0000 (00:19 -0700)]
Merge "scsi: ufs: print TSTBUS_UTP_HCI testbus data"

6 years agoinclude: qdsp6v2: avoid returning error code from stubbed function
Banajit Goswami [Tue, 10 Jul 2018 03:26:19 +0000 (20:26 -0700)]
include: qdsp6v2: avoid returning error code from stubbed function

If MSM_QDSP6_NOTIFIER is not enabled for a target, audio_notifier
feature will not be available for that target. Whenever a call is
made to audio_notifier when its not supported, returning error from
stubbed function may confuse the error with real failure (even though
the feature is not enabled on the target). Avoid returning error code
from stubbed function, when feature is disabled.

Change-Id: I37eb2e25e45b25948aff55f2a231195a22b16f05
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
6 years agoMerge "sdm660: defconfig: Enable GCM crypto configs"
Linux Build Service Account [Mon, 9 Jul 2018 19:30:24 +0000 (12:30 -0700)]
Merge "sdm660: defconfig: Enable GCM crypto configs"

6 years agoMerge "hid: usbhid: Changes to prevent buffer overflow"
Linux Build Service Account [Mon, 9 Jul 2018 19:30:23 +0000 (12:30 -0700)]
Merge "hid: usbhid: Changes to prevent buffer overflow"

6 years agoiommu/debug: Add mutex to make attach/detach thread safe
Vivek Gautam [Fri, 22 Jun 2018 14:23:31 +0000 (19:53 +0530)]
iommu/debug: Add mutex to make attach/detach thread safe

This mutex lock will help to synchronise the usage of iommu domain
structure which is getting used by multiple threads to perform
iommu attach and iommu detach in case of any error.

Without this change we are seeing page poisoning - write after free
when running stress tests using iommu-debug test cases.

Change-Id: I1033808a510786577c41201c2a6a330e5465d4d1
Acked-by: Ankur Saxena <c_ankusa@qti.qualcomm.com>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
6 years agoMerge "msm8998: defconfig: Enable GCM crypto configs."
Linux Build Service Account [Mon, 9 Jul 2018 10:59:42 +0000 (03:59 -0700)]
Merge "msm8998: defconfig: Enable GCM crypto configs."

6 years agoMerge "ASoC: msm: qdsp6v2: Update LSM param hdr size"
Linux Build Service Account [Mon, 9 Jul 2018 10:59:41 +0000 (03:59 -0700)]
Merge "ASoC: msm: qdsp6v2: Update LSM param hdr size"

6 years agoMerge "pmic: gpio: dt: disable unnecessary gpios in la-gvm"
Linux Build Service Account [Mon, 9 Jul 2018 10:59:39 +0000 (03:59 -0700)]
Merge "pmic: gpio: dt: disable unnecessary gpios in la-gvm"

6 years agossusb: vplatform: enable otg passthrough in la-gvm
Venkata Rao Kakani [Mon, 2 Jul 2018 12:53:32 +0000 (18:23 +0530)]
ssusb: vplatform: enable otg passthrough in la-gvm

Enable ssusb passthrough functionality in la-gvm

Change-Id: I9652cc2e4d2bdf9e0b2027abf0cce84eb77e049e
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
6 years agoMerge changes into msm-4.4
Gerrit - the friendly Code Review server [Mon, 9 Jul 2018 10:35:34 +0000 (03:35 -0700)]
Merge changes  into msm-4.4

6 years agomdss: mdp: Constant fetch start across dfps change
Animesh Kishore [Wed, 4 Jul 2018 12:51:04 +0000 (18:21 +0530)]
mdss: mdp: Constant fetch start across dfps change

Timing engine HW restricts changing programmable fetch
start when off. Fix fetch start in SW drivers.

Change-Id: I8ec80408a4ae36a7dfd963bc570fca9672d12341
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
6 years agosdm660: defconfig: Enable GCM crypto configs
Devi Sandeep Endluri V V [Mon, 9 Jul 2018 05:52:35 +0000 (11:22 +0530)]
sdm660: defconfig: Enable GCM crypto configs

Enable GCM crypto support.

Change-Id: I08b9d20ad314117bb30b21ffc2eabe8dd0cac7d3
CRs-Fixed: 2263373
Signed-off-by: Devi Sandeep Endluri V V <dendluri@codeaurora.org>
6 years agoMerge "msm: ais: sensor: Fix turning clocks off during suspend"
Linux Build Service Account [Mon, 9 Jul 2018 03:23:57 +0000 (20:23 -0700)]
Merge "msm: ais: sensor: Fix turning clocks off during suspend"

6 years agomsm8998: defconfig: Enable GCM crypto configs.
Devi Sandeep Endluri V V [Sun, 8 Jul 2018 18:55:58 +0000 (00:25 +0530)]
msm8998: defconfig: Enable GCM crypto configs.

Enable GCM crypto support.

CRs-Fixed: 2263373
Change-Id: Ic243892a71551e880ece90876c38bb08fd709b4b
Signed-off-by: Devi Sandeep Endluri V V <dendluri@codeaurora.org>
6 years agousb: misc: Fix incorrect use of keywords in Kconfig
Ajay Agarwal [Sat, 7 Jul 2018 09:01:57 +0000 (14:31 +0530)]
usb: misc: Fix incorrect use of keywords in Kconfig

In 'commit 60de9d752e97 ("usb: misc: Add snapshot of diag_bridge
driver")', we used wrong keyword in the Kconfig file. Fix that
by using "Qualcomm Technologies".

Change-Id: I6caecf19ed67257db7eda0289257118549d46836
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
6 years agoMerge "ARM: dts: msm: add sde block lengths on msm8996"
Linux Build Service Account [Sat, 7 Jul 2018 00:35:01 +0000 (17:35 -0700)]
Merge "ARM: dts: msm: add sde block lengths on msm8996"

6 years agoMerge "regulator: qpnp-lcdb: Disable the SC irq only for PM660L V1.1 and below"
Linux Build Service Account [Fri, 6 Jul 2018 16:57:16 +0000 (09:57 -0700)]
Merge "regulator: qpnp-lcdb: Disable the SC irq only for PM660L V1.1 and below"

6 years agoMerge "ARM: dts: msm: Set default status of I2C_8 as disabled"
Linux Build Service Account [Fri, 6 Jul 2018 16:57:14 +0000 (09:57 -0700)]
Merge "ARM: dts: msm: Set default status of I2C_8 as disabled"

6 years agoMerge "pinctrl: qcom: Clear status bit on irq_unmask"
Linux Build Service Account [Fri, 6 Jul 2018 16:57:12 +0000 (09:57 -0700)]
Merge "pinctrl: qcom: Clear status bit on irq_unmask"

6 years agoASoC: msm: qdsp6v2: Update LSM param hdr size
Soumya Managoli [Fri, 6 Jul 2018 05:27:52 +0000 (10:57 +0530)]
ASoC: msm: qdsp6v2: Update LSM param hdr size

q6lsm_pack_params requires param hdr size
to be filled and sent as argument.
Change is to update size with param_hdr_v3 struct size.

Change-Id: Id2380f3ceb887e1fc73b7f5f8e28ac93029082e4
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
6 years agohid: usbhid: Changes to prevent buffer overflow
Sriharsha Allenki [Thu, 22 Dec 2016 09:27:44 +0000 (14:57 +0530)]
hid: usbhid: Changes to prevent buffer overflow

Moved some value checks to right positions to prevent
buffer flow, which may be possible before. Previously
these value checks are in an else statement which may
not be executed.

Change-Id: I02dbecd074183581a6bdae6377097bc004bd3d3c
CRs-fixed: 1102936
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
6 years agoMerge "Revert "do d_instantiate/unlock_new_inode combinations safely""
Linux Build Service Account [Fri, 6 Jul 2018 07:10:22 +0000 (00:10 -0700)]
Merge "Revert "do d_instantiate/unlock_new_inode combinations safely""

6 years agomsm: ais: sensor: Fix turning clocks off during suspend
Suprith Malligere Shankaregowda [Thu, 5 Jul 2018 11:04:51 +0000 (16:34 +0530)]
msm: ais: sensor: Fix turning clocks off during suspend

Added condition check for suspend only if sensor state is power
down and for resume only if sensor state is power up in
pm functions on sensor driver to control.

Change-Id: Ia31f34dc103428423a86efe8f8012db18b5a75f1
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
6 years agopinctrl: qcom: Clear status bit on irq_unmask
Srinivas Ramana [Tue, 17 Oct 2017 11:54:06 +0000 (17:24 +0530)]
pinctrl: qcom: Clear status bit on irq_unmask

This commits reverts the commit a6566710adaa ("pinctrl:
qcom: Don't clear status bit on irq_unmask").
Above change causes an unexpected wakeup on the gpios when the
interrupt is enabled. The gpio interrupt status bit is getting set
after the irq is disabled and causing an immediate interrupt after
enablling the irq. So, revert this change to avoid unexpected/spurious
wakeups.

The above change came in as part of the merge commit 3a75d7a94709
("Merge 4.4.59 into android-4.4")

Change-Id: Ie58116c8ac5c81bc007d2c4398f5edfcbf9988d6
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
6 years agoregulator: qpnp-lcdb: Disable the SC irq only for PM660L V1.1 and below
Kiran Gunda [Wed, 27 Jun 2018 05:44:21 +0000 (11:14 +0530)]
regulator: qpnp-lcdb: Disable the SC irq only for PM660L V1.1 and below

PM660L v2.0 has the NCP power-on issue fixed. This allows enabling the
short-circuit IRQ. Enable the same.

Change-Id: I4c0523ef8c46dd9bac190d4ad69190ef777ef14b
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
6 years agoMerge "dts: msm: Add QSEECOM heap node on msm8996 lfv baseline platform"
Linux Build Service Account [Thu, 5 Jul 2018 21:33:21 +0000 (14:33 -0700)]
Merge "dts: msm: Add QSEECOM heap node on msm8996 lfv baseline platform"

6 years agoARM: dts: msm: Set default status of I2C_8 as disabled
Shrey Vijay [Thu, 5 Jul 2018 13:24:14 +0000 (18:54 +0530)]
ARM: dts: msm: Set default status of I2C_8 as disabled

Set default configuration of I2C_8 instance to disabled
state, for MSM8996 vplatform, such that clients can overwrite
and enable respective instance as per need.

Change-Id: I2e873cb27ba028323d6dc1a0aa302f2c32e2b69f
Signed-off-by: Shrey Vijay <shreyv@codeaurora.org>
6 years agodts: msm: Add QSEECOM heap node on msm8996 lfv baseline platform
Jomana Artul [Thu, 5 Jul 2018 10:24:57 +0000 (13:24 +0300)]
dts: msm: Add QSEECOM heap node on msm8996 lfv baseline platform

Added the QSEECOM ION heap node, to allow QSEECOM driver and QSEECOM
API library to allocate ION memory from QSEECOM heap.

Change-Id: I72162f8e45bfb8dd3d54e259947aa9604618a7ed
Signed-off-by: Jomana Artul <jartul@codeaurora.org>
6 years agodiag: Update mask buffer after reallocation
Manoj Prabhu B [Wed, 27 Jun 2018 10:35:57 +0000 (16:05 +0530)]
diag: Update mask buffer after reallocation

Currently, reallocated mask update buffers are not
updated if the received mask range is more than the
mask update buffer length. Update the reallocated buffer
address before writing the mask to peripherals.

CRs-Fixed: 2266693
Change-Id: I6b506ce68e17b7da61926b0f9543157812a8c555
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
6 years agoDRM: DSI: setup software context during DSI prepare with splash
Camus Wong [Fri, 29 Jun 2018 19:44:59 +0000 (15:44 -0400)]
DRM: DSI:  setup software context during DSI prepare with splash

When splash handoff is enabled, it should skip the hardware init
function.  However, the software context should setup properly to
reflect actual hardware state.

Change-Id: I2a69bf5fadab726459e874597022cf5b54503102
Signed-off-by: Camus Wong <camusw@codeaurora.org>
6 years agoMerge "Revert "packet: fix race condition in packet_set_ring""
Linux Build Service Account [Wed, 4 Jul 2018 14:24:45 +0000 (07:24 -0700)]
Merge "Revert "packet: fix race condition in packet_set_ring""

6 years agosoc: qcom: hab: check the buffer's pointer before exporting it
Yong Ding [Wed, 4 Jul 2018 07:05:37 +0000 (15:05 +0800)]
soc: qcom: hab: check the buffer's pointer before exporting it

When the buffer's pointer is NULL, -EINVAL will be returned for
its export.

Change-Id: I3fc949c6152974db360dc55d3dfdb0cb24150473
Signed-off-by: Yong Ding <yongding@codeaurora.org>
6 years agopmic: gpio: dt: disable unnecessary gpios in la-gvm
Venkata Rao Kakani [Wed, 4 Jul 2018 05:14:12 +0000 (10:44 +0530)]
pmic: gpio: dt: disable unnecessary gpios in la-gvm

Disable all pmic gpios which are not necessary for
la-gvm.

Change-Id: I8f2156bdfd2a065b7f29d4028424f369739435cf
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
6 years agoMerge "msm: kgsl: Add hibernation support"
Linux Build Service Account [Wed, 4 Jul 2018 05:17:57 +0000 (22:17 -0700)]
Merge "msm: kgsl: Add hibernation support"

6 years agoMerge "msm: ais: sensor: Fix turning off sensor during suspend"
Linux Build Service Account [Wed, 4 Jul 2018 05:17:56 +0000 (22:17 -0700)]
Merge "msm: ais: sensor: Fix turning off sensor during suspend"

6 years agodriver/ethernet/camera: NULL pointer checks before accessing
Venkata Rao Kakani [Tue, 3 Jul 2018 12:07:29 +0000 (17:37 +0530)]
driver/ethernet/camera: NULL pointer checks before accessing

Check NULL pointer conditions before accessing the
structure to avoid crashes.

Change-Id: I7633d94c265f01793f7aafc3ec2b27379539b857
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
6 years agoscsi: ufs: print TSTBUS_UTP_HCI testbus data
Subhash Jadavani [Wed, 21 Feb 2018 18:21:15 +0000 (10:21 -0800)]
scsi: ufs: print TSTBUS_UTP_HCI testbus data

This change adds supports to print TESTBUS_UTP_HCI testbus data.

Change-Id: I586a9f8cb6b38c546f1ec9e2f7e83ad2d1ad0625
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Can Guo <cang@codeaurora.org>
6 years agoRevert "do d_instantiate/unlock_new_inode combinations safely"
Gustavo Solaira [Tue, 3 Jul 2018 23:02:32 +0000 (16:02 -0700)]
Revert "do d_instantiate/unlock_new_inode combinations safely"

This reverts commit 03bb7588942a38623f108b3302c2d1aebb525696.
Causes oops with security smack enabled.

Change-Id: I14fb2b0841c6b71940bd3f08bd4b49b1d7b039a3
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
6 years agoMerge android-4.4.139 (7ba5557) into msm-4.4
Blagovest Kolenichev [Tue, 3 Jul 2018 19:24:13 +0000 (12:24 -0700)]
Merge android-4.4.139 (7ba5557) into msm-4.4

* refs/heads/tmp-7ba5557
  Linux 4.4.139
  Bluetooth: Fix connection if directed advertising and privacy is used
  cdc_ncm: avoid padding beyond end of skb
  dm thin: handle running out of data space vs concurrent discard
  block: Fix transfer when chunk sectors exceeds max
  spi: Fix scatterlist elements size in spi_map_buf
  Btrfs: fix unexpected cow in run_delalloc_nocow
  ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210
  Input: elantech - fix V4 report decoding for module with middle key
  Input: elantech - enable middle button of touchpads on ThinkPad P52
  Input: elan_i2c_smbus - fix more potential stack buffer overflows
  udf: Detect incorrect directory size
  xen: Remove unnecessary BUG_ON from __unbind_from_irq()
  Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID
  video: uvesafb: Fix integer overflow in allocation
  NFSv4: Fix possible 1-byte stack overflow in nfs_idmap_read_and_verify_message
  nfsd: restrict rd_maxcount to svc_max_payload in nfsd_encode_readdir
  media: dvb_frontend: fix locking issues at dvb_frontend_get_event()
  media: cx231xx: Add support for AverMedia DVD EZMaker 7
  media: v4l2-compat-ioctl32: prevent go past max size
  perf intel-pt: Fix packet decoding of CYC packets
  perf intel-pt: Fix "Unexpected indirect branch" error
  perf intel-pt: Fix MTC timing after overflow
  perf intel-pt: Fix decoding to accept CBR between FUP and corresponding TIP
  perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING
  perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
  mfd: intel-lpss: Program REMAP register in PIO mode
  backlight: tps65217_bl: Fix Device Tree node lookup
  backlight: max8925_bl: Fix Device Tree node lookup
  backlight: as3711_bl: Fix Device Tree node lookup
  xfrm: skip policies marked as dead while rehashing
  xfrm: Ignore socket policies when rebuilding hash tables
  UBIFS: Fix potential integer overflow in allocation
  ubi: fastmap: Cancel work upon detach
  md: fix two problems with setting the "re-add" device state.
  linvdimm, pmem: Preserve read-only setting for pmem devices
  scsi: zfcp: fix missing REC trigger trace on enqueue without ERP thread
  scsi: zfcp: fix missing REC trigger trace for all objects in ERP_FAILED
  scsi: zfcp: fix missing REC trigger trace on terminate_rport_io for ERP_FAILED
  scsi: zfcp: fix missing REC trigger trace on terminate_rport_io early return
  scsi: zfcp: fix misleading REC trigger trace where erp_action setup failed
  scsi: zfcp: fix missing SCSI trace for retry of abort / scsi_eh TMF
  scsi: zfcp: fix missing SCSI trace for result of eh_host_reset_handler
  scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails
  iio:buffer: make length types match kfifo types
  Btrfs: fix clone vs chattr NODATASUM race
  time: Make sure jiffies_to_msecs() preserves non-zero time periods
  MIPS: io: Add barrier after register read in inX()
  PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume
  MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum
  mtd: cfi_cmdset_0002: Avoid walking all chips when unlocking.
  mtd: cfi_cmdset_0002: Fix unlocking requests crossing a chip boudary
  mtd: cfi_cmdset_0002: fix SEGV unlocking multiple chips
  mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock()
  mtd: cfi_cmdset_0002: Change write buffer to check correct value
  RDMA/mlx4: Discard unknown SQP work requests
  IB/qib: Fix DMA api warning with debug kernel
  of: unittest: for strings, account for trailing \0 in property length field
  ARM: 8764/1: kgdb: fix NUMREGBYTES so that gdb_regs[] is the correct size
  powerpc/fadump: Unregister fadump on kexec down path.
  cpuidle: powernv: Fix promotion from snooze if next state disabled
  powerpc/ptrace: Fix enforcement of DAWR constraints
  powerpc/ptrace: Fix setting 512B aligned breakpoints with PTRACE_SET_DEBUGREG
  powerpc/mm/hash: Add missing isync prior to kernel stack SLB switch
  fuse: fix control dir setup and teardown
  fuse: don't keep dead fuse_conn at fuse_fill_super().
  fuse: atomic_o_trunc should truncate pagecache
  Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader
  ipmi:bt: Set the timeout before doing a capabilities check
  branch-check: fix long->int truncation when profiling branches
  mips: ftrace: fix static function graph tracing
  lib/vsprintf: Remove atomic-unsafe support for %pCr
  ASoC: cirrus: i2s: Fix {TX|RX}LinCtrlData setup
  ASoC: cirrus: i2s: Fix LRCLK configuration
  ASoC: dapm: delete dapm_kcontrol_data paths list before freeing it
  1wire: family module autoload fails because of upper/lower case mismatch.
  usb: do not reset if a low-speed or full-speed device timed out
  signal/xtensa: Consistenly use SIGBUS in do_unaligned_user
  serial: sh-sci: Use spin_{try}lock_irqsave instead of open coding version
  m68k/mm: Adjust VM area to be unmapped by gap size for __iounmap()
  x86/spectre_v1: Disable compiler optimizations over array_index_mask_nospec()
  fs/binfmt_misc.c: do not allow offset overflow
  w1: mxc_w1: Enable clock before calling clk_get_rate() on it
  libata: Drop SanDisk SD7UB3Q*G1001 NOLPM quirk
  libata: zpodd: small read overflow in eject_tray()
  libata: zpodd: make arrays cdb static, reduces object code size
  cpufreq: Fix new policy initialization during limits updates via sysfs
  ALSA: hda: add dock and led support for HP ProBook 640 G4
  ALSA: hda: add dock and led support for HP EliteBook 830 G5
  ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream()
  btrfs: scrub: Don't use inode pages for device replace
  driver core: Don't ignore class_dir_create_and_add() failure.
  ext4: fix fencepost error in check for inode count overflow during resize
  ext4: update mtime in ext4_punch_hole even if no blocks are released
  tcp: verify the checksum of the first data segment in a new connection
  bonding: re-evaluate force_primary when the primary slave name changes
  usb: musb: fix remote wakeup racing with suspend
  Btrfs: make raid6 rebuild retry more
  tcp: do not overshoot window_clamp in tcp_rcv_space_adjust()
  Revert "Btrfs: fix scrub to repair raid6 corruption"
  net/sonic: Use dma_mapping_error()
  net: qmi_wwan: Add Netgear Aircard 779S
  atm: zatm: fix memcmp casting
  ipvs: fix buffer overflow with sync daemon and service
  netfilter: ebtables: handle string from userspace with care
  xfrm6: avoid potential infinite loop in _decode_session6()
  ANDROID: Add kconfig to make dm-verity check_at_most_once default enabled
  ANDROID: sdcardfs: fix potential crash when reserved_mb is not zero

Change-Id: Ibcd2b6614843e4e8fd5a57acf350a9e83e1c0dbc
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
6 years agoMerge 4.4.139 into android-4.4
Greg Kroah-Hartman [Tue, 3 Jul 2018 16:23:34 +0000 (18:23 +0200)]
Merge 4.4.139 into android-4.4

Changes in 4.4.139
xfrm6: avoid potential infinite loop in _decode_session6()
netfilter: ebtables: handle string from userspace with care
ipvs: fix buffer overflow with sync daemon and service
atm: zatm: fix memcmp casting
net: qmi_wwan: Add Netgear Aircard 779S
net/sonic: Use dma_mapping_error()
Revert "Btrfs: fix scrub to repair raid6 corruption"
tcp: do not overshoot window_clamp in tcp_rcv_space_adjust()
Btrfs: make raid6 rebuild retry more
usb: musb: fix remote wakeup racing with suspend
bonding: re-evaluate force_primary when the primary slave name changes
tcp: verify the checksum of the first data segment in a new connection
ext4: update mtime in ext4_punch_hole even if no blocks are released
ext4: fix fencepost error in check for inode count overflow during resize
driver core: Don't ignore class_dir_create_and_add() failure.
btrfs: scrub: Don't use inode pages for device replace
ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream()
ALSA: hda: add dock and led support for HP EliteBook 830 G5
ALSA: hda: add dock and led support for HP ProBook 640 G4
cpufreq: Fix new policy initialization during limits updates via sysfs
libata: zpodd: make arrays cdb static, reduces object code size
libata: zpodd: small read overflow in eject_tray()
libata: Drop SanDisk SD7UB3Q*G1001 NOLPM quirk
w1: mxc_w1: Enable clock before calling clk_get_rate() on it
fs/binfmt_misc.c: do not allow offset overflow
x86/spectre_v1: Disable compiler optimizations over array_index_mask_nospec()
m68k/mm: Adjust VM area to be unmapped by gap size for __iounmap()
serial: sh-sci: Use spin_{try}lock_irqsave instead of open coding version
signal/xtensa: Consistenly use SIGBUS in do_unaligned_user
usb: do not reset if a low-speed or full-speed device timed out
1wire: family module autoload fails because of upper/lower case mismatch.
ASoC: dapm: delete dapm_kcontrol_data paths list before freeing it
ASoC: cirrus: i2s: Fix LRCLK configuration
ASoC: cirrus: i2s: Fix {TX|RX}LinCtrlData setup
lib/vsprintf: Remove atomic-unsafe support for %pCr
mips: ftrace: fix static function graph tracing
branch-check: fix long->int truncation when profiling branches
ipmi:bt: Set the timeout before doing a capabilities check
Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader
fuse: atomic_o_trunc should truncate pagecache
fuse: don't keep dead fuse_conn at fuse_fill_super().
fuse: fix control dir setup and teardown
powerpc/mm/hash: Add missing isync prior to kernel stack SLB switch
powerpc/ptrace: Fix setting 512B aligned breakpoints with PTRACE_SET_DEBUGREG
powerpc/ptrace: Fix enforcement of DAWR constraints
cpuidle: powernv: Fix promotion from snooze if next state disabled
powerpc/fadump: Unregister fadump on kexec down path.
ARM: 8764/1: kgdb: fix NUMREGBYTES so that gdb_regs[] is the correct size
of: unittest: for strings, account for trailing \0 in property length field
IB/qib: Fix DMA api warning with debug kernel
RDMA/mlx4: Discard unknown SQP work requests
mtd: cfi_cmdset_0002: Change write buffer to check correct value
mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock()
mtd: cfi_cmdset_0002: fix SEGV unlocking multiple chips
mtd: cfi_cmdset_0002: Fix unlocking requests crossing a chip boudary
mtd: cfi_cmdset_0002: Avoid walking all chips when unlocking.
MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum
PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume
MIPS: io: Add barrier after register read in inX()
time: Make sure jiffies_to_msecs() preserves non-zero time periods
Btrfs: fix clone vs chattr NODATASUM race
iio:buffer: make length types match kfifo types
scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails
scsi: zfcp: fix missing SCSI trace for result of eh_host_reset_handler
scsi: zfcp: fix missing SCSI trace for retry of abort / scsi_eh TMF
scsi: zfcp: fix misleading REC trigger trace where erp_action setup failed
scsi: zfcp: fix missing REC trigger trace on terminate_rport_io early return
scsi: zfcp: fix missing REC trigger trace on terminate_rport_io for ERP_FAILED
scsi: zfcp: fix missing REC trigger trace for all objects in ERP_FAILED
scsi: zfcp: fix missing REC trigger trace on enqueue without ERP thread
linvdimm, pmem: Preserve read-only setting for pmem devices
md: fix two problems with setting the "re-add" device state.
ubi: fastmap: Cancel work upon detach
UBIFS: Fix potential integer overflow in allocation
xfrm: Ignore socket policies when rebuilding hash tables
xfrm: skip policies marked as dead while rehashing
backlight: as3711_bl: Fix Device Tree node lookup
backlight: max8925_bl: Fix Device Tree node lookup
backlight: tps65217_bl: Fix Device Tree node lookup
mfd: intel-lpss: Program REMAP register in PIO mode
perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING
perf intel-pt: Fix decoding to accept CBR between FUP and corresponding TIP
perf intel-pt: Fix MTC timing after overflow
perf intel-pt: Fix "Unexpected indirect branch" error
perf intel-pt: Fix packet decoding of CYC packets
media: v4l2-compat-ioctl32: prevent go past max size
media: cx231xx: Add support for AverMedia DVD EZMaker 7
media: dvb_frontend: fix locking issues at dvb_frontend_get_event()
nfsd: restrict rd_maxcount to svc_max_payload in nfsd_encode_readdir
NFSv4: Fix possible 1-byte stack overflow in nfs_idmap_read_and_verify_message
video: uvesafb: Fix integer overflow in allocation
Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID
xen: Remove unnecessary BUG_ON from __unbind_from_irq()
udf: Detect incorrect directory size
Input: elan_i2c_smbus - fix more potential stack buffer overflows
Input: elantech - enable middle button of touchpads on ThinkPad P52
Input: elantech - fix V4 report decoding for module with middle key
ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210
Btrfs: fix unexpected cow in run_delalloc_nocow
spi: Fix scatterlist elements size in spi_map_buf
block: Fix transfer when chunk sectors exceeds max
dm thin: handle running out of data space vs concurrent discard
cdc_ncm: avoid padding beyond end of skb
Bluetooth: Fix connection if directed advertising and privacy is used
Linux 4.4.139

Change-Id: I93013bedf2ebe3e6a8718972d8854723609963cc
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
6 years agoMerge "ARM: dts: msm: Remove ahb-clk-vote property for msm8996-auto"
Linux Build Service Account [Tue, 3 Jul 2018 16:15:53 +0000 (09:15 -0700)]
Merge "ARM: dts: msm: Remove ahb-clk-vote property for msm8996-auto"

6 years agoARM: dts: msm: add sde block lengths on msm8996
Guchun Chen [Tue, 29 May 2018 10:01:38 +0000 (18:01 +0800)]
ARM: dts: msm: add sde block lengths on msm8996

Specify the length of the register blocks for sde
hardware on msm8996, which is needed to support
hardware register dumping.

CRs-Fixed: 2243728
Change-Id: I753ca0260ded630ef34ebf75913b22b22e741fb1
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
6 years agoLinux 4.4.139
Greg Kroah-Hartman [Tue, 3 Jul 2018 09:21:35 +0000 (11:21 +0200)]
Linux 4.4.139

6 years agoBluetooth: Fix connection if directed advertising and privacy is used
Szymon Janc [Tue, 3 Apr 2018 11:40:06 +0000 (13:40 +0200)]
Bluetooth: Fix connection if directed advertising and privacy is used

commit 082f2300cfa1a3d9d5221c38c5eba85d4ab98bd8 upstream.

Local random address needs to be updated before creating connection if
RPA from LE Direct Advertising Report was resolved in host. Otherwise
remote device might ignore connection request due to address mismatch.

This was affecting following qualification test cases:
GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C

Before patch:
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6          #11350 [hci0] 84680.231216
        Address: 56:BC:E8:24:11:68 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
> HCI Event: Command Complete (0x0e) plen 4                        #11351 [hci0] 84680.246022
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7         #11352 [hci0] 84680.246417
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                        #11353 [hci0] 84680.248854
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11354 [hci0] 84680.249466
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                        #11355 [hci0] 84680.253222
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                          #11356 [hci0] 84680.458387
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
        RSSI: -74 dBm (0xb6)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11357 [hci0] 84680.458737
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                        #11358 [hci0] 84680.469982
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25          #11359 [hci0] 84680.470444
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                          #11360 [hci0] 84680.474971
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0    #11361 [hci0] 84682.545385
> HCI Event: Command Complete (0x0e) plen 4                        #11362 [hci0] 84682.551014
      LE Create Connection Cancel (0x08|0x000e) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                          #11363 [hci0] 84682.551074
      LE Connection Complete (0x01)
        Status: Unknown Connection Identifier (0x02)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Connection interval: 0.00 msec (0x0000)
        Connection latency: 0 (0x0000)
        Supervision timeout: 0 msec (0x0000)
        Master clock accuracy: 0x00

After patch:
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7    #210 [hci0] 667.152459
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                   #211 [hci0] 667.153613
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2        #212 [hci0] 667.153704
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                   #213 [hci0] 667.154584
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                     #214 [hci0] 667.182619
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
        RSSI: -70 dBm (0xba)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2       #215 [hci0] 667.182704
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                  #216 [hci0] 667.183599
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6    #217 [hci0] 667.183645
        Address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
> HCI Event: Command Complete (0x0e) plen 4                  #218 [hci0] 667.184590
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25    #219 [hci0] 667.184613
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                    #220 [hci0] 667.186558
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                    #221 [hci0] 667.485824
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x07
@ MGMT Event: Device Connected (0x000b) plen 13          {0x0002} [hci0] 667.485996
        LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
        Flags: 0x00000000
        Data length: 0

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agocdc_ncm: avoid padding beyond end of skb
Bjørn Mork [Fri, 8 Jun 2018 07:15:24 +0000 (09:15 +0200)]
cdc_ncm: avoid padding beyond end of skb

commit 49c2c3f246e2fc3009039e31a826333dcd0283cd upstream.

Commit 4a0e3e989d66 ("cdc_ncm: Add support for moving NDP to end
of NCM frame") added logic to reserve space for the NDP at the
end of the NTB/skb.  This reservation did not take the final
alignment of the NDP into account, causing us to reserve too
little space. Additionally the padding prior to NDP addition did
not ensure there was enough space for the NDP.

The NTB/skb with the NDP appended would then exceed the configured
max size. This caused the final padding of the NTB to use a
negative count, padding to almost INT_MAX, and resulting in:

[60103.825970] BUG: unable to handle kernel paging request at ffff9641f2004000
[60103.825998] IP: __memset+0x24/0x30
[60103.826001] PGD a6a06067 P4D a6a06067 PUD 4f65a063 PMD 72003063 PTE 0
[60103.826013] Oops: 0002 [#1] SMP NOPTI
[60103.826018] Modules linked in: (removed(
[60103.826158] CPU: 0 PID: 5990 Comm: Chrome_DevTools Tainted: G           O 4.14.0-3-amd64 #1 Debian 4.14.17-1
[60103.826162] Hardware name: LENOVO 20081 BIOS 41CN28WW(V2.04) 05/03/2012
[60103.826166] task: ffff964193484fc0 task.stack: ffffb2890137c000
[60103.826171] RIP: 0010:__memset+0x24/0x30
[60103.826174] RSP: 0000:ffff964316c03b68 EFLAGS: 00010216
[60103.826178] RAX: 0000000000000000 RBX: 00000000fffffffd RCX: 000000001ffa5000
[60103.826181] RDX: 0000000000000005 RSI: 0000000000000000 RDI: ffff9641f2003ffc
[60103.826184] RBP: ffff964192f6c800 R08: 00000000304d434e R09: ffff9641f1d2c004
[60103.826187] R10: 0000000000000002 R11: 00000000000005ae R12: ffff9642e6957a80
[60103.826190] R13: ffff964282ff2ee8 R14: 000000000000000d R15: ffff9642e4843900
[60103.826194] FS:  00007f395aaf6700(0000) GS:ffff964316c00000(0000) knlGS:0000000000000000
[60103.826197] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[60103.826200] CR2: ffff9641f2004000 CR3: 0000000013b0c000 CR4: 00000000000006f0
[60103.826204] Call Trace:
[60103.826212]  <IRQ>
[60103.826225]  cdc_ncm_fill_tx_frame+0x5e3/0x740 [cdc_ncm]
[60103.826236]  cdc_ncm_tx_fixup+0x57/0x70 [cdc_ncm]
[60103.826246]  usbnet_start_xmit+0x5d/0x710 [usbnet]
[60103.826254]  ? netif_skb_features+0x119/0x250
[60103.826259]  dev_hard_start_xmit+0xa1/0x200
[60103.826267]  sch_direct_xmit+0xf2/0x1b0
[60103.826273]  __dev_queue_xmit+0x5e3/0x7c0
[60103.826280]  ? ip_finish_output2+0x263/0x3c0
[60103.826284]  ip_finish_output2+0x263/0x3c0
[60103.826289]  ? ip_output+0x6c/0xe0
[60103.826293]  ip_output+0x6c/0xe0
[60103.826298]  ? ip_forward_options+0x1a0/0x1a0
[60103.826303]  tcp_transmit_skb+0x516/0x9b0
[60103.826309]  tcp_write_xmit+0x1aa/0xee0
[60103.826313]  ? sch_direct_xmit+0x71/0x1b0
[60103.826318]  tcp_tasklet_func+0x177/0x180
[60103.826325]  tasklet_action+0x5f/0x110
[60103.826332]  __do_softirq+0xde/0x2b3
[60103.826337]  irq_exit+0xae/0xb0
[60103.826342]  do_IRQ+0x81/0xd0
[60103.826347]  common_interrupt+0x98/0x98
[60103.826351]  </IRQ>
[60103.826355] RIP: 0033:0x7f397bdf2282
[60103.826358] RSP: 002b:00007f395aaf57d8 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff6e
[60103.826362] RAX: 0000000000000000 RBX: 00002f07bc6d0900 RCX: 00007f39752d7fe7
[60103.826365] RDX: 0000000000000022 RSI: 0000000000000147 RDI: 00002f07baea02c0
[60103.826368] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
[60103.826371] R10: 00000000ffffffff R11: 0000000000000000 R12: 00002f07baea02c0
[60103.826373] R13: 00002f07bba227a0 R14: 00002f07bc6d090c R15: 0000000000000000
[60103.826377] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 49 89 f9 48 89 d1 83
e2 07 48 c1 e9 03 40 0f b6 f6 48 b8 01 01 01 01 01 01 01 01 48 0f af c6 <f3> 48
ab 89 d1 f3 aa 4c 89 c8 c3 90 49 89 f9 40 88 f0 48 89 d1
[60103.826442] RIP: __memset+0x24/0x30 RSP: ffff964316c03b68
[60103.826444] CR2: ffff9641f2004000

Commit e1069bbfcf3b ("net: cdc_ncm: Reduce memory use when kernel
memory low") made this bug much more likely to trigger by reducing
the NTB size under memory pressure.

Link: https://bugs.debian.org/893393
Reported-by: Горбешко Богдан <bodqhrohro@gmail.com>
Reported-and-tested-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
Cc: Enrico Mioso <mrkiko.rs@gmail.com>
Fixes: 4a0e3e989d66 ("cdc_ncm: Add support for moving NDP to end of NCM frame")
[ bmork:  tx_curr_size => tx_max and context fixup for v4.12 and older ]
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agodm thin: handle running out of data space vs concurrent discard
Mike Snitzer [Tue, 26 Jun 2018 16:04:23 +0000 (12:04 -0400)]
dm thin: handle running out of data space vs concurrent discard

commit a685557fbbc3122ed11e8ad3fa63a11ebc5de8c3 upstream.

Discards issued to a DM thin device can complete to userspace (via
fstrim) _before_ the metadata changes associated with the discards is
reflected in the thinp superblock (e.g. free blocks).  As such, if a
user constructs a test that loops repeatedly over these steps, block
allocation can fail due to discards not having completed yet:
1) fill thin device via filesystem file
2) remove file
3) fstrim

From initial report, here:
https://www.redhat.com/archives/dm-devel/2018-April/msg00022.html

"The root cause of this issue is that dm-thin will first remove
mapping and increase corresponding blocks' reference count to prevent
them from being reused before DISCARD bios get processed by the
underlying layers. However. increasing blocks' reference count could
also increase the nr_allocated_this_transaction in struct sm_disk
which makes smd->old_ll.nr_allocated +
smd->nr_allocated_this_transaction bigger than smd->old_ll.nr_blocks.
In this case, alloc_data_block() will never commit metadata to reset
the begin pointer of struct sm_disk, because sm_disk_get_nr_free()
always return an underflow value."

While there is room for improvement to the space-map accounting that
thinp is making use of: the reality is this test is inherently racey and
will result in the previous iteration's fstrim's discard(s) completing
vs concurrent block allocation, via dd, in the next iteration of the
loop.

No amount of space map accounting improvements will be able to allow
user's to use a block before a discard of that block has completed.

So the best we can really do is allow DM thinp to gracefully handle such
aggressive use of all the pool's data by degrading the pool into
out-of-data-space (OODS) mode.  We _should_ get that behaviour already
(if space map accounting didn't falsely cause alloc_data_block() to
believe free space was available).. but short of that we handle the
current reality that dm_pool_alloc_data_block() can return -ENOSPC.

Reported-by: Dennis Yang <dennisyang@qnap.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoblock: Fix transfer when chunk sectors exceeds max
Keith Busch [Tue, 26 Jun 2018 15:14:58 +0000 (09:14 -0600)]
block: Fix transfer when chunk sectors exceeds max

commit 15bfd21fbc5d35834b9ea383dc458a1f0c9e3434 upstream.

A device may have boundary restrictions where the number of sectors
between boundaries exceeds its max transfer size. In this case, we need
to cap the max size to the smaller of the two limits.

Reported-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Tested-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agospi: Fix scatterlist elements size in spi_map_buf
Maxime Chevallier [Fri, 2 Mar 2018 14:55:09 +0000 (15:55 +0100)]
spi: Fix scatterlist elements size in spi_map_buf

commit ce99319a182fe766be67f96338386f3ec73e321c upstream.

When SPI transfers can be offloaded using DMA, the SPI core need to
build a scatterlist to make sure that the buffer to be transferred is
dma-able.

This patch fixes the scatterlist entry size computation in the case
where the maximum acceptable scatterlist entry supported by the DMA
controller is less than PAGE_SIZE, when the buffer is vmalloced.

For each entry, the actual size is given by the minimum between the
desc_len (which is the max buffer size supported by the DMA controller)
and the remaining buffer length until we cross a page boundary.

Fixes: 65598c13fd66 ("spi: Fix per-page mapping of unaligned vmalloc-ed buffer")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoBtrfs: fix unexpected cow in run_delalloc_nocow
Liu Bo [Thu, 1 Feb 2018 00:09:13 +0000 (17:09 -0700)]
Btrfs: fix unexpected cow in run_delalloc_nocow

commit 5811375325420052fcadd944792a416a43072b7f upstream.

Fstests generic/475 provides a way to fail metadata reads while
checking if checksum exists for the inode inside run_delalloc_nocow(),
and csum_exist_in_range() interprets error (-EIO) as inode having
checksum and makes its caller enter the cow path.

In case of free space inode, this ends up with a warning in
cow_file_range().

The same problem applies to btrfs_cross_ref_exist() since it may also
read metadata in between.

With this, run_delalloc_nocow() bails out when errors occur at the two
places.

cc: <stable@vger.kernel.org> v2.6.28+
Fixes: 17d217fe970d ("Btrfs: fix nodatasum handling in balancing code")
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210
Takashi Iwai [Fri, 22 Jun 2018 10:17:45 +0000 (12:17 +0200)]
ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210

commit 275ec0cb946cb75ac8977f662e608fce92f8b8a8 upstream.

Fujitsu Seimens ESPRIMO Mobile U9210 requires the same fixup as H270
for the correct pin configs.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200107
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoInput: elantech - fix V4 report decoding for module with middle key
??? [Fri, 22 Jun 2018 00:15:32 +0000 (17:15 -0700)]
Input: elantech - fix V4 report decoding for module with middle key

commit e0ae2519ca004a628fa55aeef969c37edce522d3 upstream.

Some touchpad has middle key and it will be indicated in bit 2 of packet[0].
We need to fix V4 formation's byte mask to prevent error decoding.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoInput: elantech - enable middle button of touchpads on ThinkPad P52
Aaron Ma [Fri, 22 Jun 2018 00:14:01 +0000 (17:14 -0700)]
Input: elantech - enable middle button of touchpads on ThinkPad P52

commit 24bb555e6e46d96e2a954aa0295029a81cc9bbaa upstream.

PNPID is better way to identify the type of touchpads.
Enable middle button support on 2 types of touchpads on Lenovo P52.

Cc: stable@vger.kernel.org
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoInput: elan_i2c_smbus - fix more potential stack buffer overflows
Ben Hutchings [Tue, 19 Jun 2018 18:17:32 +0000 (11:17 -0700)]
Input: elan_i2c_smbus - fix more potential stack buffer overflows

commit 50fc7b61959af4b95fafce7fe5dd565199e0b61a upstream.

Commit 40f7090bb1b4 ("Input: elan_i2c_smbus - fix corrupted stack")
fixed most of the functions using i2c_smbus_read_block_data() to
allocate a buffer with the maximum block size.  However three
functions were left unchanged:

* In elan_smbus_initialize(), increase the buffer size in the same
  way.
* In elan_smbus_calibrate_result(), the buffer is provided by the
  caller (calibrate_store()), so introduce a bounce buffer.  Also
  name the result buffer size.
* In elan_smbus_get_report(), the buffer is provided by the caller
  but happens to be the right length.  Add a compile-time assertion
  to ensure this remains the case.

Cc: <stable@vger.kernel.org> # 3.19+
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>