Commit graph

602479 commits

Author SHA1 Message Date
Vijayanand Jitta
412b07f4da iommu: dma-mapping-fast: Add a check for count in fast_smmu_alloc
In fast_smmu_alloc size_t variable size is type casted to int
variable count, this variable count can get truncated and can
result in memory corruption during unmap, make count as size_t
and also add a check for count as sg_alloc_table_from_pages
accepts unsigned int value for count.

Change-Id: I4780a554c5c062fd9dd229e5cc0ac804b1ba31d8
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2019-02-03 22:25:34 -08:00
Dikshita Agarwal
329c3ba349 msm: vidc: ensure codec count is in supported session range
Ensure the count of supported encoder and decoder returned
from firmware are within the range of supported sessions

Change-Id: If3eae7bc82dc8302444e2e4104fb6ae3cfbfed5a
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: Vasantha Balla <vballa@codeaurora.org>
2019-02-03 22:12:38 -08:00
Linux Build Service Account
afbf8abea5 Merge "msm: mdss: Fix potential null pointer dereference" 2019-01-31 10:35:18 -08:00
Linux Build Service Account
1971c91580 Merge "ipc: Implement FIFO queue to fix sequence inconsistency" 2019-01-30 23:34:48 -08:00
Xiaojun Sang
1d6109e0e9 ipc: Implement FIFO queue to fix sequence inconsistency
The SVA history buffer is out of order if there are
more than 2 continuous RX buffer done from GLINK. Implement
FIFO to ensure sequence consistency.

Change-Id: If70e2d0160e8f3140d621298b0db03bd89ba88ba
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-01-31 10:48:51 +08:00
Mayank Rana
539ae5515f dwc3: gadget: Take copy of dwc->gadget_driver before releasing lock
gadget_driver can become null if gadget_stop is called while any other
gadget callbacks are in progress. As gadget callbacks needs to release
spinlock before the callback, store the local copy of gadget_driver to
avoid the race with gadget_stop.

Change-Id: I7f0cbf9af3e3b286f2826647f08215f29f699de1
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2019-01-30 00:30:51 -08:00
Linux Build Service Account
1653208bf4 Merge "msm: ais: ispif: Fix invalid type conversion" 2019-01-23 05:14:38 -08:00
Linux Build Service Account
2c72b0a902 Merge "msm: camera: isp: Fix invalid type conversion" 2019-01-23 05:14:15 -08:00
E V Ravi
0655daaa91 msm: ais: ispif: Fix invalid type conversion
Due to improper type conversion compilation
issue will be seen. Made change to access the
appropriate type.

Change-Id: I54777fe71a2f29297b439ac26f80b9684222d89a
Signed-off-by: E V Ravi <evenka@codeaurora.org>
2019-01-22 23:01:01 -08:00
Meera Gande
0d2dac557e msm: camera: isp: Fix invalid type conversion
Due to improper type conversion compilation
issue will be seen. Made change to access the
appropriate type.

Change-Id: I2c61364f0385c83aa304788cc705bf4ca48ac2cc
Signed-off-by: Meera Gande <mgande@codeaurora.org>
2019-01-22 23:00:51 -08:00
Linux Build Service Account
87edacbe36 Merge "usb: pd: Don't reject sink request based on max current" 2019-01-22 19:57:25 -08:00
Linux Build Service Account
e3357a357e Merge "msm: wlan: Update ETSI1 and ETSI13 countries" 2019-01-22 07:37:11 -08:00
Linux Build Service Account
d33de034f0 Merge "iommu/iommu-debug: fix buffer overflows in debugfs read functions" 2019-01-22 07:37:10 -08:00
Rajeev Kumar Sirasanagandla
4a7a770994 msm: wlan: Update ETSI1 and ETSI13 countries
In db.txt, update ETSI1 and ETSI13 countries with NO-OUTDOOR flag
for frequency ranges: (5170 - 5250) and (5250 - 5330).

CRs-Fixed: 2379868
Change-Id: I8a9ce955e82b14814ead5f0bf118608ea90cbc53
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
2019-01-22 03:48:18 -08:00
Srinivasarao P
6a8e47eb57 iommu/iommu-debug: fix buffer overflows in debugfs read functions
The kernel buffer 'ubuf' can overflow while copying data to user
space in debugfs read functions. Fix it by limiting the length of
data to be copied to userspace.

Change-Id: Ibb3d8c4fb637ddc0e63677ec2dff14a4cf8c0c73
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2019-01-22 01:04:00 -08:00
Linux Build Service Account
0bfccff096 Merge "msm: adsprpc: Fix memory out of bounds error" 2019-01-21 22:50:39 -08:00
Linux Build Service Account
62f5f5cf6f Merge "f2fs: fix to account IO correctly" 2019-01-21 09:12:48 -08:00
Jack Pham
bccbbac9f0 usb: pd: Don't reject sink request based on max current
A fixed sink PDO request includes both operating current and
max current. Although the max current requested may be greater
than the available source advertisement, as per spec only the
operating current request needs to be considered. The sink will
likely have also set the Capability Mismatch bit as well. Hence,
don't reject the request otherwise the sink will keep
re-requesting and never enter a contract.

Change-Id: Ia15e2e17abe43f2bcbc1fe7011b70ab0e0f5d9eb
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-01-18 09:45:23 -08:00
Chao Yu
046b4ced72 f2fs: fix to account IO correctly
Below race can cause reversed reference on dirty count, fix it by
relocating __submit_bio() and inc_page_count().

Thread A				Thread B
- f2fs_inplace_write_data
 - f2fs_submit_page_bio
  - __submit_bio
					- f2fs_write_end_io
					 - dec_page_count
  - inc_page_count

Cc: <stable@vger.kernel.org>
Fixes: d1b3e72d5490 ("f2fs: submit bio of in-place-update pages")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Git-Commit: 2cc5dcf7a9e074c5bdfdefea1801aa0a657750d6
Git-Repo: https://android.googlesource.com/kernel/common
Change-Id: Ifff46ef82be68fc910ea3dbcc2299a22664587d4
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2019-01-18 14:54:15 +05:30
gaolez
0524c91128 msm: wlan: Update regulatory database
Update country ETSI13 related country's frequency range and tx
power.

Change-Id: Iae27b12df3b36621c395ef9e8a3b1b46461848b6
CRs-Fixed: 2246140
Signed-off-by: Gaole Zhang <gaolez@codeaurora.org>
2019-01-17 02:03:24 -08:00
Linux Build Service Account
e04cd35fd5 Merge "msm: wlan: Remove DSRC channels for US" 2019-01-16 10:20:13 -08:00
Amar Singhal
28aafa4f47 msm: wlan: Remove DSRC channels for US
DSRC channels are not required when SRD channels are enabled. Therefore
remove them.

Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
Change-Id: I1b2937c45d43d31c5689c7c4d134fcfb9a265b0e
CRs-Fixed: 2174850
2019-01-16 16:42:54 +05:30
Amar Singhal
e476b565b0 msm: wlan: Add support for UNI-III ETSI sub-band
Per the EU STD. ETSI EN 300 440, sub-band 5725-5875 is
allowed in EU at reduced power of 25 mW. Add the sub-band to
the EU countries that support this sub-band.

CRs-Fixed: 2141740
Change-Id: I0a43e99c4357527f607110faecddd9d0fd444fc6
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
2019-01-16 16:25:01 +05:30
Linux Build Service Account
79ca956b8e Merge "soc: qcom: fix race condition while freeing private data" 2019-01-16 01:31:57 -08:00
Linux Build Service Account
0ec3a4d049 Merge "ARM: dts: msm: Specify the temperature sensor name for msm8996" 2019-01-14 04:37:24 -08:00
Sunil Khatri
9548b41a99 ARM: dts: msm: Specify the temperature sensor name for msm8996
Specify the name of GPU temperature sensor in the device tree.
This name is used to get the sensor's temperature by querying the
thermal driver API.

