Commit graph

599432 commits

Author SHA1 Message Date
Daniel Rosenberg
742017e8de ANDROID: sound: rawmidi: Hold lock around realloc
The SNDRV_RAWMIDI_STREAM_{OUTPUT,INPUT} ioctls may reallocate
runtime->buffer while other kernel threads are accessing it.  If the
underlying krealloc() call frees the original buffer, then this can turn
into a use-after-free.

Most of these accesses happen while the thread is holding runtime->lock,
and can be fixed by just holding the same lock while replacing
runtime->buffer, however we can't hold this spinlock while
snd_rawmidi_kernel_{read1,write1} are copying to/from userspace.  We
need to add and acquire a new mutex to prevent this from happening
concurrently with reallocation.  We hold this mutex during the entire
reallocation process, to also prevent multiple concurrent reallocations
leading to a double-free.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
bug: 64315347
Change-Id: I05764d4f1a38f373eb7c0ac1c98607ee5ff0eded
[dcagle@codeaurora.org: Resolve trivial merge conflict]
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: d7193540482d11ff0ad3a07fc18717811641c6eb
Signed-off-by: Dennis Cagle <dcagle@codeaurora.org>
2018-05-02 05:13:18 -07:00
Linux Build Service Account
cb0e8e7c96 Merge "leds: qpnp-flash-v2: Modify current code calculation" 2018-05-02 04:54:41 -07:00
Linux Build Service Account
bf8090cf06 Merge "hab: import/export between remote buffer and dmafd" 2018-05-02 04:54:40 -07:00
Linux Build Service Account
2542cb864f Merge "i2c-msm-v2: Add support for suspend to disk" 2018-05-02 04:54:39 -07:00
Linux Build Service Account
aab4834f1e Merge "diag: Validate query dci event and log mask size properly" 2018-05-02 04:54:38 -07:00
Linux Build Service Account
c38b834398 Merge "Merge android-4.4.128 (89904cc) into msm-4.4" 2018-05-02 04:54:37 -07:00
Linux Build Service Account
1c294945bc Merge "usb: gadget: ffs: Multi-instance fix for use after free case" 2018-05-02 04:54:36 -07:00
Linux Build Service Account
b0b4c8bfd4 Merge "tracing: always define trace_{irq,preempt}_{enable_disable}" 2018-05-02 04:54:35 -07:00
Linux Build Service Account
e16f4fa16b Merge "cpuidle: lpm-levels: Fix snprintf string format" 2018-05-02 04:54:33 -07:00
Linux Build Service Account
ff39bce7b8 Merge "soc: qcom: rpm_stats: Fix snprintf string format" 2018-05-02 04:54:32 -07:00
Mohammed Javid
f01d00d213 msm: ipa: using debug logging instead of error logging
Adding code changes to controlling logs printing
on the console changing error logging to debug logging

Change-Id: I35f4c0e3380ad700899808d9cd6c260befb8be8f
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-05-02 03:24:26 -07:00
Ram Prakash Gupta
7716fb9b8f mmc: core: power cycle card when sd card switch voltage operation fails
As per the sd card spec, mmc need to power cycle sd card in case sd
card voltage switch operation fails. Currently we are directly going
for low speed mode without power cycle, which is in violation of sd
card spec. Now we will retry for 10 times in case timeout happens
while switching voltage and at last, in case, it did not succeed in
switching sd card voltage, mmc would go for low speed mode.

Change-Id: Icece08732b8d52104e0890dce81ad16844265edd
Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
2018-05-02 15:14:25 +05:30
Pradeep P V K
4c4c2ded21 mmc: card: WARN_ON in cmdq completion context
Due to command queuing, there is a possibility of servicing
completion of multiple requests from hw irq context. So in
this case, hw irq will launch softirq for all requests which
were completed (irrespective of whether it was success or failure).

If one of the requests failed, then the softirq corresponding
to error ed request will set current cmdq state to CMDQ_STATE_ERR.
Because of this, subsequent completion softirqs for successful
requests will BUG_ON.

We should let higher layers know of completion of successful
requests. Hence change the BUG_ON to WARN_ON and skip
blk_end_request() only if the corresponding request has
an error (instead of checking if the cmdq state is in error)

Change-Id: Ieb7f9d12ba04b6ab6499bf29f3716b0ddfb880fb
Signed-off-by: Pradeep P V K <ppvk@codeaurora.org>
2018-05-02 00:04:40 -07:00
Suprith Malligere Shankaregowda
3945168c9c msm: ais: isp: Handling buffer use after getting it freed
In the code, start_fetch can try to access the buffer
pointer variable after free, as the same pointer can
can be freed at RELEASE_BUF call too at the same time.
Hence fixing this race condition.

