Commit graph

602786 commits

Author SHA1 Message Date
Rajeev Kumar Sirasanagandla
1a649e08b2 msm: wlan: Update regulatory rules for JM
As per regulatory master sheet, JM maps to FCC13 for 5GHz. For FCC13,
there is no radar detect pattern. Therefore, Remove DFS flag for JM.

CRs-Fixed: 2177739
Change-Id: I2dee046369ea4c3bd8feffbf97dbf40bea2137b6
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
2019-04-26 23:46:13 +05:30
gaolez
189c079da2 msm: wlan: Update regulatory database
Enable DFS flag for TT.

Change-Id: I291dd2927ff0c92b243ee9c009b1549fb203165b
CRs-Fixed: 2287335
Signed-off-by: Gaole Zhang <gaolez@codeaurora.org>
2019-04-26 02:49:13 -07:00
Dhoat Harpal
bc0ac2b798 soc: qcom: glink: Initialize local state while fetching ctx
Initialization of channel's local state is not done at the time of
fetching context from list of channels. This leads to race condition
if remote close happens during this time. Remote close will check if
local state is not open then delete channel from list. This leads to
use after free scenerio.

Initialize local state at the time of fetching channel context from
list of channels.

CRs-Fixed: 2155992
Change-Id: If113daba129191bd67ef2460eb4e87c2d5614403
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2019-04-25 03:32:56 -07:00
Trishansh Bhardwaj
20beccf7d4 msm: camera: Fix out-of-bounds read in string class name.
jpeg driver is calling class_create with stack variable, which
can be overwritten by other stack variables.

Bug: 114041685
Change-Id: I3c22a5b3375b970ff6b1c6de983dd5833f4e11d0
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Signed-off-by: VijayaKumar T M <vtmuni@codeaurora.org>
2019-04-19 09:25:09 +02:00
Jean-Baptiste Theou
d02272f418 remove faulty trace_printk
For production, we shouldn't have any trace_printk entries

Change-Id: I48e9fabdbbb8da595db350630463bb065a8a6ff7
(cherry picked from commit 99bb9adb91b350bd7ec09c9018eb0901687d85a4)
Signed-off-by: celtare21 <celtare21@gmail.com>
2019-04-19 09:24:48 +02:00
David Lin
1a1a9957df msm_cci: fix inconsistent mutex_lock
drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.c:939
msm_cci_i2c_read() warn: inconsistent returns
'mutex:&cci_dev->cci_master_info[master].mutex_q[queue]'

Change-Id: Ied241d3ff2fd00d4ce892e250a6236fccf16fac9
Signed-off-by: David Lin <dtwlin@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2019-04-19 09:24:31 +02:00
idkwhoiam322
3d23626712 Revert "msm: camera: isp: Handle frame drop due to delay "
Breaks GCAM This reverts commit 5bf83ce8c3.

Change-Id: I632497550243e9fc4b69ba4a0199d8a3e939fd36
2019-04-19 09:17:53 +02:00
Xiaojun Sang
1b75396524 dsp: asm: validate payload size before access
Payload size is not checked before payload access. Check it
to avoid out-of-boundary memory access.

Change-Id: Iaa39ee4ea5489bb5579e7b7d5dfada12d88c5809
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-04-10 15:36:09 +08:00
Deepak Kumar Singh
4fedfe5c4d soc: qcom: qmi_encdec: Restrict string length in decode
The QMI TLV value for strings in a lot of qmi element info structures
account for null terminated strings with MAX_LEN + 1. If a string is
actually MAX_LEN + 1 length, this will cause an out of bounds access
when the NULL character is appended in decoding.

CR-Fixed: 2359244
Change-Id: I4d789bc6017ff58458f77fe875ca4e175a4f1357
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2019-04-09 01:59:13 -07:00
Linux Build Service Account
995aca0cb0 Merge "dsp: validate token before usage as array index" into kernel.lnx.4.4.r35-rel 2019-04-09 01:53:45 -07:00
Vignesh Kulothungan
877ffd6d9d msm: asm: validate ADSP data before access
Validate buffer index obtained from ADSP token before using it.

CRs-Fixed: 2372302
Change-Id: I5c3b1634bd08b516844638dd67f726a882edfc17
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-04-09 01:44:52 -07:00
Xiaojun Sang
48272dd0ff dsp: validate token before usage as array index
Token from DSP might be invalid for array index. Validate the
token before being used as array index.

Change-Id: I9f47e1328d75d9f9acf7e85ddb452019b6eced0a
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-04-09 14:08:05 +05:30
Linux Build Service Account
c2c52e8d2b Merge "msm: ice: check for crypto engine availability" into kernel.lnx.4.4.r35-rel 2019-04-08 12:30:15 -07:00
Neeraj Soni
07c5f7c8c9 msm: ice: check for crypto engine availability
There can be many ice instances present in dtsi file but
not all of them will be initialized by storage driver.
Check if crypto instance is initialized before setting
it up for data encryption/decryption usage.

Change-Id: I7c9227007474052513b277dec5963a973781c524
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2019-04-08 12:15:48 -07:00
Xiaojun Sang
e8909e3e1a dsp: asm: validate payload size before access
Payload size is not checked before payload access. Check size
to avoid out-of-boundary memory access.

Change-Id: Iaa39ee4ea5489bb5579e7b7d5dfada12d88c5809
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-04-08 12:10:28 -07:00
Rajesh Kemisetti
a1b80321ae msm: kgsl: Limit log frequency in case of context count maxed out
kgsl_context_init() prints error message continuously if a process
tries to create more number of contexts that KGSL supports.

This hogs CPU and might lead to watchdog timeout.

Reduce this log frequency by using KGSL_DRV_ERR_RATELIMIT().

Change-Id: I7e3a5d3db41ab0c60d1b6b620cbcdef96d5c21a9
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2019-04-08 03:16:25 -07:00
Vatsal Bucha
279b0b023c qdsp6v2: q6usm: Check size of payload before access
Check size of payload before access in q6usm_mmapcallback.

Change-Id: Iff0672532c2ea40e7129237a92d8365d6b554cf2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-04 23:47:19 -07:00
Linux Build Service Account
6dfb4b756b Merge "qdsp6v2: q6usm: Check size of payload before access" 2019-04-03 09:11:35 -07:00
Linux Build Service Account
281de5809e Merge "perf: Cancel the mux hrtimer during CPU hotplug to avoid migration" 2019-04-03 00:25:13 -07:00
Linux Build Service Account
dd45e2fcea Merge "msm: asm: validate ADSP data before access" 2019-04-02 14:00:26 -07:00
Linux Build Service Account
5d45bd7a1e Merge "drivers: soc: qcom: Added check to avoid opening multiple instance" 2019-04-02 14:00:24 -07:00
Linux Build Service Account
1dc6edb0ef Merge "dsp: q6voice: Check size of shared memory buffer before access" into msm-4.4.c10 2019-04-02 13:42:06 -07:00
Ajit Pandey
9d3ba87f26 drivers: soc: qcom: Added check to avoid opening multiple instance
Opening of multiple instance of voice_svc user space from app will
lead to pointer deference of private data within apr callback. As
multi-instance not supported added check to deny open() from user
space if previous instance hasn't been closed.

Change-Id: Ia5ef16c69a517760fc9d45530a8a41a333fa2a21
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
2019-04-02 04:53:53 -07:00
Vatsal Bucha
f0cc7ca310 qdsp6v2: q6usm: Check size of payload before access
Check size of payload array before access in q6usm_callback.

Change-Id: Id0c85209a053f9dfdb53133aeb6b2510ecf18eb8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-02 14:50:46 +05:30
Raghavendra Rao Ananta
ea2ee83c92 perf: Cancel the mux hrtimer during CPU hotplug to avoid migration
The current design of hrtimers migrates the pinned timers to a
different CPU upon its hotplug. However, perf-core needs to
maintain the mux-hrtimers on a per CPU basis. That is, each
hrtimer carries the context for that particular CPU and would
lose this context if it gets migrated to a different CPU. As a
result, cancel the hrtimer for the CPU that's about to go down
and restart it (if required) when the perf-events are being created.