CRs-Fixed: 1064728
Change-Id: Ia93d93a442aa848cbd42a5fb8ecad5ef875f9abf
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
2019-01-10 11:50:18 +05:30
Mohammed Nayeem Ur Rahman
74bc55d2fa msm: adsprpc: Fix memory out of bounds error
Fixes memory out of bound error.

Change-Id: I9cc11b5231ba3654588eadf7a7adca68aff35684
Signed-off-by: Mohammed Nayeem Ur Rahman <mohara@codeaurora.org>
2019-01-08 04:47:37 -08:00
Linux Build Service Account
b486ad9760 Merge "msm: adsprpc: allocate all remote memory in kernel" 2019-01-06 23:14:54 -08:00
Tharun Kumar Merugu
092de9c894 msm: adsprpc: allocate all remote memory in kernel
Allocate all memory given to remote subsystem in the kernel
instead of mapping memory allocated in userspace.

Change-Id: I79c1f40d426e271403afa67514714fe6af26cf4e
Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2019-01-04 16:42:12 +05:30
Skylar Chang
ef9aa79b43 msm: ipa3: send usb-connect from rndis-ipa
To resolve the timing issue between usb-driver
and android framework, made the change on rndis
ipa to send the usb-connect msg when usb-driver
connect the IPA pipes.

Change-Id: I51de37bc7610cb0a94659c64146f10ed322210b2
Acked-by: Pooja Kumari <kumarip@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2018-12-26 07:26:36 -08:00
Ashish Jain
78dbe61ac5 soc: qcom: fix race condition while freeing private data
WDSP private data structure is freed in wdsp_glink_release()
but some of the member variables like work_queue pointer is
accessed even after free. Fix this issue by making sure that
glink callback functions are finished execution
before freeing up wdsp private data structure.

Change-Id: Ia4dd9d667109168874dc9188d70741cb9541b0c6
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
2018-12-26 00:42:07 -08:00
Linux Build Service Account
b9806258a2 Merge "msm: camera: Fix for OOB security CR" 2018-12-21 04:35:58 -08:00
Abhishek Abbanaveni
bb6a5a5148 msm: camera: Fix for OOB security CR
If user passes an aribitary command with _IOC_DIR(cmd) == _IOC_NONE,
"arg" should point to any arbitrary address.

Check for invalid command and return error.

Change-Id: If60191a07bb80939af2d471a5acf1b17dd68aa58
CRs-Fixed: 2299567
Signed-off-by: Abhishek Abbanaveni <aabban@codeaurora.org>
2018-12-20 21:01:57 -08:00
Linux Build Service Account
f2f687dfa1 Merge "msm: camera: Fix invalid type conversion" 2018-12-20 20:26:14 -08:00
Linux Build Service Account
5dcebc91f4 Merge "msm: ais: Fix for OOB security CR" 2018-12-20 20:26:13 -08:00
Linux Build Service Account
e0eeefd674 Merge "drm/msm/sde: sanitize debugfs inputs when reading mdp memory" 2018-12-20 20:26:11 -08:00
Abhishek Abbanaveni
6a3cde9d17 msm: camera: Fix invalid type conversion
Invalid type conversion with x64 bit command VIDIOC_MSM_LASER_LED_CFG
passed in,for which the type should be "msm_laser_led_cfg_data_t"

Change-Id: I43e112224c612fb5390fa5fc23e8ae9c0e553288
CRs-Fixed: 2299699
Signed-off-by: Abhishek Abbanaveni <aabban@codeaurora.org>
Signed-off-by: E V Ravi <evenka@codeaurora.org>
2018-12-20 11:22:54 -08:00
Linux Build Service Account
e5e5f57a02 Merge "ARM: dts: msm: Remove Out-of-Bound access" 2018-12-20 11:22:20 -08:00
E V Ravi
f4cc27b8cd msm: ais: Fix for OOB security CR
If the user passes the arbitrary command with _IOC_DIR(cmd) == _IOC_NONE,
"arg" should point to any arbitrary address.
Check for invalid command and return error.

CRs-Fixed: 2299567
Change-Id: Ibd77adfe53ef0777ff4eb96c914e21f43dfd6749
Signed-off-by: E V Ravi <evenka@codeaurora.org>
2018-12-20 11:17:42 -08:00
Amine Najahi
a72d8d872d drm/msm/sde: sanitize debugfs inputs when reading mdp memory
Sanitize debugfs inputs to only allow access to mdp memory block
specified in dtsi file. This change will allow only one single block
to be read at the time and will avoid accessing memory outside of valid
decode space which can trigger AHB error bus response.

Change-Id: I91b91ac2b31eac4facb0c402c92ed8fcfc01d91e
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2018-12-20 11:04:46 -08:00
Hardik Arya
c3852a5d61 diag: Mark Buffer as NULL after freeing
There is a possibility of use-after-free and
double free because of not marking buffer as
NULL after freeing. The patch marks buffer
as NULL after freeing in error case.

Change-Id: Iacf8f8a4a4e644f48c87d5445ccd594766f2e156
Signed-off-by: Hardik Arya <harya@codeaurora.org>
2018-12-19 01:31:51 -08:00
Teng Fei Fan
7f1241f188 ARM: dts: msm: Add initial dts support for SDM455 RCM devices
Add initial device trees for SDM455 RCM devices for both external
and internal codec variant.

Change-Id: Idd6034727acc8b9ef600da421963becf5f2305cd
Signed-off-by: Teng Fei Fan <tengfei@codeaurora.org>
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2018-12-17 02:34:41 -08:00
Linux Build Service Account
12e1988e9a Merge "msm: ipa3: fix holb sequence for SSR" 2018-12-13 23:13:22 -08:00
Linux Build Service Account
87b7ba44f5 Merge "msm: camera: isp: Reset request queue at stop" 2018-12-13 15:20:36 -08:00
Linux Build Service Account
5cbc009fef Merge "msm: camera: isp: Handle frame drop due to delay " 2018-12-13 15:20:34 -08:00
Meera Gande
475b454dd2 msm: camera: isp: Reset request queue at stop
In few scenarios where the buffers are not
queued from HAL, request queue overflow is seen.
Added changes to reset the queue at destroy and
when the buffer is not available to process.

Change-Id: I7239175dda9cbc26fb65f568cbc5f7183ceaa24d
Signed-off-by: Meera Gande <mgande@codeaurora.org>
2018-12-13 06:25:56 -08:00
Meera Gande
8d4b7f9a0e msm: camera: isp: Fix drop frame due to reg update miss
In few scenarios, where the register update ioctl is
missed, the handling of frame drop is not working
in such scenarios as the frame drop pattern is not
set correctly. Once the epoch handling is done,
we need to re-configure the buffer and pattern.

Change-Id: I87b2cecda7e7e1addc68511dad6a80498051f87a
Signed-off-by: Meera Gande <mgande@codeaurora.org>
2018-12-13 06:20:18 -08:00
Meera Gande
5bf83ce8c3 msm: camera: isp: Handle frame drop due to delay
In few scenarios, the request frame may get
delayed and current and request frame id may
become same. To handle such scenarios, made
changes to inform user to delay a frame and
process the request.

Change-Id: I31fa04c386922c48a043c511a163c76316e21987
Signed-off-by: Meera Gande <mgande@codeaurora.org>
2018-12-13 06:11:21 -08:00
Skylar Chang
34e75f5628 msm: ipa3: fix holb sequence for SSR
The correct sequence for enabling HOLB drop is first
to suspend the pipe and then to HOLB drop.

Change-Id: I78b7b268eec230a4993e446bd90846f800364e06
CRs-Fixed: 2141518
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2018-12-12 23:45:54 -08:00
Linux Build Service Account
df805abc50 Merge "msm: mdss: serialize dynamic fps and dynamic bit clock updates" 2018-12-10 13:22:27 -08:00