Change-Id: I05825fb3423f95bc251e79416de50dc32cf086dc
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
2018-05-01 23:17:58 -07:00
Roman Kiryanov
ed11d8f2a0 goldfish: pipe: ANDROID: Allocate memory with GFP_KERNEL.
We use GFP_KERNEL in the outer context.

Bug: 72717639
Bug: 66884503
Change-Id: I5e10dba5138818351936ec0f70cd01070eaf199f
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-02 04:31:13 +00:00
Roman Kiryanov
00b597e73d goldfish: pipe: ANDROID: Do not crash
Return an error instead of crashing in signalled_pipes_add_locked.

Bug: 72717639
Bug: 66884503
Change-Id: I811ad1932f1600f8bbe4598cdaf206bd96ea921a
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-02 04:13:36 +00:00
Linux Build Service Account
d1507b1236 Merge "usb: dwc3-msm: Resume PHY before notify_connect on start_host" 2018-05-01 17:00:40 -07:00
Linux Build Service Account
6934044c51 Merge "ASoC: msm: move tdm grp mgt to afe for anc support" 2018-05-01 17:00:37 -07:00
Amar Singhal
2f15a9ac96 defconfig: Enable cellular hints in regulatory cfg80211
The user-space may send regulatory hint that has cellular sub-type
enabled. To process such events, enable
CONFIG_CFG80211_REG_CELLULAR_HINTS.

Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
Change-Id: I79aceece8e7f17bbcf8186b03c74d82be82c5a4c
CRs-Fixed: 2201959
2018-05-01 16:38:48 -07:00
Roman Kiryanov
8b274c3897 goldfish: pipe: ANDROID: remove redundant casting
Casting twice is not required.

Bug: 72717639
Bug: 66884503
Change-Id: I3420388683a9746f2d2110af51d9d25c12c7eea6
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-01 13:25:37 -07:00
Roman Kiryanov
ed6207885d goldfish: pipe: ANDROID: Add 'pipe' to pipe functions
Replace the 'goldfish' prefix with 'goldfish_pipe' to
say they are pipe functions.

Bug: 72717639
Bug: 66884503
Change-Id: I5a5cf7ee38cf2ae193877b1ffac19eadb15a374a
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-01 13:06:26 -07:00
Roman Kiryanov
e008465076 goldfish: pipe: ANDROID: fix whitespace
Make checkpatch.pl happy.

Bug: 72717639
Bug: 66884503
Change-Id: Ie8758cc91595eba57a0c9144cfba9309da62c966
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-01 12:58:46 -07:00
Roman Kiryanov
9846d12d48 goldfish: pipe: ANDROID: rename global variables
We don't need an array of 1 for pipe_dev and
use better names to distinguish between
goldfish_pipe_dev and miscdevice.

Bug: 72717639
Bug: 66884503
Change-Id: Iab040c158745f034ca8e9569fd49c84933b1c4ba
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-01 12:11:49 -07:00
Roman Kiryanov
d176c57751 goldfish: pipe: ANDROID: remove a redundant target
Bug: 72717639
Bug: 66884503
Change-Id: Ie2fbf13bccd68e5091c5966b78cb5838840bc61e
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-01 12:09:51 -07:00
Roman Kiryanov
9a7f2e9641 goldfish: pipe: ANDROID: add blank lines
To separate variable declarations from executable code
and to improve readability.

Bug: 72717639
Bug: 66884503
Change-Id: I46fb70b13b8e3d061dfc2288f5720a379f1f39a9
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-01 12:06:13 -07:00
Roman Kiryanov
c4fcb01762 goldfish: pipe: ANDROID: replace 'BUG_ON' with 'BUILD_BUG_ON'
Bug: 72717639
Bug: 66884503
Change-Id: I6afcf21c7ff0fd2f5fcca327813b8406798c4269
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-01 11:51:43 -07:00
Roman Kiryanov
0794d75be1 goldfish: pipe: ANDROID: use the 'BIT' macro for wakeup flags
Bug: 72717639
Bug: 66884503
Change-Id: I977525f145d8b678d39867037c5fddcc35e0a52b
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-01 11:49:50 -07:00
Roman Kiryanov
ec6875b2de goldfish: pipe: ANDROID: fix logging format strings
* remove '%p' to avoid exposing kernel addresses;
* add missing '\n'.

Bug: 72717639
Bug: 66884503
Change-Id: I81357841dc334df595a3244f232c2e6bb72e64a1
Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-05-01 11:47:38 -07:00
Vatsal Bucha
c97bf10fd2 ASoC: sdm660_cdc: Fix pop after PDR on SDM660 internal codec
Pop is heard after PDR is triggered. This is
resolved by disable PA before boost is discharged.

