msm: kgsl: Protect against a potential overflow in kgsl_sg_alloc.

Avoid allocating a scatterlist so large that it overflows the size
passed to the memory allocators.

CRs-fixed: 564448
Conflicts:
	drivers/gpu/msm/kgsl_sharedmem.h

Change-Id: Ic0dedbad2ab421ddec8f3be38d61c9bdf9ae5bd4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Abhishek Ranjan <aranja@codeaurora.org>
misc: qfpfuse: Fix overflow condition.

Fix potential integer overflow for ioctl command to avoid incorrect
buffer allocation. Use the stack for data buffering to avoid the
small buffer allocation for improved performance. Increase the fuse
blow timeout in the driver to cover all QFPROM implementations.

CRs-Fixed: 550574,550575
Conflicts:
	drivers/misc/qfp_fuse.c

Change-Id: Iee3cc1d38aa5dbf8ef693a43a0ca716fc8724c62
Acked-by: Radhakrishna Popuri <c_rpopur@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
Signed-off-by: Abhishek Ranjan <aranja@codeaurora.org>
msm: qdsp6v2: Increase max ports in APR

Increase the maximum ports in APR. Some Apps may support
multiple clients which exceeds the number of clients
supported in APR. This change increases number of ports
used in APR upto 8 sessions.

Change-Id: I06624330845681b4414dd470ab7aed669d690ba0
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
ASoC: msm: Null dereference check added

In asm_read function we should check buffer pointer
before it is dererferenced.

CRs-Fixed: 612682
Change-Id: I1968c038e1d35381bf174000287d542441e41092
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
msm: vidc: add input parameter checks to exported functions

Check for invalid null parameter passed to functions

CRs-Fixed: 606467
Change-Id: I860ca3d69d8705c7b3d6f27f9504b567be5aeea3
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
ASoC: msm: qdsp6v2: fix possible integer overflow

Check integer overflow before multiplying struct size. If that happens
should return immediately. In addition if param length is greater than
MAX size from spec, better return error.

Change-Id: Ifa2875f0dfa57e9bad1721aa96b5a50d24eb2030
CRs-fixed: 605273
Signed-off-by: Fred Oh <fred@codeaurora.org>
ASoC: msm: Add check for both offset and index variable

-The offset and index variable may leads to array out of
boundary exception.
-Added offset and index overflow check.

Change-Id: I1f71ee595944573e85d77d2001f656bd8ba53806
CRs-fixed: 583931
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
USB: gadget: f_uac1.c: Fix bug in accessing freed buffer pointer

Current driver is accessing the buffer pointer after it is freed.
This results in target crash. Hence fix the bug by setting pointer
variable to NULL before it is freed.

CRs-Fixed: 564289
Change-Id: I4df7513748f4378f6adce682102c8ddd3811ead8
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Merge "ASoC: msm: Null dereference check added" into LNX.LA.3.2.5.1
Merge "msm: vidc: add input parameter checks to exported functions" into LNX.LA.3.2.5.1
Merge "ASoC: msm: qdsp6v2: fix possible integer overflow" into LNX.LA.3.2.5.1
Merge "ASoC: msm: Add check for both offset and index variable" into LNX.LA.3.2.5.1
Merge "USB: gadget: f_uac1.c: Fix bug in accessing freed buffer pointer" into LNX.LA.3.2.5.1
Merge "misc: qfpfuse: Fix overflow condition." into LNX.LA.3.2.5.1
Merge "msm: kgsl: Protect against a potential overflow in kgsl_sg_alloc." into LNX.LA.3.2.5.1
diag: Safeguard for bound checks and integer underflow.

At certain point in diag driver there can be integer underflow
and thus can lead to memory leak. Bound checks are placed to
ensure correct behavior of condition statements.

CRs-fixed: 549470
Conflicts:
	drivers/char/diag/diag_debugfs.c

Change-Id: I47e02f764c2c7412db6f90fd42192fee32a761d3
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Signed-off-by: Abhishek Ranjan <aranja@codeaurora.org>
msm: camera: sensor: Update memory map.

Update memory map for AWB, AF, OIS entries.

Change-Id: Ib9dca7594ac802d30e1b04226b0453196b709ae9
Signed-off-by: Rajesh Bondugla <rajeshb@codeaurora.org>
msm:camera: add OV8858 camera sensor driver

Add OV8858 camera sensor driver to CPL(front camera)

Change-Id: If741f94304ff989eb350a50dd3abdc3716e77149
Signed-off-by: Su Liu <suliu@codeaurora.org>