CVE-2013-4736: Integer overflow and signedness issue in camera JPEG engines

msm:camera: Fix signedness issue in hw_exec_cmds

  In hw_exec_cmds()second argument m_cmds should be
  of type unsigned interger

CRs-Fixed: 493314
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>

Change-Id: Idad2eb1a59481f3fe9f90221ff2061e8dae57013

 msm:camera: Fix overflow issue in ioctl_hw_cmds function

    'len' is of type signed int 32bit,but the assigned value
    may exceed maximum unsigned int32 range.Add overflow check
    and graceful exit if 'm'exceeds UINT32_MAX value.

Change-Id: I38f0d10a0cb44d08d0054f91044fc891c246ebd1
CRs-Fixed: 493314
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
provide cgroup option to notify on migrations

    backported to 3.0 from:

    1) sched: provide per cpu-cgroup option to notify on migrations

    On systems where CPUs may run asynchronously,
    task migrations between CPUs running at grossly different speeds can cause problems.
    This change provides a mechanism to notify a subsystem in the kernel
    if a task in a particular cgroup migrates to a different CPU.
    Other subsystems (such as cpufreq) may then register for this notifier
    to take appropriate action when such a task is migrated.
    The cgroup attribute to set for this behavior is "notify_on_migrate"

    Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
    =====

    2) sched: remove migration notification from RT class

    Commit "sched: provide per cpu-cgroup option to notify on migrations"added
    a notifier call when a task is moved to a different CPU.
    Unfortunately the two call sites in the RT sched class where this occurs
    happens with a runqueue lock held.
    This can result in a deadlock if the notifier call
    attempts to do something like wake up a task.
    Fortunately the benefit of that change comes mainly
    from notifying on migration of non-RT tasks,
    so we can simply ignore the movements of RT tasks.

    CRs-Fixed: 491370
    Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
    =====

    Change-Id: I2e84ae0c41bd544231924ff25cbf14d88e008fed

Change-Id: I02a73c69356661f2aeae17fd5b037d44c266ae94
cpufreq: Retain only online cpus in managed_policy->cpus

cpufreq's handling of cpu online event can incorrectly initialize
managed_policy->cpus to include offline cpus. This causes cpufreq
governors to include offline cpus in their idle time computation, which
causes frequency to shoot up beyond normal levels (on systems where 2 or
more cpus need to be synchronized wrt frequency change).

This frequency shootup was not seen prior to commit 21111be8 which
changed idle time accounting for offline cpus. Prior to commit 21111be8,
idle time statistics for offline cpus would include their offline time
as well. Post commit 21111be8, offline time is not included in a cpu's
idle time statistics.

As a result, ondemand (or other cpufreq) governors would see unchanged
idle time for offline cpus, causing them to interpret those (offline)
cpus as 100% busy, which is wrong.

This patch fixes the issue by modifying cpufreq's hotplug handling to
retain only online cpus in managed_policy->cpus field. cpufreq governors
would then skip such offline cpus from idle time calculations.

Change-Id: Id2eba8c0ec3367609369b2e42a4e1386ff2e7ab5
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Revert "ASoC: wcd9310: Fix DMIC current leakage after disable"

0.3 mA higher sleep current .This happens
due to  manually forcing digital mic clock
pin to GPIO mode rom functional mode through
the TLMM mux.
This reverts commit a7105cd8d1bf6a673004a517ca351c82813490cb

CRs-Fixed: 529174
Signed-off-by: johny <mjshai@codeaurora.org>

Change-Id: I01555edc8f083d5158dde781797376b67131625f