]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
coresight: core: Fix coresight device probe failure issue
authorMao Jinlong <quic_jinlmao@quicinc.com>
Wed, 9 Mar 2022 14:22:06 +0000 (06:22 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:25:29 +0000 (09:25 +0200)
commitccf67d81516e80fb11d3abf2025d6d7e8fcb92a4
treeef2152063e716b11dabe3d304bc0ee91e1e64c2e
parent79683b6e922ca2e62789087a969e7aef482d8e9a
coresight: core: Fix coresight device probe failure issue

BugLink: https://bugs.launchpad.net/bugs/1981864
commit 8c1d3f79d9ca48e406b78e90e94cf09a8c076bf2 upstream.

It is possibe that probe failure issue happens when the device
and its child_device's probe happens at the same time.
In coresight_make_links, has_conns_grp is true for parent, but
has_conns_grp is false for child device as has_conns_grp is set
to true in coresight_create_conns_sysfs_group. The probe of parent
device will fail at this condition. Add has_conns_grp check for
child device before make the links and make the process from
device_register to connection_create be atomic to avoid this
probe failure issue.

Cc: stable@vger.kernel.org
Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Suggested-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
Link: https://lore.kernel.org/r/20220309142206.15632-1-quic_jinlmao@quicinc.com
[ Added Cc stable ]
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/hwtracing/coresight/coresight-core.c