Change-Id: I7a1d0456208855e3a99a7d49e59c6dae811d146e
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
[mojha@codeaurora.org: Resolved merge conflict and added missing
 `cpuctx` variable to avoid build failure]
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2019-04-01 21:07:20 -07:00
Xiaojun Sang
950b66256c asoc: check payload length against structure size
Payload length must exceed structure size. Otherwise, it may
lead to out-of-boundary memory access.

Change-Id: I090de5116ab04a4ca2b9c485e17617fe9e861ad5
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-04-01 19:56:53 -07:00
Vatsal Bucha
920b58ced9 dsp: q6voice: Check size of shared memory buffer before access
Check buffer size in qdsp_cvs_callback before access in
ul_pkt.

Change-Id: Ic19994b46086709231656ec747d2df988b7a512f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-01 04:42:20 -07:00
codeworkx
f217defb38 Revert "usb: dwc3-msm: Remove indefinite wakeup"
This reverts commit 3f14eeeba3.

Change-Id: I1ab6828643098b1bb182473c867bcaeea8451fbf
2019-03-30 07:59:31 +01:00
Todd Kjos
d3a52e0ec2 binder: fix race between munmap() and direct reclaim
An munmap() on a binder device causes binder_vma_close() to be called
which clears the alloc->vma pointer.

If direct reclaim causes binder_alloc_free_page() to be called, there
is a race where alloc->vma is read into a local vma pointer and then
used later after the mm->mmap_sem is acquired. This can result in
calling zap_page_range() with an invalid vma which manifests as a
use-after-free in zap_page_range().

The fix is to check alloc->vma after acquiring the mmap_sem (which we
were acquiring anyway) and bail out of binder_alloc_free_page() if it
has changed to NULL.

Change-Id: I9ea0558a57635a747d7a48ed35991d39b860abf6
Signed-off-by: Todd Kjos <tkjos@google.com>
(cherry picked from commit 7257eac9401f989a62503b6c12a47af1b10591d1)
2019-03-30 07:59:30 +01:00
Todd Kjos
c7498034be UPSTREAM: binder: fix race that allows malicious free of live buffer
commit 7bada55ab50697861eee6bb7d60b41e68a961a9c upstream

Malicious code can attempt to free buffers using the BC_FREE_BUFFER
ioctl to binder. There are protections against a user freeing a buffer
while in use by the kernel, however there was a window where
BC_FREE_BUFFER could be used to free a recently allocated buffer that
was not completely initialized. This resulted in a use-after-free
detected by KASAN with a malicious test program.

This window is closed by setting the buffer's allow_user_free attribute
to 0 when the buffer is allocated or when the user has previously freed
it instead of waiting for the caller to set it. The problem was that
when the struct buffer was recycled, allow_user_free was stale and set
to 1 allowing a free to go through.

Bug: 116855682
Change-Id: I0b38089f6fdb1adbf7e1102747e4119c9a05b191
Signed-off-by: Todd Kjos <tkjos@google.com>
Acked-by: Arve Hjønnevåg <arve@android.com>
Cc: stable <stable@vger.kernel.org> # 4.14
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c3d21ec4d4fb68baf47248dfe0e0ce0080fd7bcc)
2019-03-30 07:59:30 +01:00
Matthias Schwarzott
eead9ee821 media: em28xx: Fix use-after-free when disconnecting
[ Upstream commit 910b0797fa9e8af09c44a3fa36cb310ba7a7218d ]

Fix bug by moving the i2c_unregister_device calls after deregistration
of dvb frontend.

