Commit graph

590157 commits

Author SHA1 Message Date
Jin Li
54133d0b7d drm/msm: wait fence complete before flip
In async commit case, driver needs to always wait for input fence
before triggering the complete_commit path. Otherwise, there could
be tearing since GPU hasn't finished the composition rendering.

Change-Id: I73a54f5811fdcf8639618ce3cacf4cbaa00b406c
Signed-off-by: Felix Xiong <xayang@codeaurora.org>
Signed-off-by: Jin Li <jinl@codeaurora.org>
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
2017-05-16 18:09:03 +08:00
Pratham Pratap
1509025cbf USB: f_qc_rndis: Prevent use-after-free for _rndis_qc
Assume that there are two threads, thread1 is setting
value of _rndis_qc variable in rndis_qc_bind_config_vendor
function. Thread2 jumps in and get the value of _rndis_qc
in rndis_qc_open_dev function before it is freed in
rndis_qc_bind_config_vendor function, since rndis_ipa_init
or usb_add_function failed. Use-after-free will happen as
Thread2 is referencing freed objects. To prevent this
spinlock is used where ever it is needed to protect
_rndis_qc variable.

Change-Id: I4da50c125e401e90abec3dc6b4e2c4a504a63ba0
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
2017-05-16 01:59:48 -07:00
Vijay kumar Tumati
933316ef88 ARM: dts: msm: Add flash handle to camera1 device on SDM660
Add flash handle to camera1 device in SDM660 sensor
MTP/CDP/QRD platforms to support flash on auxiliary camera.

In dual camera usecase, even the auxiliary sensor uses
flash. So the flash handle should be added to this camera
node as well.

Change-Id: Id7b40e5e86e67aa1e5df95d2094641a50f81286e
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
2017-05-16 01:40:01 -07:00
Maria Yu
f4106f4657 soc: qcom: msm_bus: add rt mutex lock for cllist data
Cldata needed to be protected by lock since crash
happened when synchronous update and free.

CRs-Fixed: 2034222
Change-Id: Ied86461b784d69d9758dc3fc793a8a0de86e7f9c
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2017-05-16 16:16:12 +08:00
Ziqi Chen
5187aa6bfc ARM: dts: msm: Update high-speed PHY parameters for QRD SDM660
QRD SDM660 failed on high-speed eye diagram test. Updated
these parameters based on tuning result to pass compliance test.

Change-Id: Ice00698872be4c39c2184dbd5bc2d99af7641b02
Signed-off-by: Ziqi Chen <ziqic@codeaurora.org>
2017-05-15 23:55:29 -07:00
Ziqi Chen
73c0dce1f5 ARM: dts: msm: Update high-speed PHY parameters for QRD SDM630
QRD SDM630 failed on high-speed eye diagram test. Update these
parameters based on tuning result to pass compliance test.

Change-Id: I34bb4d7808448ba687bdd9495e1573cb9eac6098
Signed-off-by: Ziqi Chen <ziqic@codeaurora.org>
2017-05-15 23:47:04 -07:00
Sarada Prasanna Garnayak
fa85584489 ath10k: Define structure for copy engine interrupt map for SNOC
The WLAN driver request and free the copy engine interrupt
according to the WLAN host target communication and protocol
in different WLAN context and subsystem state. The ath10k snoc
free/request all copy engine interrupt line during wlan subsystem
recovery due to firmware crash or hardware interface down etc.

To avoid the kernel warning and fault due to redundant copy engine
interrupt request/free in different wlan state. Define structure
for copy engine to maintain the stat of copy engine interrupt list
request/free.

Change-Id: I5cf3de4feecfb3a93a930c4939dc0a80bfc14e55
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-05-15 23:43:45 -07:00
Xiaojun Sang
f485150d69 ASoC: msm: remove unused msm-compr-q6-v2
msm-compr-q6-v2.c and msm-compr-q6-v2.h are no longer used.

CRs-Fixed: 2022953
Change-Id: I856d90a212a3e123a2c8b80092aff003f7c608c7
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2017-05-15 19:23:40 -07:00
Can Guo
ea86ca8e20 defconfig: arm64: Enable UFSHCD_CMD_LOGGING flag
Enabling SCSI_UFSHCD_CMD_LOGGING flag in defconfig
file. With this feature eanbled, ufs commands send
through ufshcd shall be logged.

