Re: [PATCH 02/31] rdma/siw: call smp_mb() after mem->stag_valid = 0 in siw_invalidate_stag() too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----"Stefan Metzmacher" <metze@xxxxxxxxx> wrote: -----

>To: "Bernard Metzler" <bmt@xxxxxxxxxxxxxx>
>From: "Stefan Metzmacher" <metze@xxxxxxxxx>
>Date: 05/07/2021 01:37AM
>Cc: linux-rdma@xxxxxxxxxxxxxxx, "Stefan Metzmacher" <metze@xxxxxxxxx>
>Subject: [EXTERNAL] [PATCH 02/31] rdma/siw: call smp_mb() after
>mem->stag_valid = 0 in siw_invalidate_stag() too
>
>We already do the same in siw_mr_drop_mem().
>
>Fixes: 2251334dcac9 ("rdma/siw: application buffer management")
>Signed-off-by: Stefan Metzmacher <metze@xxxxxxxxx>
>Cc: Bernard Metzler <bmt@xxxxxxxxxxxxxx>
>Cc: linux-rdma@xxxxxxxxxxxxxxx
>---
> drivers/infiniband/sw/siw/siw_mem.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/drivers/infiniband/sw/siw/siw_mem.c
>b/drivers/infiniband/sw/siw/siw_mem.c
>index 61c17db70d65..8596ce1ef5a3 100644
>--- a/drivers/infiniband/sw/siw/siw_mem.c
>+++ b/drivers/infiniband/sw/siw/siw_mem.c
>@@ -309,6 +309,8 @@ int siw_invalidate_stag(struct ib_pd *pd, u32
>stag)
> 	 * state if invalidation is requested. So no state check here.
> 	 */
> 	mem->stag_valid = 0;
>+	/* make STag invalid visible asap */
>+	smp_mb();
> 
> 	siw_dbg_pd(pd, "STag 0x%08x now invalid\n", stag);
> out:
>-- 
>2.25.1
>
>
makes sense, thanks.

Reviewed-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx>





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux