mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 23:34:40 +07:00
net/mlx5: Fix read from coherent memory
Use accessor function READ_ONCE to read from coherent memory modified
by the device and read by the driver. This becomes most important in
preemptive kernels where cond_resched implementation does not have the
side effect which guaranteed the updated value.
Fixes: 269d26f47f
("net/mlx5: Reduce command polling interval")
Change-Id: Ie6deeb565ffaf76777b07448c7fbcce3510bbb8a
Signed-off-by: Eli Cohen <eli@mellanox.com>
Reported-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
c73480910e
commit
250ae0d46d
@ -206,7 +206,7 @@ static void poll_timeout(struct mlx5_cmd_work_ent *ent)
|
||||
u8 own;
|
||||
|
||||
do {
|
||||
own = ent->lay->status_own;
|
||||
own = READ_ONCE(ent->lay->status_own);
|
||||
if (!(own & CMD_OWNER_HW)) {
|
||||
ent->ret = 0;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user