The new style i2c drivers already destroys the frontend object at
i2c_unregister_device time.
When the dvb frontend is unregistered afterwards it leads to this oops:

  [ 6058.866459] BUG: unable to handle kernel NULL pointer dereference at 00000000000001f8
  [ 6058.866578] IP: dvb_frontend_stop+0x30/0xd0 [dvb_core]
  [ 6058.866644] PGD 0
  [ 6058.866646] P4D 0

  [ 6058.866726] Oops: 0000 [#1] SMP
  [ 6058.866768] Modules linked in: rc_pinnacle_pctv_hd(O) em28xx_rc(O) si2157(O) si2168(O) em28xx_dvb(O) em28xx(O) si2165(O) a8293(O) tda10071(O) tea5767(O) tuner(O) cx23885(O) tda18271(O) videobuf2_dvb(O) videobuf2_dma_sg(O) m88ds3103(O) tveeprom(O) cx2341x(O) v4l2_common(O) dvb_core(O) rc_core(O) videobuf2_memops(O) videobuf2_v4l2(O) videobuf2_core(O) videodev(O) media(O) bluetooth ecdh_generic ums_realtek uas rtl8192cu rtl_usb rtl8192c_common rtlwifi usb_storage snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic i2c_mux snd_hda_intel snd_hda_codec snd_hwdep x86_pkg_temp_thermal snd_hda_core kvm_intel kvm irqbypass [last unloaded: videobuf2_memops]
  [ 6058.867497] CPU: 2 PID: 7349 Comm: kworker/2:0 Tainted: G        W  O    4.13.9-gentoo #1
  [ 6058.867595] Hardware name: MEDION E2050 2391/H81H3-EM2, BIOS H81EM2W08.308 08/25/2014
  [ 6058.867692] Workqueue: usb_hub_wq hub_event
  [ 6058.867746] task: ffff88011a15e040 task.stack: ffffc90003074000
  [ 6058.867825] RIP: 0010:dvb_frontend_stop+0x30/0xd0 [dvb_core]
  [ 6058.867896] RSP: 0018:ffffc90003077b58 EFLAGS: 00010293
  [ 6058.867964] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000010040001f
  [ 6058.868056] RDX: ffff88011a15e040 RSI: ffffea000464e400 RDI: ffff88001cbe3028
  [ 6058.868150] RBP: ffffc90003077b68 R08: ffff880119390380 R09: 000000010040001f
  [ 6058.868241] R10: ffffc90003077b18 R11: 000000000001e200 R12: ffff88001cbe3028
  [ 6058.868330] R13: ffff88001cbe68d0 R14: ffff8800cf734000 R15: ffff8800cf734098
  [ 6058.868419] FS:  0000000000000000(0000) GS:ffff88011fb00000(0000) knlGS:0000000000000000
  [ 6058.868511] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  [ 6058.868578] CR2: 00000000000001f8 CR3: 00000001113c5000 CR4: 00000000001406e0
  [ 6058.868662] Call Trace:
  [ 6058.868705]  dvb_unregister_frontend+0x2a/0x80 [dvb_core]
  [ 6058.868774]  em28xx_dvb_fini+0x132/0x220 [em28xx_dvb]
  [ 6058.868840]  em28xx_close_extension+0x34/0x90 [em28xx]
  [ 6058.868902]  em28xx_usb_disconnect+0x4e/0x70 [em28xx]
  [ 6058.868968]  usb_unbind_interface+0x6d/0x260
  [ 6058.869025]  device_release_driver_internal+0x150/0x210
  [ 6058.869094]  device_release_driver+0xd/0x10
  [ 6058.869150]  bus_remove_device+0xe4/0x160
  [ 6058.869204]  device_del+0x1ce/0x2f0
  [ 6058.869253]  usb_disable_device+0x99/0x270
  [ 6058.869306]  usb_disconnect+0x8d/0x260
  [ 6058.869359]  hub_event+0x93d/0x1520
  [ 6058.869408]  ? dequeue_task_fair+0xae5/0xd20
  [ 6058.869467]  process_one_work+0x1d9/0x3e0
  [ 6058.869522]  worker_thread+0x43/0x3e0
  [ 6058.869576]  kthread+0x104/0x140
  [ 6058.869602]  ? trace_event_raw_event_workqueue_work+0x80/0x80
  [ 6058.869640]  ? kthread_create_on_node+0x40/0x40
  [ 6058.869673]  ret_from_fork+0x22/0x30
  [ 6058.869698] Code: 54 49 89 fc 53 48 8b 9f 18 03 00 00 0f 1f 44 00 00 41 83 bc 24 04 05 00 00 02 74 0c 41 c7 84 24 04 05 00 00 01 00 00 00 0f ae f0 <48> 8b bb f8 01 00 00 48 85 ff 74 5c e8 df 40 f0 e0 48 8b 93 f8
  [ 6058.869850] RIP: dvb_frontend_stop+0x30/0xd0 [dvb_core] RSP: ffffc90003077b58
  [ 6058.869894] CR2: 00000000000001f8
  [ 6058.875880] ---[ end trace 717eecf7193b3fc6 ]---

Change-Id: I5953a4f0f1020f051c5c1426898ccc4de3ef62dc
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c6193f92ac386e9fe3e367610b2af3415045f17c)
2019-03-30 07:59:30 +01:00
kote
7eb7861c79 usb: dwc3-msm: Initialize mutex before registering extcon
Improve usb stability