Change-Id: Ibc4d1f39221fbcdc926e030d1df08a9fea31d24c
Signed-off-by: Can Guo <cang@codeaurora.org>
2017-05-15 18:04:21 -07:00
Puja Gupta
91747af561 soc: qcom: Fix checks for QMI response values
The return values from QMI could be compared directly and was
incorrectly interpreted in service locator and notifier.

Also initialize structure in service locator so as to not have garbage
values in them.

Change-Id: I7f8f27857706e9508b64289d9263c79494c17a8d
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2017-05-15 13:26:51 -07:00
Ben Romberger
9b556eaa0e ASoC: msm: qdsp6v2: Add 144k sample rate to compress driver
Add support for 144k sample rate in the compress driver.
144k is supported for TrueHD pass-through.

Change-Id: I2a0e772e658e64f43ed1864814f91e7a36f67af6
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2017-05-15 13:01:47 -07:00
Hemant Kumar
adce509c28 usb: gadget: f_cdev: Fix NULL pointer dereference in cser_free_inst
If f_cdev_alloc() fails it frees the port context and set_inst_name()
call back returns with error. As a result free_func_inst() call back
is called which is dereferencing port context from f_cdev_opts context
which results into NULL ptr dereference. Fix the issue by adding NULL
check for port context pointer in f_cdev_opts context.

Change-Id: I69828761be0a9f7df714eec34894c13f762dcc43
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-05-15 12:24:00 -07:00
Animesh Kishore
97b31746b3 ARM: dts: msm: Enable dynamic fps for msm8998
Enabling dynamic fps for nt35597 wqxga panel on msm8998.
The feature helps to reduce fps when static screen
leading to power saving.

Change-Id: Icc040d3d764b70cdf9e9ba2523acd04c9a8691c6
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2017-05-15 11:15:37 -07:00
Nick Desaulniers
ccc9ce7791 tracing: do not leak kernel addresses
This likely breaks tracing tools like trace-cmd.  It logs in the same
format but now addresses are all 0x0.

Bug: 34277115
Change-Id: Ifb0d4d2a184bf0d95726de05b1acee0287a375d9
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: 9ad8f2cc1bb73a3e2255dff4ee9c45c909869225
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2017-05-15 10:45:17 -07:00
Robb Glasser
f872fd26e4 Prevent heap overflow in uvc driver
The size of uvc_control_mapping is user controlled leading to a
potential heap overflow in the uvc driver. This adds a check to verify
the user provided size fits within the bounds of the defined buffer
size.

Bug: 33300353
Change-Id: If29c1b396633b6137966a12e38f6fd1841b045bd
Signed-off-by: Robb Glasser <rglasser@google.com>
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: 8bc3ec72a02052187397d0de1a7b8bbe7340451c
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2017-05-15 10:44:22 -07:00
Maya Erez
9b372ef962 msm_11ad: add support to PCIe D3hot in system suspend
Transition to D3 hot in system suspend allows the wil6210
device to preserve the active connections in system suspend.

Change-Id: I4c24551f91ee7e59d4bfee02b0911c31ae0a05b1
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-15 16:57:58 +03:00
Maya Erez
36fc0ea2ed wil6210: add support for PCIe D3hot in system suspend
In order to preserve the connection in suspend/resume flow,
wil6210 host allows going to PCIe D3hot state in suspend,
instead of performing a full wil6210 device reset. This
requires the platform ability to initiate wakeup in case of
RX data. To check that, a new platform API is added.
In addition, add cfg80211 suspend/resume callbacks
implementation.

