Commit graph

602360 commits

Author SHA1 Message Date
Andrew Lunn
b40bf2be3c mdio: Add support for mdio drivers.
Not all devices on an MDIO bus are PHYs. Meaning not all MDIO drivers
are PHY drivers. Add support for generic MDIO drivers.

Change-Id: I65c7c8a497bbac9ef67b3d21c869818a09378e3c
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-Commit: a9049e0c513c4521dbfaa302af8ed08b3366b41f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Anthony Mah <amah@codeaurora.org>
2018-09-10 11:42:06 -07:00
Christoph Hellwig
fc468d5035 aio: hold an extra file reference over AIO read/write operations
Otherwise we might dereference an already freed file and/or inode
when aio_complete is called before we return from the read_iter or
write_iter method.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 0b944d3a4bba6b25f43aed530f4fa85c04d162a6)
Change-Id: I628a87b5036ba1ba5ba5152fa0329d02999d3649
Git-Commit: 0b944d3a4bba6b25f43aed530f4fa85c04d162a6
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
[riteshh@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2018-09-10 08:29:21 -07:00
Naitik Bharadiya
153e3048f9 defconfig: msm8998: align with android config requirement
Align with android-base.cfg which is android kernel config
requirement for msm8998_defconfig.

Change-Id: I69cbca16705d25b5505792b11ae4f054be09457f
Signed-off-by: Naitik Bharadiya <bharad@codeaurora.org>
2018-09-10 19:12:59 +05:30
Linux Build Service Account
68cad04925 Merge "Revert "msm: adsprpc: DSP device node to provide restricted access to ADSP/SLPI"" 2018-09-09 22:08:34 -07:00
Teng Fei Fan
8cfbfe24f1 soc: qcom: socinfo: Add support for SDM455 soc-id
Add socinfo support for SDM455 Soc and update the
bindings fot the same.

Change-Id: I9b30795e202d84ae06020983b2d656772fb4f313
Signed-off-by: Teng Fei Fan <tengfei@codeaurora.org>
2018-09-10 10:36:23 +08:00
Linux Build Service Account
f7d188b0ff Merge "clk: msm: add uninterruptible flag in hab receiving for virtual reset." 2018-09-08 23:45:05 -07:00
Linux Build Service Account
26a9949800 Merge "ARM: dts: msm: Invert polarity of PMD_MPP_08 for msm8996 CV2X" 2018-09-08 23:45:03 -07:00
Linux Build Service Account
d6d8c10244 Merge "USB: pd: Notify selfpowered state based on type C current" 2018-09-08 12:33:56 -07:00
Linux Build Service Account
83a0df578b Merge "kthread/smpboot: Serialize kthread parking against wakeup" 2018-09-07 10:15:55 -07:00
Linux Build Service Account
24caba9ff9 Merge "f_qc_rndis: Call rndis_ipa_init() from rndis_qc_bind()" 2018-09-07 10:15:44 -07:00
Linux Build Service Account
edec328dda Merge "mm: Kconfig: Add support for config size of purging vmap_area" 2018-09-07 10:15:43 -07:00
Gaurav Kohli
a5e204282a kthread/smpboot: Serialize kthread parking against wakeup
The control cpu thread which initiates hotplug calls kthread_park()
for hotplug thread and sets KTHREAD_SHOULD_PARK. After this control
thread wakes up the hotplug thread. There is a chance that wakeup
code sees the hotplug thread (running on AP core) in INTERRUPTIBLE
state, but sets its state to RUNNING after hotplug thread has entered
kthread_parkme() and changed its state to TASK_PARKED. This can result
in panic later on in kthread_unpark(), as it sees KTHREAD_IS_PARKED
flag set but fails to rebind the kthread, due to it being not in
TASK_PARKED state. Fix this, by serializing wakeup state change,
against state change before parking the kthread.

Below is the possible race:

Control thread				      Hotplug Thread

kthread_park()
set KTHREAD_SHOULD_PARK
					      smpboot_thread_fn
					      set_current_state(TASK_INTERRUPTIBLE);
					      kthread_parkme

wake_up_process()

raw_spin_lock_irqsave(&p->pi_lock, flags);
if (!(p->state & state)) -> this will fail
            goto out;

					      __kthread_parkme
					       __set_current_state(TASK_PARKED);

if (p->on_rq && ttwu_remote(p, wake_flags))
    ttwu_remote()
        p->state = TASK_RUNNING;
						schedule();

So to avoid this race, take pi_lock to serial state changes.

Change-Id: Ie71645d37046f7ee74df880dbead29efbaad199a
Suggested-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2018-09-07 04:49:36 -07:00
Zhiqiang Tu
29d1644dde clk: msm: add uninterruptible flag in hab receiving for virtual reset.
Add uninterruptible flag in hab receiving for virtual reset controller
to avoid being interrupted by signal.

Change-Id: Iddca4134eec082537110bd7735e0e282cd5c7454
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2018-09-07 16:03:31 +08:00
Vijayavardhan Vennapusa
d06bb4edc6 f_qc_rndis: Call rndis_ipa_init() from rndis_qc_bind()
During composition switch, current driver ends up calling
rndis_ipa_cleanup twice without calling rndis_ipa_init() in between.
This could cause spinbug in IPA driver due to uninitialized spin lock.
Hence fix the issue by moving rndis_ipa_init() to bind() callback and
calling rndis_ipa_cleanup() in unbind() callback.

Change-Id: I1be18de9137ba61cf0f004c7edeac54235617d33
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2018-09-06 23:12:54 -07:00
Zhenhua Huang
fdaab1ed01 mm: Kconfig: Add support for config size of purging vmap_area
This size is the maximum amount of virtual address space we gather
up before attempting to purge with a TLB flush. It is 128M in most cases.
With repeated and high size vmalloc operations, it may easily generate
more fragments. This is wasting limited vmalloc area, for 32bits.
So make it configable and the default multiplier as 8, 32bits only.

Change-Id: I68a75acb16d3cff05f8b13c05ae78922269e219f
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
2018-09-06 22:00:54 -07:00
Aditya Mathur
ed79b56e02 ARM: dts: msm: Invert polarity of PMD_MPP_08 for msm8996 CV2X
Invert the polarity of PMD_MPP_08 on msm8996 CV2X
to properly power on and off the external
modem as required.

Change-Id: I56226f4d14a2e21331bacf0a7125dc06bfd91aac
Signed-off-by: Aditya Mathur <aditmath@codeaurora.org>
2018-09-06 17:16:30 -07:00
Linux Build Service Account
ab3dba93ce Merge "drm/msm/hdmi: add rgb flag for HDMI customized mode" 2018-09-06 14:14:26 -07:00
Linux Build Service Account
c44da670c2 Merge "Merge android-4.4.153 (5e24b4e) into msm-4.4" 2018-09-06 14:14:24 -07:00
Linux Build Service Account
356bd90ee7 Merge "printk: Make the console flush configurable in hotplug path" 2018-09-06 07:25:59 -07:00
Linux Build Service Account
42b8b55309 Merge "adv7481: Modify EDID array to support 1080p60Hz" 2018-09-06 07:25:58 -07:00
Linux Build Service Account
efcfd7d353 Merge "audio: qdsp6v2: check EINTR when retry for habmm_socket_recv" 2018-09-06 07:25:57 -07:00
Linux Build Service Account
16527590d2 Merge "cnss: comment cnss_msm_pcie_pm_control at GreenHills platform" 2018-09-06 07:25:55 -07:00
Mohammed Khajapasha
20f23e546e printk: Make the console flush configurable in hotplug path
The thread which initiates the hot plug can get scheduled
out, while trying to acquire the console lock,
thus increasing the hot plug latency. This option
allows to selectively disable the console flush and
in turn reduce the hot plug latency.

Change-Id: I42507804d321b29b7761146a6c175d959bf79925
Signed-off-by: Mohammed Khajapasha <mkhaja@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2018-09-06 04:04:46 -07:00
Linux Build Service Account
b9c3aa30ea Merge "soc: qcom: subsystem_notif_virt: Fix error condition check" 2018-09-05 22:13:30 -07:00
Linux Build Service Account
c5b97fae5c Merge "msm: mdss: Fix Gamma LUT bounds condition" 2018-09-05 22:13:23 -07:00
Suprith Malligere Shankaregowda
0871abc2df adv7481: Modify EDID array to support 1080p60Hz
1080p60Hz HDMI_OUT(PC) not displayed in TIF due to wrong clock value,
So increasing clock value to 148.5MHz in Detailed Timing Descriptor
And reorder video data block to support 1080p60Hz.

Change-Id: I91ffc02f97c9b4fa5362444382af1b91af9c03b6
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
2018-09-05 20:58:35 -07:00
Tony Han
51139b0339 audio: qdsp6v2: check EINTR when retry for habmm_socket_recv
HAB returns -EINTR instead of -EAGAIN to request a retry from the
habmm_socket_recv() call.

Change-Id: I61bcef5c11048a3947b8079d1591937d7b83602a
Signed-off-by: Tony Han <xiahan@codeaurora.org>
2018-09-06 11:43:52 +08:00
Yunyun Cao
99c41dbdb3 drm/msm/hdmi: add rgb flag for HDMI customized mode
Add rgb flag to make sure HDMI customized mode pass
the format check.

Change-Id: I2d1df731bef493e15f83dac569673589e2408c68
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
2018-09-06 11:41:19 +08:00
Gerrit - the friendly Code Review server
6aab18ee11 Merge changes into msm-4.4 2018-09-05 11:56:52 -07:00
Anant Goel
92d889892a soc: qcom: subsystem_notif_virt: Fix error condition check
An error check casts an integer to a pointer. Fix the error
check so that the integer is not casted to a pointer.

Change-Id: Ib15634745cc2243e4fe54557d6670956d8349e93
Signed-off-by: Anant Goel <anantg@codeaurora.org>
2018-09-05 10:10:32 -07:00
Linux Build Service Account
b2414c77cd Merge "nl80211: nl80211_update_ft_ies to validate NL80211_ATTR_IE" 2018-09-05 04:32:31 -07:00
Padmanabhan Komanduru
a00ce1c8cb clk: qcom: check for change in RCG configuration during set_rate
For DSI byte clock RCG, check if there is a change in existing
settings before updating RCG configuration. This is needed to
avoid glitch on the display panel when there is a change in the
DSI byte clock frequency with display enabled.

Change-Id: I8ef0331cbb466b399cd12199b4d335ed44997dbc
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-09-05 14:54:20 +05:30
Vijayavardhan Vennapusa
6494e9ee09 USB: pd: Notify selfpowered state based on type C current
It is required to notify device as selfpowered and bmaxpower as zero
even for non PD capable devices based on Type C current. Hence notify
as selfpowerer in bMattributes of configuation descriptor in case of
medium or high Type C current.

Change-Id: Ie552560d93a8195f4c69fdaf6086ef3a52b31d39
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2018-09-05 14:46:32 +05:30
Arunk Khandavalli
7397f84515 nl80211: nl80211_update_ft_ies to validate NL80211_ATTR_IE
Current nl80211_update_ft_ies doesn't validate NL80211_ATTR_IE
before dereferencing it, which leads to a null pointer exception
if not passed.
This commit validates this attribute too.

Change-Id: Ia40b02fc218bc26a07bc6b2153f425b8cae3bd82
CRs-Fixed: 2261685
Signed-off-by: Arunk Khandavalli <akhandav@codeaurora.org>
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
2018-09-05 12:42:02 +05:30
Linux Build Service Account
93e700b2d2 Merge "net: Include additional rmnet header in flow_dissector" 2018-09-04 21:18:57 -07:00
Chaoli Zhou
bfd8e4b850 cnss: comment cnss_msm_pcie_pm_control at GreenHills platform
It doesn't support virtualized clock currently,
so we cannot disable/enable clock while do PCIE link
suspend/resume from Linux side at Greenhills platform,
so comment the API cnss_msm_pcie_pm_control to prevent
doing PCIE link suspend/resume.

Change-Id: Ie10d781042ff3e85b3206fd300e9ec3f71897479
Signed-off-by: Chaoli Zhou <zchaoli@codeaurora.org>
2018-09-05 10:22:25 +08:00
Gustavo Solaira
941d2a76bf net: Include additional rmnet header in flow_dissector
Add an additional header in flow_dissector since it
provides some structs that are needed for it.

Change-Id: I654ce9838f704c71b5c5015ef30d88a01a528f0b
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2018-09-04 18:35:04 -07:00
Gustavo Solaira
7689015a2d diag: Only include MHI headers if it is enabled
Only include the MHI header file if CONFIG_MSM_MHI
is enabled, avoid compilation errors if the platform
does not support MHI.

Change-Id: Ic2d84a8bbd066d0d8e50711a7499ae9a959a0b71
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2018-09-04 18:35:00 -07:00
Linux Build Service Account
c1291c57d1 Merge "asoc : msm: Fix zero size pointer issue" 2018-09-04 11:41:12 -07:00
Linux Build Service Account
105b2da4bc Merge "net: hns: Fix a skb used after free bug" 2018-09-04 11:41:10 -07:00
Soumya Managoli
5206b51937 asoc : msm: Fix zero size pointer issue
APPS crashes randomly due to invalid memory allocation
in q6asm_audio_client_buf_free_contiguous.
Added check to return error if memory allocation size is 0.

Change-Id: I40f49aa147d513b29b56224a5ee77ccbb2dcc110
CRs-Fixed: 2285272
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2018-09-04 04:53:26 -07:00
Yunsheng Lin
e89a59dca1 net: hns: Fix a skb used after free bug
skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK,
which cause hns_nic_net_xmit to use a freed skb.

BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940...
	[17659.112635]      alloc_debug_processing+0x18c/0x1a0
	[17659.117208]      __slab_alloc+0x52c/0x560
	[17659.120909]      kmem_cache_alloc_node+0xac/0x2c0
	[17659.125309]      __alloc_skb+0x6c/0x260
	[17659.128837]      tcp_send_ack+0x8c/0x280
	[17659.132449]      __tcp_ack_snd_check+0x9c/0xf0
	[17659.136587]      tcp_rcv_established+0x5a4/0xa70
	[17659.140899]      tcp_v4_do_rcv+0x27c/0x620
	[17659.144687]      tcp_prequeue_process+0x108/0x170
	[17659.149085]      tcp_recvmsg+0x940/0x1020
	[17659.152787]      inet_recvmsg+0x124/0x180
	[17659.156488]      sock_recvmsg+0x64/0x80
	[17659.160012]      SyS_recvfrom+0xd8/0x180
	[17659.163626]      __sys_trace_return+0x0/0x4
	[17659.167506] INFO: Freed in kfree_skbmem+0xa0/0xb0 age=23 cpu=1 pid=13
	[17659.174000]      free_debug_processing+0x1d4/0x2c0
	[17659.178486]      __slab_free+0x240/0x390
	[17659.182100]      kmem_cache_free+0x24c/0x270
	[17659.186062]      kfree_skbmem+0xa0/0xb0
	[17659.189587]      __kfree_skb+0x28/0x40
	[17659.193025]      napi_gro_receive+0x168/0x1c0
	[17659.197074]      hns_nic_rx_up_pro+0x58/0x90
	[17659.201038]      hns_nic_rx_poll_one+0x518/0xbc0
	[17659.205352]      hns_nic_common_poll+0x94/0x140
	[17659.209576]      net_rx_action+0x458/0x5e0
	[17659.213363]      __do_softirq+0x1b8/0x480
	[17659.217062]      run_ksoftirqd+0x64/0x80
	[17659.220679]      smpboot_thread_fn+0x224/0x310
	[17659.224821]      kthread+0x150/0x170
	[17659.228084]      ret_from_fork+0x10/0x40

	BUG: KASAN: use-after-free in hns_nic_net_xmit+0x8c/0xc0...
	[17751.080490]      __slab_alloc+0x52c/0x560
	[17751.084188]      kmem_cache_alloc+0x244/0x280
	[17751.088238]      __build_skb+0x40/0x150
	[17751.091764]      build_skb+0x28/0x100
	[17751.095115]      __alloc_rx_skb+0x94/0x150
	[17751.098900]      __napi_alloc_skb+0x34/0x90
	[17751.102776]      hns_nic_rx_poll_one+0x180/0xbc0
	[17751.107097]      hns_nic_common_poll+0x94/0x140
	[17751.111333]      net_rx_action+0x458/0x5e0
	[17751.115123]      __do_softirq+0x1b8/0x480
	[17751.118823]      run_ksoftirqd+0x64/0x80
	[17751.122437]      smpboot_thread_fn+0x224/0x310
	[17751.126575]      kthread+0x150/0x170
	[17751.129838]      ret_from_fork+0x10/0x40
	[17751.133454] INFO: Freed in kfree_skbmem+0xa0/0xb0 age=19 cpu=7 pid=43
	[17751.139951]      free_debug_processing+0x1d4/0x2c0
	[17751.144436]      __slab_free+0x240/0x390
	[17751.148051]      kmem_cache_free+0x24c/0x270
	[17751.152014]      kfree_skbmem+0xa0/0xb0
	[17751.155543]      __kfree_skb+0x28/0x40
	[17751.159022]      napi_gro_receive+0x168/0x1c0
	[17751.163074]      hns_nic_rx_up_pro+0x58/0x90
	[17751.167041]      hns_nic_rx_poll_one+0x518/0xbc0
	[17751.171358]      hns_nic_common_poll+0x94/0x140
	[17751.175585]      net_rx_action+0x458/0x5e0
	[17751.179373]      __do_softirq+0x1b8/0x480
	[17751.183076]      run_ksoftirqd+0x64/0x80
	[17751.186691]      smpboot_thread_fn+0x224/0x310
	[17751.190826]      kthread+0x150/0x170
	[17751.194093]      ret_from_fork+0x10/0x40

Change-Id: I5fbdea5d0264c79dbcc91f8519cda1004b667866
Fixes: 13ac695e7ea1 ("net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: lipeng <lipeng321@huawei.com>
Reported-by: Jun He <hjat2005@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
Signed-off-by: Dennis Cagle <dcagle@codeaurora.org>
Acked-By: Chinmay Agarwal <chinagar@qti.qualcomm.com>
[ tejaswit@codeaurora.org : resolved minor conflicts ]
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
2018-09-04 04:34:27 -07:00
Akhil P Oommen
3e17d59abf msm: kgsl: Replace scm call api with its atomic version
scm_call2() API can block indefinitely if another client is using
this API. This is due to a mutex in this API to serialize calls to
the TZ. This blocks the GPU wake up which in turn can result in
kgsl fence timeouts. Since CPZ register programing is handled at
the hypervisor, we can safely avoid this serialization by using
scm_call2_atomic() API which doesn't block.

Change-Id: I48ba3e1a682e1027463a1c6b067e6cfcb4a0e8bc
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
2018-09-03 17:01:30 +05:30
Ch Ganesh Kumar
6bd5371814 msm: mdss: Fix Gamma LUT bounds condition
Validate the Gamma correction feature with all bound condition.
This change corrects the Gamma LUT block bound condition.

Change-Id: I3fc460b6a6e2e76f7c07b649e1db1e01ce208476
Signed-off-by: Ch Ganesh Kumar <chganesh@codeaurora.org>
2018-09-03 03:20:44 -07:00
Linux Build Service Account
f09b84f8ea Merge "ARM: dts: msm: Add 8GB DDR device tree for msm8996 ivi vplatform" 2018-09-02 18:27:50 -07:00
Linux Build Service Account
7649a71688 Merge "drm: Pass CRTC ID in userspace vblank events" 2018-09-01 16:12:40 -07:00
Linux Build Service Account
f99b0c3811 Merge "cnss: Use the nosync API in cnss when disabling irq" 2018-09-01 16:12:37 -07:00
Linux Build Service Account
e92cb77945 Merge "diag: Add protection before accessing md_session_map" 2018-09-01 16:12:33 -07:00
Linux Build Service Account
f93ed45f07 Merge "drm: msm: sde: Fix SMMU fault during DRM test" 2018-08-31 21:18:38 -07:00
Linux Build Service Account
4036bbe404 Merge "Merge android-4.4.150 (5541782) into msm-4.4" 2018-08-31 12:34:13 -07:00