Commit graph

591713 commits

Author SHA1 Message Date
Linux Build Service Account
77908d9c93 Merge "Revert "ARM: dts: msm: align removed_region with SDM630 memmap"" 2017-07-07 08:32:00 -07:00
Linux Build Service Account
539f7638fa Merge "icnss: Show rejuvenation info in ICNSS stats report" 2017-07-07 08:31:59 -07:00
Linux Build Service Account
fdc05fae43 Merge "pwm: pwm-qpnp: Ignore changing period setting if it's not requested" 2017-07-07 08:31:58 -07:00
Linux Build Service Account
dcfc6b7782 Merge "msm: sensor: Fix to validate the settings size in flash" 2017-07-07 08:31:57 -07:00
Linux Build Service Account
dec5742b2a Merge "msm: camera: Unlock rwlock before returning." 2017-07-07 08:31:56 -07:00
Linux Build Service Account
478a7073f5 Merge "diag: Add proper checks to fix possible out-of-bound issue" 2017-07-07 08:31:55 -07:00
Samyukta Mogily
47bfda4635 msm: sensor: Fix to validate the settings size in flash
The size of the settings copied from userspace, is directly checked
in msm_cci_data_queue with CCI_I2C_MAX_WRITE. This might cause
out of bound access in function msm_cci_data_queue as the max size is
MAX_I2C_REG_SET. Hence adding check on the size in flash driver itself.

Change-Id: Ifac358be9f4b4ff60d14c20e02886c2d044e7f52
Signed-off-by: Samyukta Mogily <smogily@codeaurora.org>
2017-07-07 15:39:15 +05:30
Trishansh Bhardwaj
5dc576051f msm: camera: Unlock rwlock before returning.
put_buf and buf_done are not unlocking rwlock in error case.

Change-Id: Ie10afa15f332cf7bd38be69ea8b99b163b125e66
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2017-07-07 02:17:04 -07:00
Fenglin Wu
c8d3578f8b pwm: pwm-qpnp: Ignore changing period setting if it's not requested
It's not necessary to reprogram PWM period setting if only
changing PWM duty cycle.

Change-Id: I366e17a5e2f18c09ab0850d00ec08a35e0f1cb9f
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2017-07-07 15:59:38 +08:00
Linux Build Service Account
97aeb32ee2 Merge "regulator: core: fix a possible race in disable_work handling" 2017-07-06 23:41:23 -07:00
Linux Build Service Account
e46fafb501 Merge "genirq: Don't allow user space to set IRQ affinity to isolated CPUs" 2017-07-06 23:41:22 -07:00
Linux Build Service Account
4e361bef1f Merge "cnss_utils: Zero out cnss_utils priv structure during initalization" 2017-07-06 23:41:21 -07:00
Linux Build Service Account
52a7c929b0 Merge "spcom: avoid race condition when handling commands" 2017-07-06 23:41:20 -07:00
Linux Build Service Account
807ef98e3f Merge "ARM: dts: msm: Set FDE key size to 256bit for sdm660_64" 2017-07-06 23:41:19 -07:00
Linux Build Service Account
a46fa7102c Merge "msm: ADSPRPC: Avoid multiple hypervisor assign calls for a buffer" 2017-07-06 23:41:18 -07:00
Linux Build Service Account
c3897748c0 Merge "iio: rradc: Update thermistor scaling" 2017-07-06 23:41:18 -07:00
Linux Build Service Account
81b79b39c7 Merge "mmc: core: Use PF_MEMALLOC flag for clock scaling context" 2017-07-06 23:41:17 -07:00
Linux Build Service Account
6b67ad013a Merge "msm: kgsl: Fix a dead loop issue while changing gpu frequency" 2017-07-06 23:41:16 -07:00
Linux Build Service Account
abfdf9aa5a Merge "msm: kgsl: Make sure regulators are ON before GPU clocks are forced on" 2017-07-06 23:41:15 -07:00
Charan Teja Reddy
8d519acd35 Revert "ARM: dts: msm: align removed_region with SDM630 memmap"
Update the carveout regions properly.
This reverts commit 0e6e2ace8c.

Change-Id: Ie93a718c4804d57975d1a2b531328e2fbe889b1f
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2017-07-06 23:13:44 -07:00
Yuanyuan Liu
e7cf674bc9 icnss: Show rejuvenation info in ICNSS stats report
This is a debug enhance feature. It shows rejuvenation
info in ICNSS stats report, which makes it easier to
track the reason for every rejuvenation.