Change-Id: I3846eaaa8d6e9ecbe5adbb0c04c7574865d5af5e
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-15 16:57:46 +03:00
Kyle Yan
373b13c83b Merge remote-tracking branch 'origin/tmp-285c137' into msm-4.4
* origin/tmp-285c137:
  Linux 4.4.68
  block: get rid of blk_integrity_revalidate()
  drm/ttm: fix use-after-free races in vm fault handling
  f2fs: sanity check segment count
  bnxt_en: allocate enough space for ->ntp_fltr_bmap
  ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf
  ipv6: initialize route null entry in addrconf_init()
  rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string
  ipv4, ipv6: ensure raw socket message is big enough to hold an IP header
  tcp: do not inherit fastopen_req from parent
  tcp: fix wraparound issue in tcp_lp
  bpf, arm64: fix jit branch offset related to ldimm64
  tcp: do not underestimate skb->truesize in tcp_trim_head()
  ALSA: hda - Fix deadlock of controller device lock at unbinding
  staging: emxx_udc: remove incorrect __init annotations
  staging: wlan-ng: add missing byte order conversion
  brcmfmac: Make skb header writable before use
  brcmfmac: Ensure pointer correctly set if skb data location changes
  MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix
  scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m
  serial: 8250_omap: Fix probe and remove for PM runtime
  phy: qcom-usb-hs: Add depends on EXTCON
  USB: serial: io_edgeport: fix descriptor error handling
  USB: serial: mct_u232: fix modem-status error handling
  USB: serial: quatech2: fix control-message error handling
  USB: serial: ftdi_sio: fix latency-timer error handling
  USB: serial: ark3116: fix open error handling
  USB: serial: ti_usb_3410_5052: fix control-message error handling
  USB: serial: io_edgeport: fix epic-descriptor handling
  USB: serial: ssu100: fix control-message error handling
  USB: serial: digi_acceleport: fix incomplete rx sanity check
  USB: serial: keyspan_pda: fix receive sanity checks
  usb: chipidea: Handle extcon events properly
  usb: chipidea: Only read/write OTGSC from one place
  usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
  usb: host: ehci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
  KVM: nVMX: do not leak PML full vmexit to L1
  KVM: nVMX: initialize PML fields in vmcs02
  Revert "KVM: nested VMX: disable perf cpuid reporting"
  x86/platform/intel-mid: Correct MSI IRQ line for watchdog device
  kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed
  clk: Make x86/ conditional on CONFIG_COMMON_CLK
  x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0
  x86/ioapic: Restore IO-APIC irq_chip retrigger callback
  mwifiex: Avoid skipping WEP key deletion for AP
  mwifiex: remove redundant dma padding in AMSDU
  mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print
  ARM: OMAP5 / DRA7: Fix HYP mode boot for thumb2 build
  leds: ktd2692: avoid harmless maybe-uninitialized warning
  power: supply: bq24190_charger: Handle fault before status on interrupt
  power: supply: bq24190_charger: Don't read fault register outside irq_handle_thread()
  power: supply: bq24190_charger: Call power_supply_changed() for relevant component
  power: supply: bq24190_charger: Install irq_handler_thread() at end of probe()
  power: supply: bq24190_charger: Call set_mode_host() on pm_resume()
  power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING
  powerpc/powernv: Fix opal_exit tracepoint opcode
  cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores
  ARM: 8452/3: PJ4: make coprocessor access sequences buildable in Thumb2 mode
  9p: fix a potential acl leak
  ANDROID: android-base.cfg: remove spurious CONFIG_MODULES line
  ANDROID: memory_state_time: fix undefined behavior with missing DT properties
  ANDROID: rfkill: fix unused function warning
  ANDROID: make PF_KEY SHA256 use RFC-compliant truncation.
  ANDROID: sdcardfs: fix sdcardfs_destroy_inode for the inode RCU approach
  ANDROID: android-base.cfg: remove NETFILTER_XT_MATCH_QUOTA2_LOG
  ANDROID: sdcardfs: Don't iput if we didn't igrab
  ANDROID: Add untag hacks to inet_release function

Change-Id: I6d750f8bb186774ff9630beeb0ed8e680af26231
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-05-15 05:09:49 -07:00
Ramesh V
cc12a0966b msm: camera: isp : Fix race condition in close sequence
Serializing reset_hw and reset_irq, to avoid race condition.