CRs-Fixed: 2186640
Change-Id: Ie48668725f5162251cf09215f9448a6965fac3e2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-05-01 19:32:19 +05:30
Linux Build Service Account
2223ffa69b Merge "drm/msm/sde: increase gpu input fence timeout to 10 seconds" 2018-05-01 06:26:41 -07:00
Linux Build Service Account
e6e01da7c4 Merge "drm: msm: add uevent handler to release pipes" 2018-05-01 06:26:39 -07:00
Linux Build Service Account
8517b96791 Merge "drm: msm: add early splash support on triple displays" 2018-05-01 06:26:38 -07:00
Linux Build Service Account
f43d6a5263 Merge "msm: ipa: rmnet: Make code changes with respect to CR#2046006" 2018-05-01 06:26:37 -07:00
Linux Build Service Account
f7b7bdea5a Merge "Revert "adv7481: return error when PLL lock fails"" 2018-05-01 06:26:36 -07:00
Linux Build Service Account
58d23d8d65 Merge "ath10k: update wowlan config and rekey data store method" 2018-05-01 06:26:35 -07:00
Linux Build Service Account
aa6d4b9770 Merge "net: ipc_router: Remove wakeup-source for Sensor ports" 2018-05-01 06:26:34 -07:00
Linux Build Service Account
0af3c13aa0 Merge "ASoC: msm: Update channel mixer weight mixer control" 2018-05-01 06:26:32 -07:00
Linux Build Service Account
036d89dd56 Merge "soc: msm: add apr sensor domain support" 2018-05-01 06:26:31 -07:00
Linux Build Service Account
7df7eae8eb Merge "audio: qdsp6v2: add retry when EAGAIN for habmm_socket_recv" 2018-05-01 06:26:28 -07:00
Venkata Prahlad Valluru
4b4771bdca input: touchscreen: synaptics_dsx: Fix buffer overflow
Limit the index to buffer length while copying from
'strptr' to 'firmware_id'.

Change-Id: I1d7cb7a3d9593ca213c7f7341776632e635eb0df
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2018-05-01 01:38:15 -07:00
Linux Build Service Account
b98369d69b Merge "msm: camera: sensor: Adjust csiphy skew filter setting" 2018-04-30 21:09:08 -07:00
Linux Build Service Account
b09928fabb Merge "msm: camera: Change data type of data rate" 2018-04-30 21:09:06 -07:00
Linux Build Service Account
1a61dab660 Merge "esoc: Use standard reset time for mdm9x55 atomic reset" 2018-04-30 21:09:02 -07:00
Derek Chen
f21277cc09 ARM: dts: msm: enable sensor node on msm8996 and apq8096
Enable sensor device node to allow Anti-Noise
Cancellation (ANC) algorithm to be running on
sensor subsystem for automotive msm8996 and
apq8096 platforms.

CRs-fixed: 2153236
Change-Id: I213c2eb94f6fe01e7c2ceca2d9033616817db38b
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2018-04-30 13:39:28 -07:00
Derek Chen
6b9c57b3bc soc: msm: add sensor dsp framework support for anc
Add Sensor DSP framework support for Active
Engine Noise Cancellation (ANC).

CRs-fixed: 2153236
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Change-Id: I4cd28ac1bbfd3fcd21174e0216c70cd664cfa319
2018-04-30 13:38:37 -07:00
Greg Kroah-Hartman
12ef385f51 This is the 4.4.130 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlrlXREACgkQONu9yGCS
 aT6hkA//dewP2AXQLE4Nb3ufxBOo2CcDOKRrMQTgwnaqe06FnXcdty8jZ6I6ziBV
 MtpYmyTY4Ujj062LPjwov6CEI3qS5aNXFd9Xqtq490FQBeKBA56MgZ7qOEb/aHDQ
 4e7D9hIFp+gu2J41toWMJO/BZ1qcMKOEo9e49NNQG+4JjNz6fhdQpdsGC8QqFauQ
 aT6l+cHhU+yxuBdj/Nzu5YnQrE4Ijk3omOsLrGR6hUCjG0pSOX2YK7XF+W+VcWd9
 7Uky54yPC/DuDLTLCWdZJxD/2WzrE0vvKhfkhty4X0k9ZXqnGbSr1x/FSKLrnXNi
 aigN2OBvlHI2RBwl8J06QOfmG32Ndi32nNj7f5+45VXQkiVK7OS3B0CgkYh4m+7J
 dEZVvH8Ddj4p6Io8WqWWRP0UDRNPP+reUwlIIg19dSKMv0veez1g0AFO7AbWh2Lu
 q9QRxtKTeYR7We8w3F2CeLHjP1NLhKvdffT8TVjhEL6MekWkOjFjQXGoRIOPpeld
 T0buhSQMgoEuJXMPz9zywJ2MmgKcRtmQKGKfZ7MDa82kwiIY5KRemTVnwn1lEKXU
 EC+kCQmjiobcuGbBbH1hXfWcSpDl/+ZwI5r0L2Lzkzf0R+Efge7rGBXZQCgz3FGp
 DVtpPPnRnXbGZX+0GyeiZ5O9wCfZTQxqOrMk2rtPbxJY5f6yIcE=
 =IA5i
 -----END PGP SIGNATURE-----

