Re: [PATCH] ata: libata-pmp: Fix a possible data race in sata_pmp_handle_link_fail

From: Tejun Heo
Date: Tue May 08 2018 - 10:21:01 EST


On Tue, May 08, 2018 at 04:21:40PM +0800, Jia-Ju Bai wrote:
> The write operation to "link->flags" is protected by
> the lock on line 898, but the read operation to
> this data on line 892 is not protected by the lock.
> Thus, there may exist a data race for "link->flags".
>
> To fix this data race, the read operation to "link->flags"
> should be also protected by the lock.

Same as the previous patch.

Thanks.

--
tejun