Change-Id: I0fd4fc8cfcdef9fe0e0679c3cee44b2dddc7b506
Signed-off-by: Ramesh V <ramev@codeaurora.org>
2017-05-15 17:00:16 +05:30
Linux Build Service Account
75a9d0fee5 Merge "ARM: dts: msm: Update charging ESR timer value to 96 for PM660 FG" 2017-05-15 03:51:25 -07:00
Linux Build Service Account
e7c8de8d94 Merge "scsi: ufs: Initialize cmd_id and check lrbp->cmd NULL" 2017-05-15 03:51:24 -07:00
Linux Build Service Account
cdcdb7a314 Merge "mmc: mmc: Fix mmc_partial_init for HS400 mode" 2017-05-15 03:51:23 -07:00
Linux Build Service Account
1f7482db72 Merge "defconfig: msm: remove dcc config for perf on sdm660" 2017-05-15 03:51:22 -07:00
Linux Build Service Account
593bc3b721 Merge "sound: usb: Add default branches for BADD 3.0 devices" 2017-05-15 03:51:21 -07:00
Linux Build Service Account
2cc0f28c54 Merge "media: dvb-core: Fix coding errors in broadcast drivers" 2017-05-15 03:51:21 -07:00
Linux Build Service Account
3c50776b05 Merge "defconfig: msmcortex: Cleanup" 2017-05-15 03:51:20 -07:00
Linux Build Service Account
696b2e8fbe Merge "qpnp-smb2: Add software based glitch filter for OTG detection" 2017-05-15 03:51:19 -07:00
Linux Build Service Account
da60dd7190 Merge "dma-mapping: Always remap on dma buffer free" 2017-05-15 03:51:18 -07:00
Linux Build Service Account
c8b9cb715e Merge "ARM: dts: msm: Update the virtual corner for SDM630" 2017-05-15 03:51:17 -07:00
Linux Build Service Account
fee8893548 Merge "clk: Move vdd voting before set rate and parent" 2017-05-15 03:51:16 -07:00
Linux Build Service Account
fc2f0e6d95 Merge "usb: gadget: f_cdev: Increase number of driver instances to 3" 2017-05-15 03:51:15 -07:00
Linux Build Service Account
286d3aa674 Merge "msm: camera: isp: Fix excessive logging in w+t" 2017-05-15 03:51:14 -07:00
Depeng Shao
4f19bb77fe msm: camera: sensor: Validate sensor related name length
Variable "slave_info->sensor_name", "slave_info->eeprom_name",
"slave_info->actuator_name" and "slave_info->ois_name" are
from user input, which may be not NULL terminated.
OOB will be possible when accessing these variable.

Add a validation for these name length.

Change-Id: I9a570372707b7f8365a625d6b0662e87d1b4926e
Signed-off-by: Depeng Shao <dshao@codeaurora.org>
2017-05-15 03:25:54 -07:00
Arun Kumar Neelakantam
b0930c59a7 soc: qcom: smp2p: Fix simultaneous access of global loopback data
Running SMP2P tests from multiple threads causes simultaneous access to
the global loopback data and resulting into unexpected behavior.

Protect the global loopback data by synchronizing the SMP2P tests.

CRs-Fixed: 2041374
Change-Id: Ifb0e7ce5198af27602881a9132afb353f1a4fc2f
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2017-05-15 15:29:21 +05:30
Amir Samuelov
646bb3157b spcom: avoid user commands via /dev/spcom
The pseudo-file char-device-nodes /dev/spcom and /dev/sp_ssr are not
associated with a logical channel for data transfer with the Secure
Processor (SP).
Avoid sending user command by file write() over those device nodes.
The command "create channel" should be done over /dev/sp_kernel rather
than over /dev/spcom.
Verify that glink pass valid channel pointer to spcom callbacks.
Use size_t for channel "actual_rx_size" parameter that is provided by
glink to spcom callback.
Remove "fake SSR" command, since real SSR is supported by SP.

Change-Id: Id9113389d94ab4aed01d3ac1e370c4e8f3c8965b
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-05-15 00:55:31 -07:00
Terence Ho
96e3d4de6d msm: Initial ais driver for automotive camera
Initial driver directory setup for automotive
imaging subsystem - ais. The camera kernel drivers
for mobile and automotive platforms have been decoupled
and placed in separate directories as automotive usecases
will require significant divergence from mobile drivers.
The changes to the imaging pipeline drivers enable
automotive imaging subsystem interface from userspace.

This snapshot is taken as of msm-3.18 'commit c3d5931bbc51
("msm: Initial ais driver for automotive camera")'


