msm: qdsp6v2: memset stack buffer allocation.

This is needed to avoid garbage data in uninitialized variables.

Change-Id: Ieed0959ed499fd3cc8990247c99fa70d910aa81f
CRs-Fixed: 561611
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
msm: qdsp6v2: Deleting kernel driver from arch/arm/mach-msm/qdsp6v2

Driver is registering under misc driver but exists under arch/arm/mach

CRs-Fixed: 548017
Change-Id: I5eac87708673f91afe9c51b22e35ca331626c8a1
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
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
Change-Id: Ic0dedbad2ab421ddec8f3be38d61c9bdf9ae5bd4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
csdio: Remove the driver

The driver is a legacy driver that is not used any longer
and its implementation is neither correct nor compiles.

Change-Id: I9862c0f93ccad6079a616f6997987d4e187a137c
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Bluetooth: Replace sprintf with snprintf

Change will replace sprintf with snprintf, since sprintf is a
banned function.

CRs-FIxed: 548220
Change-Id: I32f5ab1f3707e5bbe43c31a7ad4611b67557b267
Signed-off-by: Juffin Alex Varghese <jalex@codeaurora.org>
Merge "Bluetooth: Replace sprintf with snprintf"
msm: qdsp6v2: memset stack buffer allocation.

This is needed to avoid garbage data in uninitialized variables.

Change-Id: Id5921e369055d846b990380be6355ad464518a10
CRs-Fixed: 554301
Signed-off-by: Yeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
msm: kgsl: Change an overflow check to be "smart" compiler proof

In its infinite wisdom, GCC will optimize out this overflow check:

   if ((gpuaddr + size) < gpuaddr)

Which might totally make sense for the compiler but it doesn't do us
a bit of good. Replace the existing overflow check with something
that GCC can't ignore.

CRs-fixed: 544025
Signed-off-by: Gaurav Gagrani <ggagrani@codeaurora.org>
Change-Id: Ifd8a8a1ff2a99b2fc56473124317dd9376c03443
Signed-off-by: Gaurav Gagrani <ggagrani@codeaurora.org>
Merge "csdio: Remove the driver"
Merge "msm: kgsl: Change an overflow check to be "smart" compiler proof"
ASoC: msm: Add Buffer overflow check

The overflow check is required to ensure that user space data
in kernel may not go beyond buffer boundary.

CRs-Fixed: 563086
Change-Id: I6bec1e7a30049d27ad1cf0978cdb304a2b0346ba
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
usb: Fix compilation error when usbnet and hsic are enabled

Enabling CONFIG_USB_EHCI_MSM_HSIC, CONFIG_USB_USBNET and
CONFIG_USB_NET_SMSC95XX causes multiple compilation errors due to
some of macros and functions are not available or defined. This
issue is seen due to commits below two commits :
68c92030f4 "usb: ehci-msm-hsic: Add support for ASYNC IRQ to exit LPM"
cd58faf882 "usbnet: decrease suspend count if returning -EBUSY". This
change fixes the same.

CRs-Fixed: 604827
Change-Id: I0eabe9fc47afd1236ed1408eb9d4fe39a7b16df1
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
Merge "usb: Fix compilation error when usbnet and hsic are enabled"
Merge "msm: qdsp6v2: memset stack buffer allocation."
USB: gadget: ether: Fix memory corruption issues with multi_pkt_xfers

If gadget xmits packets before host sends RNDIS_MSG_INIT to update
maximum packets supported per transfer, then there is a possibility
of using freed skb memory later from xmit function. Fix such
races which may arise between tx_complete and start_xmit routines
depending on when multi_pkt_transfers are enabled.
Other option is to defer starting TX transfers until RNDIS_MSG_INIT
is received, but then it makes it difficult to handle scenarios
where host doesn't support this message or just doesn't send it.

CRs-fixed: 595367
Change-Id: I181da831120b38840ae4b8b74c1dacce129d1ba6
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Merge "USB: gadget: ether: Fix memory corruption issues with multi_pkt_xfers"
msm: rpm-regulator-smd: correct use-after-free in rpm_vreg_device_remove

Modify the rpm_vreg_device_remove() function so that the reg
pointer is not dereferenced after being freed.

Change-Id: I0bc2c38a00c5d6b783f52c0ae0f1faa31d3a1e4d
CRs-Fixed: 564463
Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
msm: acpuclock-cortex: Fix off by one error for large frequency tables

If a frequency table was greater than a certain size, data will be written
past the end of an array. Fix the loop conditions to prevent this.

Change-Id: Idb33ac1a1580fe4d09d3be3eeba24abd4cb0184d
CRs-fixed: 561651
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
msm: buspm: Correct size type in buspm_xfer_req

Variable size inside buspm_xfer_req
can be negative and thus would be a
large positive number resulting in arbitary
Kernel read. This patch corrects this value.

CRs-Fixed: 563529
Change-Id: I877db6960530d6c7d1486da9cfdc15a43e57e152
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
Merge "msm: qdsp6v2: Deleting kernel driver from arch/arm/mach-msm/qdsp6v2"