CRs-Fixed: 2072253
Change-Id: I6d133b4b182943ed745d7587bd1ec23858c29750
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-07-06 22:48:44 -07:00
Tirupathi Reddy
493d8a74b6 regulator: core: fix a possible race in disable_work handling
A race condition between queueing and processing the disable_work
instances results in having a work instance in the queue and the
deferred_disables variable of regulator device structure having a
value '0'. If no new regulator_disable_deferred() call later from
clients, the deferred_disables variable value remains '0' and hits
BUG() in regulator_disable_work() when the queued instance scheduled
for processing the work.

The race occurs as below:

	Core-0					     Core-1
	.....	       /* deferred_disables = 2 */   .....
	.....	       /* disable_work is queued */  .....
	.....					     .....
regulator_disable_deferred: 		regulator_disable_work:
   mutex_lock(&rdev->mutex);			     .....
   rdev->deferred_disables++;		    mutex_lock(&rdev->mutex);
   mutex_unlock(&rdev->mutex);			     .....
   queue_delayed_work(...)		    count =rdev->deferred_disables;
	.....				    rdev->deferred_disables = 0;
	.....					     .....
	.....				    mutex_unlock(&rdev->mutex);
	.....					     .....
	.....				    return;
	.....					     .....
	/* No new regulator_disable_deferred() calls from clients */
	/* The newly queued instance is scheduled for processing */
	.....					     .....
regulator_disable_work:
	.....
   mutex_lock(&rdev->mutex);
   BUG_ON(!rdev->deferred_disables); /* deferred_disables = 0 */

The race is fixed by removing the work instance that is queued while
processing the previous queued instance. Cancel the newly queued instance
from disable_work() handler just after reset the deferred_disables variable
to value '0'. Also move the work queueing step before mutex_unlock in
regulator_disable_deferred().

Also use mod_delayed_work() in the pace of queue_delayed_work() as
queue_delayed_work() always uses the delay requested in the first call
when multiple consumers call regulator_disable_deferred() close in time
and does not guarantee the semantics of regulator_disable_deferred().

CRs-Fixed: 2064610
Change-Id: Iacaddc5e2f5c9998c4d038bdc10c4587cbf4812e
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-07-06 20:02:49 -07:00
Yuanyuan Liu
717941b36a cnss_utils: Zero out cnss_utils priv structure during initalization
Zero out cnss_utils priv structure during initalization to make
sure it starts cleanly.

CRs-Fixed: 2072421
Change-Id: I72caa5fb7e1df16b018165d277cd3a404b81c304
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-07-06 14:01:14 -07:00
Linux Build Service Account
0c44f3c838 Merge "crypto: Change format specifier %p to %pK" 2017-07-06 12:32:05 -07:00
Linux Build Service Account
1ccca4730a Merge "msm: ipa: Fix the problem with nested sleeping primitives" 2017-07-06 12:32:04 -07:00
Linux Build Service Account
1d1ab31d0a Merge "msm: camera: isp: fixes incorrect RDI empty frame handling" 2017-07-06 12:32:03 -07:00
Amir Samuelov
5459f66ad2 spcom: avoid race condition when handling commands
The spcom allows only one owner per channel, so only one app can open()
a channel char device at a time.
However, the channel owner process might share the channel file
descriptor (fd) with other threads, that might write() concurrently
a command to spcom, that can cause a race.
Add a mutex to "serialize" handling of the commands.

Change-Id: Ief9c6c48a862444dfff66d14d2317568cd6e81e6
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-07-06 08:39:02 -07:00
Sathish Ambley
09055c5057 msm: ADSPRPC: Avoid multiple hypervisor assign calls for a buffer
Access to dma shared buffer is set at device probe, avoid making
multiple hypervisor assign calls for the same buffer.

Change-Id: I91f7dd0bca109fa774af49159bdec57b8acd65b2
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com>
2017-07-06 05:00:00 -07:00
Linux Build Service Account
e868dcc8bb Merge "ARM: dts: msm: add MSM external display node to msm8996" 2017-07-06 04:38:59 -07:00
Linux Build Service Account
338e7392a6 Merge "drm/msm: add default value for plane enum property" 2017-07-06 04:38:58 -07:00
Linux Build Service Account
db94df44a7 Merge "ARM: dtsi: msm: reserve memory for LK's stack on msm8996" 2017-07-06 04:38:57 -07:00
Linux Build Service Account
71faca4550 Merge "regulator: core: remove some dead code" 2017-07-06 04:38:57 -07:00
Neeraj Soni
fc4bcd6968 ARM: dts: msm: Set FDE key size to 256bit for sdm660_64
Set FDE encryption key size to 256bit for sdm660_64
target.

Change-Id: Ib90068dc1a4a7c1caa1a65753c1b91827b1eb798
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2017-07-06 16:57:57 +05:30
Linux Build Service Account
b4d55be415 Merge "Revert "defconfig: arm64: msm: Enable virtual platform"" into msm-4.4 2017-07-06 02:48:23 -07:00
Neeraj Upadhyay
5db7f2eae3 Revert "defconfig: arm64: msm: Enable virtual platform"
This reverts commit 2bb686dccd ("defconfig: arm64: msm: Enable
virtual platform"). The configs added in this change are not in
proper state and have build failures.

Change-Id: I30922e76761a1c436b54fb07f376ad9a5f5718f8
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-07-06 14:44:51 +05:30
Linux Build Service Account
f96a299e77 Merge "drm/msm: Add timestamp counter" 2017-07-05 18:20:20 -07:00
Linux Build Service Account
e28c151ad1 Merge "msm: kgsl: Add A5XX RBBM registers to pre-crash dumper list" 2017-07-05 18:20:19 -07:00
Linux Build Service Account
fc916a2143 Merge "msm: kgsl: Add a NULL check for limit pointer" 2017-07-05 18:20:18 -07:00
Linux Build Service Account
a3424d9f5f Merge "mm: add preempt points into __purge_vmap_area_lazy()" 2017-07-05 18:20:17 -07:00
Linux Build Service Account
4756ccfd60 Merge "mm: turn vmap_purge_lock into a mutex" 2017-07-05 18:20:15 -07:00
Linux Build Service Account
0f6cf457b2 Merge "compat_qcedev: Fix accessing userspace memory in kernel space" 2017-07-05 10:28:43 -07:00
Linux Build Service Account
4c408ed259 Merge "diag: Add protection while processing non-hdlc packets" 2017-07-05 10:28:41 -07:00
Linux Build Service Account
d3a27d6fc2 Merge "mmc: card: Ratelimit the error log in mmc_blk_cmd_recovery()" 2017-07-05 10:28:40 -07:00
Linux Build Service Account
c4de2baacc Merge "defconfig: Enable and disable few configs for msm8998" 2017-07-05 10:28:39 -07:00
Venkateswara Rao Tadikonda
aac10e39c7 msm: kgsl: Fix a dead loop issue while changing gpu frequency
There is a dead loop in kgsl_devfreq_target(), while governor request
to change GPU frequency. In governor 'userspace' mode, If the requested
frequency (set_freq) is more than the configured frequency and max_freq
is also set to more than the configured frequency, then there is a dead
loop while changing target frequency.

Dead loop occurs due to comparing signed integer with unsigned integer.
So, type casting unsigned integer to signed integer will terminate the
loop when loop variable is less than zero.

Change-Id: Ic82b7477d50d1abcd348b011f64246066887922c
Signed-off-by: Venkateswara Rao Tadikonda <vtadik@codeaurora.org>
2017-07-05 18:50:15 +05:30
Hardik Arya
a0085075f3 diag: Add proper checks to fix possible out-of-bound issue
Currently, there is a possibility of out-of-bound access while
processing data received from user space. The patch adds proper
checks for valid address.

CRs-Fixed: 2048536
Change-Id: I1e0fc7a9d69e69f3326429d5d9540dd3bb1a59b0
Signed-off-by: Hardik Arya <harya@codeaurora.org>
2017-07-05 18:36:28 +05:30
Linux Build Service Account
488f22ed0f Merge "USB: phy-msm-qusb: Enable autoresume only when device is connected" 2017-07-05 02:57:07 -07:00
Linux Build Service Account
22a427999d Merge "mmc: host: Capture error states in Trace logs." 2017-07-05 02:57:07 -07:00
Linux Build Service Account
9e94f54b9b Merge "msm: ADSPRPC: Initialize FastRPC invoke metadata" 2017-07-05 02:57:06 -07:00
Linux Build Service Account
d669e41bdb Merge "msm: mdss: Check htotal for calculating programmable fetch" 2017-07-05 02:57:05 -07:00