Change-Id: I49b8e827818994d0a8b320ffe92f8031ffbb69ca
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
Signed-off-by: Andy Sun <bins@codeaurora.org>
2017-05-15 15:55:03 +08:00
Jin Li
9894f9ab8f drm/sde: only set split registers for DSI interfaces
The SPLIT related registers are only for DSI interfaces. Without
checking the interface type, they could be overwrote by
configurations through HDMI path.

CRs-Fixed: 1085586
Change-Id: I7ace9fd8dfe5ee99cb750b2723e8f22701039552
Signed-off-by: Jin Li <jinl@codeaurora.org>
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
2017-05-15 15:54:32 +08:00
Jin Li
ee02df530d drm/sde: set display h/v polarity according to panel info
The h/v polarity should always be set from the panel configuration.
For HDMI display, it's from the EDID information. For DSI display,
it's from the panel settings in the dtsi.

CRs-Fixed: 1085021
Change-Id: I3776603d7055e69eb2c8e5003ab83bc0483ab7c8
Signed-off-by: Jin Li <jinl@codeaurora.org>
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
2017-05-15 15:51:12 +08:00
Greg Kroah-Hartman
285c13770a This is the 4.4.68 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlkYQIMACgkQONu9yGCS
 aT6lQRAAx+GV9h6oAE5s6ehb/soIXrgvq/veRM52HRpECKvNOjp8p7rf2V9jLKy4
 HV/6n5Q7CClHgKkyfSvFput6iMzzzJWHl2cCFwiZ3e7eq3yCzIV4+Px0CD9SH5S7
 ukYSdmR5zU5oOoMvbW9op1GlUvyNlCtBqWLkXAhopyAuFG7aqvjprPRoJXNVsDqy
 QooRFbGilztrLTKXvnKlz2y0CDxrrHERRdVwRCpzeOpN0rEDoJfdNO6IoXph5vDj
 T2ZWH8WmL+2RPDUFA3fQ2pRKSZribk7Bw4BUDZGNKnXYGSwBWS4r0+1UkCyXGRda
 gLLajv0EIciXvNglkvZ6mzlCcucyJu1mhjFwh778HlFdzvgayxaXQMqFN72OPF8K
 SRsEZnBs4QiflLf4kI9WjiIBAL2uIrP6p9dFq8yHs5yEzRWGtXyODfFYRBnhW7ka
 KbJ47j+MMYvjyu82W+Zzw7qKFXluzLdQKzmY1HUiqegQEtwqjDr/jOL+uC0CkSBb
 OWSmo9/JZUcKn40epenP+ojgDkhJVoKeN5Cy1vWeDUV1pWjK+ErZ5GQZ9F9fNuvV
 MNaFjgQy+bZ4MQ1TgetZzvDKVnNHvuDwKKX6yIK1PHSMsBI4f7M1KLfwDi5WeUmg
 BeF3wDSQEhLGFhiwn3UzhK6VGjfaRsXXv8AhrELrgpnhWkZkg/A=
 =czqa
 -----END PGP SIGNATURE-----

Merge 4.4.68 into android-4.4

