security/commoncap: fix perms for bluetooth/rfkill

Change-Id: I9a8de2cf70855d6ca68195eba894c2af8eaa3e04
ASoC: msm: qdsp6v2: Copy frame data based on frame length

Copying data based on count will result in copying
uninitialized data to userspace which can potentially
disclose sensitive data. Fix by copying data based on
frame instead.

CRs-Fixed: 552528, 552531
Change-Id: I307b285ef2aefe00b953cf650582e9ff7e03ceb1
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
ASoC: msm: qdsp6v2: Fix buffer overflow in voice driver

Userspace registers calibration data with acdb driver
through ioctls. Voice driver registers the calibration
data with CVD by querying acdb data from acdb driver and
copies the calibration data in apr message.

The size of the calibration data can be controlled by userspace
and can result in buffer overflow if the calibration size is
greater than the destination buffer size.
Reject acdb data if the size is greater than the size of
destination buffer.

Change-Id: I1b495390d67907afc608ed8233bf916777d38e11
CRs-fixed: 548872
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
msm: audio: qdsp6v2: Zero the cfg stack var

Write zeroes into the stack variable cfg to ensure
no previously written stack data is sent to
user-space.

Change-Id: Iea124d2528ed56d93e2a000027ff8bc30414d3fd
CRs-Fixed: 551574
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
msm: msm_fb: Do not use ION_IOMMU_UNMAP_DELAYED flag.

Since iommu buffers will be unmapped after two newer commits
had passed, there is no need to request iommu driver to further
delay unmapping an iommu buffer.

Change-Id: I44099054114403fa7ac6a5e3c71a43d6b932f4a3
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
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>
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>
msm: audio: qdsp6v2: memeset msm_audio_stats to zero

memeset msm_audio_stats to zero before copying to user space.

Change-Id: I5f47bf85e36d46f726dddae68962a3d1cd06213b
CRs-fixed: 549307
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
radio: iris: Checking if driver's buffer is large enough.

Checking if driver's buffer is large enough to copy
the data from user space.

Change-Id: I7b4eed81cf77ce2973669ce18ccd95a5df397d82
CRs-fixed: 552329
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
msm: board: Set the max voltage level for LDO3 to 3.3V

Currently min/max voltage level for LD03 was set to 3.075V.
But some Full speed USB headsets requires higher cross over voltage.
The cross over voltage is directly proportional to the phy 3.3V
rail voltage. So modify the max voltage level of LD03 to 3.3V.

CRs-Fixed: 563496
Change-Id: I535d8d6382e708aa3bf17ed8dae832d00c52d88b
Signed-off-by: Prasad Sodagudi <psodagud@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>
cfg80211: add flags to define country IE processing rules

802.11 cards may have different country IE parsing behavioural
preferences and vendors may want to support these. These preferences
were managed by the WIPHY_FLAG_CUSTOM_REGULATORY and the
WIPHY_FLAG_STRICT_REGULATORY flags and their combination.
Instead of using this existing notation, split out the country IE
behavioural preferences to a new flag. This will allow us to add more
customizations easily and make the code more maintainable. Also add
a new flag to disable country IE hints issued by the CORE as the
first customization.

Change-Id: I66ba4a92ac0f029a115eea0a274b02db11279787
CRs-Fixed: 542802
Signed-off-by: Mihir Shete <smihir@codeaurora.org>
radio: tavarua: Fixes for memory leaks.

Freeing memory allocated in case of failures.

Change-Id: I323b9c414d725d6b9dc0698e2ed03ef9c2450e5f
CRs-fixed: 557048
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
radio: tavarua: Fix buffer overflow.

Removed improper typecasting to fix buffer overflow.

CRs-fixed: 554963

Change-Id: Ie3ae5a502f060c13eba7cb5c28a1af389b772af2
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
netfilter: xt_qtaguid: report only uid tags to non-privileged processes

In the past, a process could only see its own stats (uid-based summary,
and details).
Now we allow any process to see other UIDs uid-based stats, but still
hide the detailed stats.

Change-Id: I24fb841fe36f11b10f16ec61f90aded51b59911c
Signed-off-by: JP Abgrall <jpa@google.com>
Git-commit: c33bcd377203feb708cb02673731e70c14ef8c91
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
msm_seial_hs:Removing call to Spin unlock twice

During Clock_on() spin_unlock() is called twice.
This patch makes sure that spin_unlock is not
called twice

CRs Fixed: 546205
Change-Id: Id2cf3d52f94d3773de9206d22bcfa9075615902b
Signed-off-by: Dilip Kota <c_dkota@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>
input: touchscreen: Release all touches during suspend

Release all the touches in Cypress driver once the
device goes into suspend state

CRs-fixed: 574351
Change-Id: I0ee90a950179db081766d834967e15e573c6c260
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
msm: vidc: Use min_dpb from resource tracker in smooth streaming mode

Get min_dpb from resource tracker always if smooth streaming
mode is enabled to handle number of output buffers properly.

Change-Id: Ic46f76061f3895fda44e1d8e94198f898e5edf9b
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
Revert "msm: kgsl: Do not execute shader on wakeup from power collapse for 8064"

This reverts commit ed825efee0553310e4d5d76b61ec28f9673a3f1a.

Signed-off-by: Anshuman Dani <adani@codeaurora.org>