Merge "power: qpnp-charger: add vbatdet-maxerr-mv option"
Merge "msm: kgsl: Add arch_mmap_check() stub definition"
Merge "msm: kgsl: Remove cpu_is_msm8960() check"
Merge "USB: dwc3_msm: Disable all events before error recovery for Erratic event"
Merge "msm: mdss: fix IGC access for calibration service"
Merge "cpufreq: interactive: Fix null pointer dereference in interactive governor"
mdp3: ppp: simplify ppp completion logic

This fixes issue where ppp would no longer process requests
claiming that ppp core is hung, when in fact ppp core was
not active at all.

Change-Id: I257858a61df5b3141d835ad6c6fff78c72bf7cbd
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
staging: android: ashmem: get_name,set_name not to hold ashmem_mutex

Problem:
There exists a path in ashmem driver that could lead to acquistion
of mm->mmap_sem, ashmem_mutex in reverse order. This could lead
to deadlock in the system.
For Example, assume that mmap is called on a ashmem region
in the context of a thread say T1.
 sys_mmap_pgoff (1. acquires mm->mmap_sem)
  |
   --> mmap_region
 	|
         ----> ashmem_mmap (2. acquires asmem_mutex)
 Now if there is a context switch after 1 and before 2,
 and if another thread T2 (that shares the mm struct) invokes an
 ioctl say ASHMEM_GET_NAME, this can lead to the following path

ashmem_ioctl
  |
  -->get_name (3. acquires ashmem_mutex)
	|
	---> copy_to_user (4. acquires the mm->mmap_sem)
Note that the copy_to_user could lead to a valid fault if no
physical page is allocated yet for the user address passed.
Now T1 has mmap_sem and is waiting for ashmem_mutex.
and T2 has the ashmem_mutex and is waiting for mmap_sem
Thus leading to deadlock.

Solution:
Do not call copy_to_user or copy_from_user while holding the
ahsmem_mutex. Instead copy this to a local buffer that lives
in the stack while holding this lock. This will maintain data
integrity as well never reverse the lock order.

Testing:
Created a unit test case to reproduce the problem.
Used the same to test this fix on kernel version 3.4.0
Ported the same patch to 3.8

Change-Id: Ib66f6265da91691acfd3be9ea8f5c9332c978751
CRs-Fixed: 600362
Signed-off-by: Shankar Brahadeeswaran <shankoo77@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: e5834d620d61d01444c41958f1816d688a96433c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
ashmem: avoid deadlock between read and mmap calls

Avoid holding ashmem_mutex across code that can page fault.  Page faults
grab the mmap_sem for the process, which are also held by mmap calls
prior to calling ashmem_mmap, which locks ashmem_mutex.  The reversed
order of locking between the two can deadlock.

The calls that can page fault are read() and the ASHMEM_SET_NAME and
ASHMEM_GET_NAME ioctls.  Move the code that accesses userspace pages
outside the ashmem_mutex.

Bug: 9261835
Change-Id: If1322e981d29c889a56cdc9dfcbc6df2729a45e9
CRs-Fixed: 600362
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Git-repo: https://android.googlesource.com/kernel/common/
Git-commit: 0a9dea28170c90a7265250b66cc0df1253b0c501
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Merge AU_LINUX_ANDROID_KK_3.5_RB1.04.04.02.006.082 on remote branch

Change-Id: Idde80c2dcc57ab214f794189444b0a1fe87504ce
Merge "Merge "Merge "msm: camera2: add api for set actuator for manual af"""
Merge "Merge "cpufreq: interactive: Fix null pointer dereference in interactive governor""
ASoC: msm: qdsp6v2: disable OCMEM by default

Disable OCMEM for Audio and Voice use-cases
by default. User can however enable OCMEM
if needed.

Change-Id: Idd52a8bcdcb6fc2ee893bf05486d8dbbc0f38f37
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
msm: clock-8974: Reduce PLL lock time

Current PLL locking sequence is taking minimum time of 4.6 msec.
For command mode panels, PLL will be disabled on system idle
screen and enabled back on first update. Very first display update
after idle screen is taking long time due to PLL locking sequence.
We need to optimize PLL lock time for better user experience.

Change-Id: I1604d4544a3b33ed668ae6f36d19a876c2923e0c
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
Merge "Merge "Merge "cpufreq: interactive: Fix null pointer dereference in interactive governor"""
Merge "mdss: display: add support of additional EDP color bit component"
Merge "mdss: display: add edp frame rate"
Merge "mdss: display: add mdp core clock to edp control"
Merge "msm: mdss: do not shut down edp link during link training"
Merge "ASoC: msm: qdsp6v2: disable OCMEM by default"