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>
msm: vidc: add kzalloc success check for new HAL session

Memory allocation must be verified before proceeding.

CRs-Fixed: 606527
Change-Id: Ic340bf9926f84507294c576997948ddbe61dd62f
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
Merge "msm: vidc: add kzalloc success check for new HAL session"
msm: vidc: Add null pointer checks

msm_vidc_inst pointer instance is used in without any null
pointer check, dereferencing t could device crash.
Fix the issue by adding null pointer checks.

Change-Id: Ia17b380063326aa587aac941aac0131871147e8a
CRs-Fixed: 606486,606469
Signed-off-by: Jayasena Sangaraboina <jsanga@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>
msm: mdp3: underflow color adjust support on 8x10

This adds the underflow color adjustment support on
8x10. Customer can order underflow color by modifying
the parameter in panel device tree.

Change-Id: I0660f35e3a0052e5a995256978f354cf30e76161
Signed-off-by: Shuo Yan <shuoy@codeaurora.org>
qseecom: Validate pointer offset in qseecom_send_modfd_cmd

Validate cmd_req_buf pointer offset in qseecom_send_modfy_cmd, and
make sure cmd buffer address to be within shared bufffer.

Change-Id: I431511a92ab2cccbc2daebc0cf76cc3872689a97
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
msm: vidc: add input check for hfi q6 function

The input parameters may be null. This change adds input checks at
function q6_hfi_iface_eventq_read.

CRs-Fixed: 606516
Change-Id: I801a9d3249e9b97fa218fc29bc3a2a0e7a0d4d3f
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
msm: vidc: add kzalloc success check for new q6 HAL session

Memory allocation must be verified before proceeding.

CRs-Fixed: 606522
Change-Id: I809acc21dcd5e680827feb5d0fa8f45814bf4773
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
lib/scatterlist: error handling in __sg_alloc_table()

I was reviewing code which I suspected might allocate a zero size SG
table.  That will cause memory corruption.  Also we can't return before
doing the memset or we could end up using uninitialized memory in the
cleanup path.

Change-Id: Icee6be8ea22644d7f16264d9d2a0887c7145996b
CRs-Fixed: 611562
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Merge "msm: vidc: Add null pointer checks"
Merge "msm: vidc: add input parameter checks to exported functions"
Merge "ASoC: msm: qdsp6v2: fix possible integer overflow"
Merge "qseecom: Validate pointer offset in qseecom_send_modfd_cmd"
Merge "msm: vidc: add input check for hfi q6 function"
Merge "msm: vidc: add kzalloc success check for new q6 HAL session"
Merge "lib/scatterlist: error handling in __sg_alloc_table()"
Merge "msm: mdp3: underflow color adjust support on 8x10"