Change-Id: I40e1b750a2fac591df2457b0d660db3bc880298a
Signed-off-by: kote <kote@oneplus.com>
(cherry picked from commit dfd19b024fefed6165bd55858438f26d24cdef8e)
2019-03-30 07:59:30 +01:00
Theodore Ts'o
3d05e69b4e ext4: always verify the magic number in xattr blocks
commit 513f86d73855ce556ea9522b6bfd79f87356dc3a upstream.

If there an inode points to a block which is also some other type of
metadata block (such as a block allocation bitmap), the
buffer_verified flag can be set when it was validated as that other
metadata block type; however, it would make a really terrible external
attribute block.  The reason why we use the verified flag is to avoid
constantly reverifying the block.  However, it doesn't take much
overhead to make sure the magic number of the xattr block is correct,
and this will avoid potential crashes.

This addresses CVE-2018-10879.

https://bugzilla.kernel.org/show_bug.cgi?id=200001

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
[Backported to 4.4: adjust context]
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: I06728150aefd0fffbdb6bd7cbce0858221ff6f74
(cherry picked from commit 62a28a64d87fbdce5c0a988b440a4ae6dd37b41e)
2019-03-30 07:59:30 +01:00
Theodore Ts'o
092ca04237 ext4: avoid running out of journal credits when appending to an inline file
commit 8bc1379b82b8e809eef77a9fedbb75c6c297be19 upstream.

Use a separate journal transaction if it turns out that we need to
convert an inline file to use an data block.  Otherwise we could end
up failing due to not having journal credits.

This addresses CVE-2018-10883.

https://bugzilla.kernel.org/show_bug.cgi?id=200071

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
[fengc@google.com: 4.4 backport: adjust context]
Signed-off-by: Chenbo Feng <fengc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: I75f040b4276587a6a234a6a53fd1d3d70be6ae09
(cherry picked from commit d49dc6f1d53479bca01900540a89639eea8b154e)
2019-03-30 07:59:30 +01:00
Theodore Ts'o
56c5b91e06 ext4: add corruption check in ext4_xattr_set_entry()
commit 5369a762c882c0b6e9599e4ebbb3a9ba9eee7e2d upstream.

In theory this should have been caught earlier when the xattr list was
verified, but in case it got missed, it's simple enough to add check
to make sure we don't overrun the xattr buffer.

This addresses CVE-2018-10879.