Changes in 4.4.68
	9p: fix a potential acl leak
	ARM: 8452/3: PJ4: make coprocessor access sequences buildable in Thumb2 mode
	cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores
	powerpc/powernv: Fix opal_exit tracepoint opcode
	power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING
	power: supply: bq24190_charger: Call set_mode_host() on pm_resume()
	power: supply: bq24190_charger: Install irq_handler_thread() at end of probe()
	power: supply: bq24190_charger: Call power_supply_changed() for relevant component
	power: supply: bq24190_charger: Don't read fault register outside irq_handle_thread()
	power: supply: bq24190_charger: Handle fault before status on interrupt
	leds: ktd2692: avoid harmless maybe-uninitialized warning
	ARM: OMAP5 / DRA7: Fix HYP mode boot for thumb2 build
	mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print
	mwifiex: remove redundant dma padding in AMSDU
	mwifiex: Avoid skipping WEP key deletion for AP
	x86/ioapic: Restore IO-APIC irq_chip retrigger callback
	x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0
	clk: Make x86/ conditional on CONFIG_COMMON_CLK
	kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed
	x86/platform/intel-mid: Correct MSI IRQ line for watchdog device
	Revert "KVM: nested VMX: disable perf cpuid reporting"
	KVM: nVMX: initialize PML fields in vmcs02
	KVM: nVMX: do not leak PML full vmexit to L1
	usb: host: ehci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
	usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
	usb: chipidea: Only read/write OTGSC from one place
	usb: chipidea: Handle extcon events properly
	USB: serial: keyspan_pda: fix receive sanity checks
	USB: serial: digi_acceleport: fix incomplete rx sanity check
	USB: serial: ssu100: fix control-message error handling
	USB: serial: io_edgeport: fix epic-descriptor handling
	USB: serial: ti_usb_3410_5052: fix control-message error handling
	USB: serial: ark3116: fix open error handling
	USB: serial: ftdi_sio: fix latency-timer error handling
	USB: serial: quatech2: fix control-message error handling
	USB: serial: mct_u232: fix modem-status error handling
	USB: serial: io_edgeport: fix descriptor error handling
	phy: qcom-usb-hs: Add depends on EXTCON
	serial: 8250_omap: Fix probe and remove for PM runtime
	scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m
	MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix
	brcmfmac: Ensure pointer correctly set if skb data location changes
	brcmfmac: Make skb header writable before use
	staging: wlan-ng: add missing byte order conversion
	staging: emxx_udc: remove incorrect __init annotations
	ALSA: hda - Fix deadlock of controller device lock at unbinding
	tcp: do not underestimate skb->truesize in tcp_trim_head()
	bpf, arm64: fix jit branch offset related to ldimm64
	tcp: fix wraparound issue in tcp_lp
	tcp: do not inherit fastopen_req from parent
	ipv4, ipv6: ensure raw socket message is big enough to hold an IP header
	rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string
	ipv6: initialize route null entry in addrconf_init()
	ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf
	bnxt_en: allocate enough space for ->ntp_fltr_bmap
	f2fs: sanity check segment count
	drm/ttm: fix use-after-free races in vm fault handling
	block: get rid of blk_integrity_revalidate()
	Linux 4.4.68

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-05-15 09:25:05 +02:00
Neeraj Upadhyay
1ef28deec0 timer: Clear deferrable_pending while handling timer softirq
Clear deferrable_pending everytime timer softirq is run.
This handles a potential race condition, where one CPU
handles all deferrable timers, before the other CPU gets
a change to run timer softirq. Due to the deferrable_pending
not getting cleared, subsequently, CPUs do not raise
the softirq for handling expired deferrable timers,
in nohz idle enter path.

Change-Id: Ie5fd78f9b27e7553ba43101b86ad939c289827e0
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-05-15 00:06:22 -07:00
Maulik Shah
a9cab2670f soc: qcom: rpm_master_stat: Fix buffer overflow
Buffer overflow can happen when finding next set bit
due to type casting of uint32_t to unsigned long.

Fix this to correctly print number of active cores in
rpm_master_stat.

Change-Id: Ibeacc5ac66535e373965d8f8e4919829367cc257
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2017-05-15 12:17:27 +05:30
Sharat Masetty
c22f7e9569 drm/msm: profile submit_time in nanosecond resolution
The initial version of the patch save the command submit_time and
queue_time in seconds, but its desired by the users of this profiling
API to return the time in nanoseconds resolution.

Change-Id: I3a56e3ffd3ebe86f51a00a12b7c3e7c4b4c9a956
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
2017-05-15 12:03:19 +05:30
Depeng Shao
1b8eb9f5c9 msm: camera: sensor: Validate sensor name during probe
Some cameras have same sensor id in one device,
but camera sensor driver just validate sensor
id now which may result in wrong probe when camera
daemon is killed and camera re-probe sensor again.

Also validate the sensor name if sensor has probed.

Change-Id: I641bf8c346bada9e6cc619389077e25e666c743f
Signed-off-by: Depeng Shao <dshao@codeaurora.org>
2017-05-14 23:33:14 -07:00
Deepak Kushwah
0387bfaacf ARM: dts: msm: Add entry for video throttle clock on sdm660 and sdm630
Throttle clocks are always on, add entries in device node so that
driver can enable during session is running and disable it when
session is closed to save power.

