msm: cpufreq: Unable to handle kernel NULL pointer

In the function cpufreq_governor_dbs,( case CPUFREQ_GOV_START )
sysfs creation is under the critical section where as
(case CPUFREQ_GOV_STOP) sysfs removal is not under critical section.
If a START/STOP done frequently from user space then there is chance
of hitting the race condition with sysfs interface creation and removal.
Hence the removal of sysfs entry should happen in the criticalpath.

Change-Id: I3b0dd475e8e306b633b282ff23bd1c8195b5f45f
CRs-fixed: 564850
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>

Conflicts:
	drivers/cpufreq/cpufreq_ondemand.c
qseecom: Ensure incoming "app_name" does not corrupt the kernel stack

Printing a string with that does not have null terminated character,
would lead to overflow, as the print continues until it finds a null
terminated character.
Avoid this issue by explicitly assigning a string with null termination.

Change-Id: I9528db2ba046c514d829097d08c09540588bb1a2
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
crypto: msm: Check destination buffer write access

Use VERIFY_WRITE to check write access to destination buffers
before writing to them.

Change-Id: If9708695e85659bb25e13762c54dd50abd9577c7
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
usb: gadget: u_bam: Enable zero length packet for tx transfers

Avoid packet re-transmission/drop by sending zero length packet
when usb transfer is multiple of usb endpoint max packet size.

CRs-Fixed: 494184
Change-Id: I01c9f9be41d3b64760e9bc08ec82ef8b6cc1a80f
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
USB: OTG: Fix Full speed USB Headset issue

Some Full speed USB headsets requires higher cross over voltage. The
cross over voltage is directly proportional to the phy 3.3 rail voltage.
The current code uses [3.07 - 3.3] range for this regulator and it is
supplied with 3.075V.  To get 3.3V supply, use [3.3 - 3.3] range in
the host mode.

CRs-Fixed: 563496
Change-Id: I3d1705fd346212ecf42c4943995e43964ad14dc5
Signed-off-by: ChandanaKishori Chiluveru <cchilu@codeaurora.org>

Conflicts:
	drivers/usb/otg/msm_otg.c
msm: vidc: Validate userspace buffer count before using it

Validate the number of buffers count variable before
using it to avoid structure overflow error.

Change-Id: I61582c93e0f26ec6842e437134fb8a42bdbc36ff
CRs-fixed: 563654
Signed-off-by: Pachika, Vikas Reddy <vpachi@codeaurora.org>
msm: vidc: Validate userspace buffer count

Makesure the number of buffers count is less than
the maximum limit to avoid structure overflow errors.

Change-Id: Icf3850de36325637ae43ac95f1c8f0f63e201d31
CRs-fixed: 563694
Signed-off-by: Pachika, Vikas Reddy <vpachi@codeaurora.org>
msm_serial_hs: Vote for Clocks

Using msm_hs_clock_vote and msm_hs_clock_unvote APIs
to enable/disable the clocks
Client can explicitly turn off the clocks while BT
is in progress without notifying to tty layer,then
TTY layer tries to access UART resulting in
un-clocked register access.As there is no notification
to TTY layer UART implicitly turns Clock ON

CRs-Fixed: 546219
Change-Id: I7a7a20992e66c562fdc1a130ced0b0973dd4dec5
Signed-off-by: Dilip Kota <c_dkota@codeaurora.org>