radio: iris: Checking if driver's buffer is large enough.

Checking if driver's buffer is large enough to copy
the data from user space.

Change-Id: I7b4eed81cf77ce2973669ce18ccd95a5df397d82
CRs-fixed: 552329
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
msm-camera: Add placeholders  for 3A features in YUV sensor for 8x10.

Adding support for 3A feature in PORed YUV sensor for 8x10.Features will
not be functional because we are just adding placeholders for now.

Change-Id: I8c99881d50a3b2306d2b9c05844725c13c5e292b
Signed-off-by: Chandan Gera <cgera@codeaurora.org>
msm: qdsp6v2: memset stack buffer allocation.

This is needed to avoid garbage data in uninitialized variables.

Change-Id: I20e56ee32d3b9d1eecc4fa7761ff164a210fbbde
CRs-Fixed: 561611
CRs-Fixed: 561615
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
radio: tavarua: Fix buffer overflow.

Removed improper typecasting to fix buffer overflow.

CRs-fixed: 554963

Change-Id: Ie3ae5a502f060c13eba7cb5c28a1af389b772af2
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
ASoc: msm: qdsp6v2: add vm page offset validation

Lack of range validation can lead wrong mapping or expose arbitrary
memory page to userspace

Change-Id: I8c6eb1b7255d444bffd9d3748ca4815b11bdf16a
Signed-off-by: Fred Oh <fred@codeaurora.org>
mdss: dsi: Resolving memory leak in parse dsi commands

Free buf variable before exiting function in error cases
in order to avoid possible memory leaks.

Change-Id: I8ebc3f0f3f40be85e312f9646374a074f1414bdb
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
ASoC: msm: Safe error recovery for column data and hw delay

Add saftey checks to make sure col data was allocated
before dereferance and that col data input was not NULL.
Add safe error recovery in case of column data or hw delay
kmalloc failure.

Change-Id: I52072289b8f5f1a10df90a8fa6346ad738b7908d
CRs-Fixed: 572581
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
ARM: dts: msm: Update skuf touchscreen config data for Wintek

Update skuf config data to fix the issue that CTP might send
extra points when three or more fingers are touched on TP.

Change-Id: I70ad15ca396f81c3f9a941a00f92ddd961e6101f
Signed-off-by: Lijuan Gao <lijuang@codeaurora.org>
power: qpnp-charger: fix a variable uninitialized bug in ovp monitor

Commit 'c00e21ae14' 'power: qpnp-charger: add charger OVP status
monitor' introduces a bug in 'qpnp_chg_usb_usbin_valid_irq_handler',
when 'usbin_health' value is not equal to 'USBIN_OVP' or 'USBIN_OK',
'psy_health_sts' will be used before initialized, this makes 'usb_phy'
change to an uncertain health state.

CRs-Fixed: 575358
Change-Id: I95d7b119fc965afe957702e255fc376729e18856
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
msm: camera: Add user definied LED brightness

In current implementation the led brightness value
is defined in dts files and can't be changed runtime.

This fix add interface to provide new brightness.

Change-Id: I647cab7f97b6049cfed4dde9ad4966cb9b7e8c80
Signed-off-by: Ivan Tiyanov <ivant@codeaurora.org>
crypto: msm: Fix issues related to non-zero byteoffset input

Fix buffer overflow for a non-zero byteoffset value.

Also fixes memory leak issue by adding data_len check in check_params.
One of the scenarios data_len can be less than byteoffset which results
in memory leak with huge data length, which might cause the kernel panic.

Change-Id: I3f773673219f45dad4f17499b1ee0feda2aff1f7
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
crypto: msm: Remove invalid check in qcedev driver

Unsigned int variable is compared for < 0, which is an invalid if
condition. This patch removes the check.

Change-Id: I76c10223672db2c387e025697dd8bd921e5ddc1b
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
crypto: msm: Fix null pointer exception in qcrypto_count_sg()

Fixes null pointer exception in count scatter gather function. Scatter
gather list pointer become NULL if the sg pointer reaches last but one
node, which results in NULL pointer exception.

Change-Id: I634baf30074e6e53ffa22635565da54e9ae43150
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
crypto: msm: Use scnprintf() instead of snprintf()

snprintf can return more than the size of buffer, which is not
expected here, obviously. Use scnprintf instead.

Change-Id: I3b97a016df910728dfef5a0914ab8ad67c68e39c
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
ARM: dts: msm: Add new 'sharedmem' devices

Add new devices which need to maintain the shared memory
address for RemoteFS and RFSA

CRs-Fixed: 477427
Change-Id: Id5f3ea2a827d5a30b06d872d7a72468f1fd7718f
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
defconfig: Enable msm_sharedmem UIO driver

Enable msm_sharedmem UIO driver on targets which use RemoteFS
(over QMI) and RFSA.

CRs-Fixed: 477427
Change-Id: I63d95aa0fcbbdc17d64fb7749ed50c3890551dce
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
staging: zsmalloc: Rename page_mapcount_reset

The page_mapcount_reset function was renamed from
reset_page_mapcount when back-porting zsmalloc from 3.10 kernel.
Revert this change to enable compilation of zsmalloc.

Change-Id: Iba09fc3f0294dae746d2e2b026e0015711c22f01
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
msm: Fix compiler error due to CONFIG_HIGHMEM being disabled

If CONFIG_HIGHMEM is disabled, a compile error is seen as
the printk is part of the conditional define. Move the printk
to be independent of the conditional config define.

Change-Id: Ib04e72a19949de58e5bd4116de0fa0ff7748b76e
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
zram: Disable allocation failure logging

Disable the logging of errors when allocations fail
for zram pages. This avoid excessive logging when system is
very low on memory.

Change-Id: Ifabcf8f1b9c3e3717599d6a0a924f7b2061f00ea
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
mm: vmscan: Move pages that fail swapout to LRU active list

Move pages that fail swapout to the LRU active list to reduce
pressure on swap device when swapping out is already failing.
This helps when using a pseudo swap device such as zram which
starts failing when memory is low.

Change-Id: Ib136cd0a744378aa93d837a24b9143ee818c80b3
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>