Change-Id: I818d0c9121b0830cbaeb3bc0b89ea3c421f6028d
CRs-Fixed: 2036215
Signed-off-by: Deepak Kushwah <dkushwah@codeaurora.org>
2017-05-14 23:31:47 -07:00
Anirudh Ghayal
01cb0bde1c ARM: dts: msm: Update charging ESR timer value to 96 for PM660 FG
Use the same FG ESR timer value (96) for charging and
discharging. This is to avoid the frequent periodic spur
seen in the RF performance with charger connected.

CRs-Fixed: 2046553
Change-Id: I9d1ad61f75f553bf527906715699817236f44b01
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-05-15 11:44:55 +05:30
Rob Clark
e2135a7627 drm/msm: drop return from gpu->submit()
At this point, there is nothing left to fail.  And submit already has a
fence assigned and is added to the submit_list.  Any problems from here
on out are asynchronous (ie. hangcheck/recovery).

Change-Id: Ib6b6bf00099137972649c97cc6cd8c4fe25ce7c3
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 1193c3bcb581807d58dd7df90528ec744af387a9
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[smasetty@codeaurora.org: fixed merge conflict issues; made corresponding
changes to A5XX submit function.]
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
2017-05-15 11:16:11 +05:30
Udaya Bhaskara Reddy Mallavarapu
9603f4f5cd media: dvb-core: Fix coding errors in broadcast drivers
Added Check to verify TSPP channel input source is valid.
Initialize return variables to return correct values in fail conditions.
Move deferencing of input pointer arguments after NULL checking.

CR's-Fixed: 2043689
Change-Id: I7febdb0e0f499846cfcf8836ea35c8547a5074fb
Signed-off-by: Udaya Bhaskara Reddy Mallavarapu <udaym@codeaurora.org>
2017-05-14 21:12:44 +05:30
Greg Kroah-Hartman
be90e26014 Linux 4.4.68 2017-05-14 13:33:15 +02:00
Ilya Dryomov
4a4c6a0890 block: get rid of blk_integrity_revalidate()
commit 19b7ccf8651df09d274671b53039c672a52ad84d upstream.

Commit 25520d55cd ("block: Inline blk_integrity in struct gendisk")
introduced blk_integrity_revalidate(), which seems to assume ownership
of the stable pages flag and unilaterally clears it if no blk_integrity
profile is registered:

    if (bi->profile)
            disk->queue->backing_dev_info->capabilities |=
                    BDI_CAP_STABLE_WRITES;
    else
            disk->queue->backing_dev_info->capabilities &=
                    ~BDI_CAP_STABLE_WRITES;

It's called from revalidate_disk() and rescan_partitions(), making it
impossible to enable stable pages for drivers that support partitions
and don't use blk_integrity: while the call in revalidate_disk() can be
trivially worked around (see zram, which doesn't support partitions and
hence gets away with zram_revalidate_disk()), rescan_partitions() can
be triggered from userspace at any time.  This breaks rbd, where the
ceph messenger is responsible for generating/verifying CRCs.

Since blk_integrity_{un,}register() "must" be used for (un)registering
the integrity profile with the block layer, move BDI_CAP_STABLE_WRITES
setting there.  This way drivers that call blk_integrity_register() and
use integrity infrastructure won't interfere with drivers that don't
but still want stable pages.

Fixes: 25520d55cd ("block: Inline blk_integrity in struct gendisk")
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Mike Snitzer <snitzer@redhat.com>
Tested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
[idryomov@gmail.com: backport to < 4.11: bdi is embedded in queue]
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-14 13:32:59 +02:00
Nicolai Hähnle
60e3f5a916 drm/ttm: fix use-after-free races in vm fault handling
commit 3089c1df10e2931b1d72d2ffa7d86431084c86b3 upstream.

The vm fault handler relies on the fact that the VMA owns a reference
to the BO. However, once mmap_sem is released, other tasks are free to
destroy the VMA, which can lead to the BO being freed. Fix two code
paths where that can happen, both related to vm fault retries.

Found via a lock debugging warning which flagged &bo->wu_mutex as
locked while being destroyed.

Fixes: cbe12e74ee ("drm/ttm: Allow vm fault retries")
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-14 13:32:59 +02:00