Merge 4.4.130 into android-4.4

Changes in 4.4.130
	cifs: do not allow creating sockets except with SMB1 posix exensions
	x86/tsc: Prevent 32bit truncation in calc_hpet_ref()
	perf: Return proper values for user stack errors
	staging: ion : Donnot wakeup kswapd in ion system alloc
	r8152: add Linksys USB3GIGV1 id
	Input: drv260x - fix initializing overdrive voltage
	ath9k_hw: check if the chip failed to wake up
	jbd2: fix use after free in kjournald2()
	Revert "ath10k: send (re)assoc peer command when NSS changed"
	s390: introduce CPU alternatives
	s390: enable CPU alternatives unconditionally
	KVM: s390: wire up bpb feature
	s390: scrub registers on kernel entry and KVM exit
	s390: add optimized array_index_mask_nospec
	s390/alternative: use a copy of the facility bit mask
	s390: add options to change branch prediction behaviour for the kernel
	s390: run user space and KVM guests with modified branch prediction
	s390: introduce execute-trampolines for branches
	s390: Replace IS_ENABLED(EXPOLINE_*) with IS_ENABLED(CONFIG_EXPOLINE_*)
	s390: do not bypass BPENTER for interrupt system calls
	s390/entry.S: fix spurious zeroing of r0
	s390: move nobp parameter functions to nospec-branch.c
	s390: add automatic detection of the spectre defense
	s390: report spectre mitigation via syslog
	s390: add sysfs attributes for spectre
	s390: correct nospec auto detection init order
	s390: correct module section names for expoline code revert
	bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave
	KEYS: DNS: limit the length of option strings
	l2tp: check sockaddr length in pppol2tp_connect()
	net: validate attribute sizes in neigh_dump_table()
	llc: delete timers synchronously in llc_sk_free()
	tcp: don't read out-of-bounds opsize
	team: avoid adding twice the same option to the event list
	team: fix netconsole setup over team
	packet: fix bitfield update race
	pppoe: check sockaddr length in pppoe_connect()
	vlan: Fix reading memory beyond skb->tail in skb_vlan_tagged_multi
	sctp: do not check port in sctp_inet6_cmp_addr
	llc: hold llc_sap before release_sock()
	llc: fix NULL pointer deref for SOCK_ZAPPED
	tipc: add policy for TIPC_NLA_NET_ADDR
	net: fix deadlock while clearing neighbor proxy table
	tcp: md5: reject TCP_MD5SIG or TCP_MD5SIG_EXT on established sockets
	net: af_packet: fix race in PACKET_{R|T}X_RING
	ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy
	scsi: mptsas: Disable WRITE SAME
	cdrom: information leak in cdrom_ioctl_media_changed()
	s390/cio: update chpid descriptor after resource accessibility event
	s390/uprobes: implement arch_uretprobe_is_alive()
	Linux 4.4.130

Change-Id: I58646180c70ac61da3e2a602085760881d914eb5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-04-30 05:54:58 -07:00
Ramu Gottipati
ad131d3ea9 ASoC: msm: qdsp6v2 : Add AFE port validation for MULTICHAN_HDMI_RX
validate port doesn't handle MULTICHAN_HDMI_RX
and causes failure to set afe params.
Included MULTICHAN_HDMI_RX in port validation

Change-Id: I3603ec2a3d392970cb48be1658b6030d3f4107f2
Signed-off-by: Ramu Gottipati <ramug@codeaurora.org>
2018-04-30 13:50:59 +05:30
Mohammed Javid
4987fb136c msm: ipa: rmnet: Make code changes with respect to CR#2046006
Check for CAP_NET_ADMIN capability of the user
space application who tries to access rmnet driver IOCTL.

Change-Id: If6bb4b54659306c5103b5e34bf02c7234c851e0a
CRs-Fixed: 2226355
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-04-30 00:07:34 -07:00
Vijay kumar Tumati
f35c51fe09 msm: camera: sensor: Adjust csiphy skew filter setting
Change camera csiphy skew filter setting to match HPG.

Change-Id: I21d63daa95bd1901b6343e7ff47f05e259a1a8a1
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
2018-04-30 10:41:26 +05:30
Linux Build Service Account
866d379212 Merge "msm: Allocate fd with O_CLOEXEC flag" 2018-04-29 21:09:50 -07:00