https://bugzilla.kernel.org/show_bug.cgi?id=200001

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
[bwh: Backported to 3.16:
 - Add inode parameter to ext4_xattr_set_entry() and update callers
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[adjusted for 4.4 context]
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: Ife3baeba57d5e63e7745ee8d5f4b01c6e9de4bc6
(cherry picked from commit ff3692e264d5c34ca9a15ab995808f98d9f874a8)
2019-03-30 07:59:30 +01:00
Linux Build Service Account
3d4358fbe6 Merge 8bc8a30bdb on remote branch
Change-Id: I063c744b5f1354362c33b497a9bc619dc6fdd05c
2019-03-29 08:23:16 -07:00
Vignesh Kulothungan
ed93ca6232 msm: asm: validate ADSP data before access
Validate buffer index obtained from ADSP token before using it.

CRs-Fixed: 2372302
Change-Id: I5c3b1634bd08b516844638dd67f726a882edfc17
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-03-28 18:29:01 -07:00
Neeraj Soni
b55c37ac6f msm: ice: check for crypto engine availability
There can be many ice instances present in dtsi file but
not all of them will be initialized by storage driver.
Check if crypto instance is initialized before setting
it up for data encryption/decryption usage.

Change-Id: I7c9227007474052513b277dec5963a973781c524
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2019-03-28 00:45:19 -07:00
Linux Build Service Account
cbdb77b292 Merge "icnss: Add Api to Block/Unblock modem shutdown" 2019-03-27 08:14:51 -07:00
Sandeep Singh
ab8f63420c icnss: Add Api to Block/Unblock modem shutdown
Add API to Block/Unblock modem graceful shutdown.

Change-Id: I69b061fc7d25762b2c36d9590802addfc170f91f
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
2019-03-27 18:10:38 +05:30
Sandeep Singh
0fe53af862 icnss: Defer modem graceful shutdown until probe complete
In case WLAN driver probe is in progress and modem graceful
shutdown occurs and if modem shutdown request is sent just
before the mode on request sent to firmware, firmware may end up
in illegal memory access.
To address this issue, modem notifier needs to be blocked needs for
probe to complete or max 5 seconds timeout.

CRs-Fixed: 2381846
Change-Id: I9e13a11c56059cb29e161c34df11de484f87ac5e
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
2019-03-27 17:08:56 +05:30
Xiaojun Sang
7289a6a51e dsp: validate token before usage as array index
Token from DSP might be invalid for array index. Validate the
token before being used as array index.

Change-Id: I9f47e1328d75d9f9acf7e85ddb452019b6eced0a
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-03-26 05:23:32 -07:00
Shadab Naseem
8bc8a30bdb scripts: gcc-wrapper: Route the GCC errors to stderr
The GCC wrapper writes any error message from GCC to stdout
along with the messages from the wrapper itself. This is okay
for most case, but when GCC is used with -print-xxx flags,
the stdout output is supposed to be taken as input to some
other build command, so putting error messages in there is
pretty bad. Fix this by writing error messages to stderr.

Change-Id: I4656033f11ba5212fdcc884cc588f8b9d2c23419
Signed-off-by: Shadab Naseem <snaseem@codeaurora.org>
2019-03-24 22:29:49 -07:00
Sandeep Singh
14961ab5bb icnss: Add support for graceful shutdown
Add a QMI command to indicate graceful shutdown to the FW
and updating the QMI file.

Change-Id: I0360f6f5b49bc19ea4a7acbbd0e192e1596463d6
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
2019-03-20 03:52:07 -07:00
Manoj Prabhu B
d7807eff3a diag: dci: Validate dci client entries prior read
Validate the dci entries and its task structure before
accessing structure members to prevent copying dci data to
invalid entries.

Change-Id: I07c59ef0705bc52a8268b0dc984ebfa9d26d178e
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2019-03-14 23:23:10 -07:00
codeworkx
73c07acc75 tri-state-key: send proper input when updating keycodes from userspace
Change-Id: I6a3d2869d7e4c655b02454b91c5bef19a5a815f9
2019-03-13 20:23:25 +01:00
codeworkx
5e0993b0c8 Revert "tri_state_key: import driver from msm8996"
cheeseburger is a biatch!

This reverts commit 061081b187.

Change-Id: Icecd4afbf9d298e7513edba02ac20ac27e85d014
2019-03-13 20:23:21 +01:00
Linux Build Service Account
841cf03d93 Merge "diag: Add protection while accessing usb_info's buffer table" 2019-03-12 00:10:55 -07:00
Hardik Arya
6f1987e5d8 diag: Add protection while accessing usb_info's buffer table
Currently there a possibility of NULL pointer dereference while
accessing usb_info's buffer table due to missing proper protection.
The patch adds protection for the same.

Change-Id: I974a70a48e7ac47b42bc237aac4db1b9e47be6be
Signed-off-by: Hardik Arya <harya@codeaurora.org>
2019-03-11 22:34:10 -07:00
Hardik Arya
168a91f810 diag: Free usb buffer's entry after removing from list
Currently, there is possibility of memory leak due to not
freeing allocated memory for usb buffer's entry after
removing it from list. The patch handle this by freeing
the entry.

Change-Id: Idb08ecad859749e6ab1b09184362de38de4a9836
Signed-off-by: Hardik Arya <harya@codeaurora.org>
2019-03-11 22:31:22 -07:00