msm_fb: Fix security bug info->par check

Add check for info->par before assigning to mfd

CRs-Fixed: 526286
Change-Id: I21763468ee5a977ee554c2266e8a7fbde5b441cc
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
qseecom: Fix QSEECOM_IOCTL_UNLOAD_EXTERNAL_ELF_REQ kernel crash

Fixes the kernel crash occuring with IOCTL_UNLOAD_EXTERNAL_ELF_REQ
ioctl by adding unavailable client type to qseecom_client_handle_type
enum, which is required in the driver during qseecom_release().

Change-Id: I73b817255149ffc4a808852feb2954a0ba3c317f
Signed-off-by: AnilKumar Chimata <anilc@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 "lib/scatterlist: error handling in __sg_alloc_table()"
Merge "qseecom: Fix QSEECOM_IOCTL_UNLOAD_EXTERNAL_ELF_REQ kernel crash"
ASoC: msm: qdsp6: don't assume playback started

If pcm device closes without pcm playback start, EOS command won't
be issued therefore pcm_close shouldn't wait for EOS event's completion.
Fix to avoid waiting for EOS command completion when command wasn't issued.

Change-Id: Ic7a50324714419a0da68877b7c461b9f54f168e2
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Merge "ASoC: msm: qdsp6: don't assume playback started"
msm: mdss: hdmi: NUL-terminate spd data

NUL-terminate SPD Vendor name and SPD
Product description data stored in the
control structure of hdmi driver. This
avoids overflows in print messages and info
frames.

CRs-Fixed: 520148

Change-Id: Ic6b39a48a86514af71947e913e9d6dabc81f07eb
Signed-off-by: Ramakant Singh <ramaka@codeaurora.org>
Merge "msm: mdss: hdmi: NUL-terminate spd data"
Merge "msm_fb: Fix security bug info->par check"
qseecom: Fix issues with failure to release client handle

In some scenarios when qseecom_release is called with the incorrect
client handle type. Hence proper cleanup is not done for the memory
allocated to the device handle or to unload the app.

This change addresses the cleanup issues related to qseecom client in
qseecom_release call by ensuring the handle type is set correctly and
cleanup is done properly based on client type.

Change-Id: I126aa431ce635ae98100b774e3d92b704635d199
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
Merge "qseecom: Fix issues with failure to release client handle"