rtc: alarm: Proper handling of spinlock

In alarm_shutdown hook, taking interruptible mutex
lock in interrupt disabled context. This patch fixes
alarm_shutdown function to call rtc_read_time and
rtc_set_alarm APIs in interrupt enabled context.

Change-Id: I9392d8908c19365993dccc22504f4b6f83ae8f72
CRs-Fixed: 619657
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
random: allow architectures to optionally define random_get_entropy()

Allow architectures which have a disabled get_cycles() function to
provide a random_get_entropy() function which provides a fine-grained,
rapidly changing counter that can be used by the /dev/random driver.

For example, an architecture might have a rapidly changing register
used to control random TLB cache eviction, or DRAM refresh that
doesn't meet the requirements of get_cycles(), but which is good
enough for the needs of the random driver.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
msm: vidc: fix issues raised by static analyzer

This change fixes the warnings raised by the
static code analyzer.

Change-Id: Ibbefb9bb945128ece8923dbb23679716a0654f7b
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
msm: vidc: Check if buffers are mapped before validating buffer_info

When buffers are not mapped by the driver (i.e. buffer being used by
kernel client), inst->registered_buffers is usually empty.  As a result,
in *_dqbuf(), binfo is always NULL.  This commit bypasses the NULL check
if buffers aren't being mapped by the driver.

CRs-Fixed: 610866
Change-Id: I111150564549a74f077ba8a7115129f497d734fc
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: vidc: Free smem client after moving core to UNINIT

If userspace crashes prematurely, there will be a good chance that the
driver hasn't unmapped or freed certain buffers.  These buffers will be
freed in the state transition to UNINIT.  At that point the smem client
needs to be valid for the free/unmaps to be valid.

Change-Id: I089dcbd1e79f1c2a8671e5719d3a5dbc9926b252
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
kernel: gtod: vsyscall

Introduce kernel user helper vsyscall to allow a higher performance
gettimeofday implementation in user-space.

Change-Id: I9b9971d217382129170ecd6a35461539dac9eebb
Signed-off-by: Brent DeGraaf <bdegraaf@codeaurora.org>
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit 86eb0dddb559286c69f6c3fefbfdbbc508e81ef1)
tcp: orphan socket before nuking

tcp_nuke_addr was leaving sockets in a !dead state which led
inet_sock_destruct to leave sockets partially destroyed, which with
SElinux enabled led to a panic in sock_has_perm when it tried to access
a security descriptor which had already been freed.

Change-Id: I2a87d2c2f74003f0acbf3a0e515f1f485d17bb92
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/576221
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
ASoC: core: Fix obscure leak of runtime array

We're currently not freeing card->rtd in cases where the card is
unregistered before being instantiated - convert it to devm_kzalloc() to
make sure that happens.

Change-Id: I14bb6afd2910bfaf38fcfc6e21a60a3f7b8e6ba7
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Reviewed-on: http://gerrit.pcs.mot.com/573190
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
mmc: decrease wakelock timeout
Kernel: process: Short Timeuot for stoping process

Signed-off-by: Carlos jesús <xxx.reptar.rawrr.xxx@gmial.com>