linux-stable/drivers/remoteproc
Loic Pallardy c81c0e0710 remoteproc: fix vdev reference management
Commit 2b45cef586 ("remoteproc: Further extend the vdev life cycle")
extends kref support for vdev management.
It introduces a regression when following sequence is executed:
rproc_boot --> rproc_shutdown --> rproc_boot
Second rproc_boot call crashes on register_virtio_device as device
is already existing.
Issue is previous vdev is never released when rproc is stop because
associated refcount is too high.

kref_get introduces is not needed as kref_init already initializes
krefcount to 1 because it considers associated variable as used.
This introduces a misalignment between kref_get and kref_put calls.

Fixes: 2b45cef586 ("remoteproc: Further extend the vdev life cycle")
Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-12-30 03:15:42 -08:00
..
da8xx_remoteproc.c remoteproc: Split driver and consumer dereferencing 2016-10-02 22:50:21 -07:00
Kconfig remoteproc: qcom_adsp_pil: select qcom_scm 2016-12-09 16:16:56 -08:00
Makefile remoteproc/ste: Delete unused driver 2016-12-09 16:16:54 -08:00
omap_remoteproc.c remoteproc: Split driver and consumer dereferencing 2016-10-02 22:50:21 -07:00
omap_remoteproc.h remoteproc/omap: add a remoteproc driver for OMAP4 2012-02-08 22:53:47 +02:00
qcom_adsp_pil.c remoteproc: Update last rproc_put users to rproc_free 2016-11-19 22:47:36 -08:00
qcom_mdt_loader.c remoteproc: qcom: mdt_loader: add include for sizes 2016-12-02 14:41:54 -08:00
qcom_mdt_loader.h remoteproc: qcom: Driver for the self-authenticating Hexagon v5 2016-07-13 13:38:15 -07:00
qcom_q6v5_pil.c remoteproc: qcom: q6v5_pil: Fix module autoload 2016-10-18 15:18:09 -07:00
qcom_wcnss.c remoteproc: qcom_wcnss: Fix circular module dependency 2016-11-14 21:52:19 -08:00
qcom_wcnss.h remoteproc: qcom_wcnss: Fix circular module dependency 2016-11-14 21:52:19 -08:00
qcom_wcnss_iris.c remoteproc: qcom_wcnss: Fix circular module dependency 2016-11-14 21:52:19 -08:00
remoteproc_core.c remoteproc: fix vdev reference management 2016-12-30 03:15:42 -08:00
remoteproc_debugfs.c remoteproc: debugfs: Remove state entry which is duplicated is sysfs 2016-10-31 17:24:48 -07:00
remoteproc_elf_loader.c remoteproc: align code with open parenthesis 2016-08-12 21:27:49 -07:00
remoteproc_internal.h remoteproc: Assign kref to rproc_vdev 2016-11-14 21:52:15 -08:00
remoteproc_sysfs.c remoteproc: Add a sysfs interface for firmware and state 2016-10-31 17:24:46 -07:00
remoteproc_virtio.c remoteproc: virtio: Anchor vring life cycle in vdev 2016-11-14 21:52:16 -08:00
st_remoteproc.c remoteproc: st: Fix error return code in st_rproc_probe() 2016-10-31 17:36:10 -07:00
st_slim_rproc.c remoteproc: Update last rproc_put users to rproc_free 2016-11-19 22:47:36 -08:00
wkup_m3_rproc.c remoteproc: Split driver and consumer dereferencing 2016-10-02 22:50:21 -07:00