linux-stable/drivers/remoteproc
Alex Elder 6442df4940 remoteproc: Fix IDR initialisation in rproc_alloc()
If ida_simple_get() returns an error when called in rproc_alloc(),
put_device() is called to clean things up.  By this time the rproc
device type has been assigned, with rproc_type_release() as the
release function.

The first thing rproc_type_release() does is call:
    idr_destroy(&rproc->notifyids);

But at the time the ida_simple_get() call is made, the notifyids
field in the remoteproc structure has not been initialized.

I'm not actually sure this case causes an observable problem, but
it's incorrect.  Fix this by initializing the notifyids field before
calling ida_simple_get() in rproc_alloc().

Fixes: b5ab5e24e9 ("remoteproc: maintain a generic child device for each rproc")
Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20200415204858.2448-2-mathieu.poirier@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-04-19 22:23:00 -07:00
..
da8xx_remoteproc.c remoteproc: Remove dev_err() usage after platform_get_irq() 2019-08-26 21:59:58 -07:00
imx_rproc.c remoteproc: Use size_t type for len in da_to_va 2020-03-25 22:29:38 -07:00
Kconfig remoteproc updates for v5.7 2020-04-02 15:42:13 -07:00
keystone_remoteproc.c remoteproc: Use size_t type for len in da_to_va 2020-03-25 22:29:38 -07:00
Makefile remoteproc: add IPA notification to q6v5 driver 2020-03-08 22:07:09 -07:00
mtk_common.h rpmsg: add rpmsg support for mt8183 SCP. 2020-01-20 10:29:56 -08:00
mtk_scp.c remoteproc/mediatek: Use size_t type for len in scp_da_to_va 2020-03-25 22:29:42 -07:00
mtk_scp_ipi.c rpmsg: add rpmsg support for mt8183 SCP. 2020-01-20 10:29:56 -08:00
omap_remoteproc.c remoteproc/omap: Fix set_load call in omap_rproc_request_timer 2020-04-03 10:47:21 -07:00
omap_remoteproc.h remoteproc/omap: Switch to SPDX license identifiers 2020-03-25 22:29:51 -07:00
qcom_common.c remoteproc: qcom: Move glink_ssr notification after stop 2019-07-24 16:01:14 -07:00
qcom_common.h remoteproc: qcom: Introduce sysmon 2018-02-12 16:57:22 -08:00
qcom_q6v5.c remoteproc: qcom: q6v5: Add common panic handler 2020-03-25 22:29:45 -07:00
qcom_q6v5.h remoteproc: qcom: q6v5: Add common panic handler 2020-03-25 22:29:45 -07:00
qcom_q6v5_adsp.c remoteproc: qcom: Introduce panic handler for PAS and ADSP 2020-03-25 22:29:45 -07:00
qcom_q6v5_ipa_notify.c remoteproc: add IPA notification to q6v5 driver 2020-03-08 22:07:09 -07:00
qcom_q6v5_mss.c remoteproc updates for v5.7 2020-04-02 15:42:13 -07:00
qcom_q6v5_pas.c remoteproc: qcom: Introduce panic handler for PAS and ADSP 2020-03-25 22:29:45 -07:00
qcom_q6v5_wcss.c remoteproc: Use size_t type for len in da_to_va 2020-03-25 22:29:38 -07:00
qcom_sysmon.c remoteproc: qcom: Remove unneeded semicolon 2019-12-18 23:13:29 -08:00
qcom_wcnss.c remoteproc: Use size_t type for len in da_to_va 2020-03-25 22:29:38 -07:00
qcom_wcnss.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qcom_wcnss_iris.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
remoteproc_core.c remoteproc: Fix IDR initialisation in rproc_alloc() 2020-04-19 22:23:00 -07:00
remoteproc_debugfs.c remoteproc: convert to DEFINE_SHOW_ATTRIBUTE 2020-04-16 15:56:17 -07:00
remoteproc_elf_helpers.h remoteproc: Add elf helpers to access elf64 and elf32 fields 2020-03-25 22:29:39 -07:00
remoteproc_elf_loader.c remoteproc: Adapt coredump to generate correct elf type 2020-03-25 22:29:41 -07:00
remoteproc_internal.h remoteproc: Add elf64 support in elf loader 2020-03-25 22:29:40 -07:00
remoteproc_sysfs.c remoteproc: Add a sysfs interface for name 2019-08-26 14:50:16 -07:00
remoteproc_virtio.c remoteproc: Fix NULL pointer dereference in rproc_virtio_notify 2020-03-25 22:29:44 -07:00
st_remoteproc.c remoteproc: Rename rproc_elf_sanity_check for elf32 2020-03-25 22:29:40 -07:00
st_slim_rproc.c remoteproc: Rename rproc_elf_sanity_check for elf32 2020-03-25 22:29:40 -07:00
stm32_rproc.c remoteproc: stm32: demote warning about optional property absence 2020-03-25 22:29:42 -07:00
wkup_m3_rproc.c remoteproc: Use size_t type for len in da_to_va 2020-03-25 22:29:38 -07:00