diff options
author | Brett Creeley <brett.creeley@amd.com> | 2025-04-21 10:46:05 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-04-23 18:50:17 -0700 |
commit | f9559d818205a4a0b9cd87181ef46e101ea11157 (patch) | |
tree | d2b9b8100b7ecf0643070f988febdf8c5ffacfbb /rust/helpers/workqueue.c | |
parent | 2567daad69cd1107fc0ec29b1615f110d7cf7385 (diff) | |
download | linux-stable-f9559d818205a4a0b9cd87181ef46e101ea11157.tar.gz linux-stable-f9559d818205a4a0b9cd87181ef46e101ea11157.tar.bz2 linux-stable-f9559d818205a4a0b9cd87181ef46e101ea11157.zip |
pds_core: Remove unnecessary check in pds_client_adminq_cmd()
When the pds_core driver was first created there were some race
conditions around using the adminq, especially for client drivers.
To reduce the possibility of a race condition there's a check
against pf->state in pds_client_adminq_cmd(). This is problematic
for a couple of reasons:
1. The PDSC_S_INITING_DRIVER bit is set during probe, but not
cleared until after everything in probe is complete, which
includes creating the auxiliary devices. For pds_fwctl this
means it can't make any adminq commands until after pds_core's
probe is complete even though the adminq is fully up by the
time pds_fwctl's auxiliary device is created.
2. The race conditions around using the adminq have been fixed
and this path is already protected against client drivers
calling pds_client_adminq_cmd() if the adminq isn't ready,
i.e. see pdsc_adminq_post() -> pdsc_adminq_inc_if_up().
Fix this by removing the pf->state check in pds_client_adminq_cmd()
because invalid accesses to pds_core's adminq is already handled by
pdsc_adminq_post()->pdsc_adminq_inc_if_up().
Fixes: 10659034c622 ("pds_core: add the aux client API")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250421174606.3892-4-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions