Revert "Restoring interactiveX - How did it got lost in the first place?"

This reverts commit 54cd0e6defcd24f6f07a1b54b6d5b356bc1a8fd7.
cgroup: Fix use after free of cgrp (cgrp->css_sets)

Running a 3.4 kernel + Fedora-18 (systemd) userland on my Allwinner A10
(arm cortex a8), I'm seeing repeated, reproducable list_del list corruption
errors when build with CONFIG_DEBUG_LIST, and the backtrace always shows
free_css_set_work as the function making the problematic list_del call.

I've tracked this doen to a use after free of the cgrp struct, specifically
of the cgrp->css_sets list_head, which gets cleared by free_css_set_work.

Since free_css_set_work runs form a workqueue, it is possible for it to not be
done with clearing the list when the cgrp gets free-ed. To avoid this the code
adding the links increases cgrp->count, and the freeing code running from the
workqueue decreases cgrp->count *after* doing list_del, and then if the count
goes to 0 calls cgroup_wakeup_rmdir_waiter().

However cgroup_rmdir() is missing a check for cgrp->count != 0, causing it
to still continue with the rmdir (which leads to the free-ing of the cgrp),
before free_css_set_work is done. Sometimes the free-ed memory is re-used
before free_css_set_work gets around to unlinking link->cgrp_link_list,
triggering the list_del list corruption messages.

This patch fixes this by properly checking for cgrp->count != 0 and waiting
for the cgroup_rmdir_waitq in that case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cgroup: Take css_set_lock from cgroup_css_sets_empty()

As indicated in the comment above cgroup_css_sets_empty it needs the
css_set_lock. But neither of the 2 call points have it, so rather then fixing
the callers just take the lock inside cgroup_css_sets_empty().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Revert "Merge Samsung release N9005XXUFNF4 (Update 8)"

This reverts commit 33045f3150ebc01b2e3a853e52cfb79969747f23.
intelli/msm_thermal (faux123)

 intelli/msm_thermal: initial coding for Qualcomm Snapdragon 800 devices

an intelligent MSM thermal throttling kernel driver designed to replace the
closed sourced thermald(aemon) from Qualcomm.

The current driver can throttle the SOC via core frequency scaling or via
core hotplug with user configurable sysfs entries to adjust the throttling
temperature thresholds for each.

Derived from Qualcomm's Open source repo.

Signed-off-by: Paul Reioux <reioux@gmail.com>

Intelli_thermal: Note 3 KK kernel fix up (CAF update fixup as well)

Signed-off-by: Paul Reioux <reioux@gmail.com>

 intelli-thermal: use its own dedicated workqueue

this should reduce the load on the shared global workqueue for other
processes and also give its own unique variable name for cpu limit

Signed-off-by: Paul Reioux <reioux@gmail.com>

 intelli-thermal: increase sampling time to reduce sampling overhead

Signed-off-by: Paul Reioux <reioux@gmail.com>

Adapted for hlte CM11 by Jean-Pierre Rasquin <yank555-lu@gmail.com>
intelliactive: disable touch boost for now

Boosting to max frequency on touch seems inefficient

Let's stick with TSP boost for now
intelliactive: apply upstream patches

Patches from https://github.com/android/kernel_common (branch android-3.4)

1: https://github.com/android/kernel_common/commit/4a7cebd91f796fcb9d1e1e5723de27b75f1712d6 (cpufreq: interactive: fix compiling warnings)
2: https://github.com/android/kernel_common/commit/cda7bdb43a7a634738e44d25cc80433a599553ad (cpufreq: interactive: restructure CPUFREQ_GOV_LIMITS)
3: https://github.com/android/kernel_common/commit/6815b5139eefc6ff447b0a7ba2dd9dcda848f21c (cpufreq: interactive: turn boost_pulse off on boost off)
ASoC: update drivers to handle errors correctly

Avoid logical conflicts seen while error handling.

Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: fix the hph and lineout concurrency

There was a noise observed during the concurrency of the
hph and the lineout usecase.
This is due to incorrect register value updates in the concurrencies.
Update the register values as per the hw/sw document.

Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: wfd: paddr cannot be null

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: vidc: Free memory allocated to keep track of buffer ownership

Memory for free_output_indices and free_input_indices was never freed.
This commit kfrees the memory as part of venc_close().

Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: wfd: Modify enc_avg_latency to only measure the encode latency

Previously enc_avg_latency measured the time Video code took took to
encode a frame and the latency of the userspace client in picking up the
buffer.  Change the meaning just to measure encoder busy time.

Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: wfd: Lock the state in vsg_start

Protect the state in vsg_start with a mutex as it can be accessed from
other threads.

Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Revert "intelli/msm_thermal (faux123)"

This reverts commit 7a91c72643ef1e69342a14b221e95b2c3e502a29.
Build v3.86 EXP1
Linux 3.4.100
Build v3.86
Linux 3.4.101
crypto: arm-aes - fix encryption of unaligned data

Fix the same alignment bug as in arm64 - we need to pass residue
unprocessed bytes as the last argument to blkcipher_walk_done.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org	# 3.13+
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Build v3.87