]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
RDMA/mana_ib: Ignore optional access flags for MRs
authorKonstantin Taranov <kotaranov@microsoft.com>
Wed, 5 Jun 2024 08:16:08 +0000 (01:16 -0700)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Fri, 2 Aug 2024 14:27:19 +0000 (16:27 +0200)
BugLink: https://bugs.launchpad.net/bugs/2075154
[ Upstream commit 82a5cc783d49b86afd2f60e297ecd85223c39f88 ]

Ignore optional ib_access_flags when an MR is created.

Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://lore.kernel.org/r/1717575368-14879-1-git-send-email-kotaranov@linux.microsoft.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/infiniband/hw/mana/mr.c

index b70b13484f0974d19bf41ca4e0d1f6872e7756d1..13a49d8fd49d540c0d12e3caf2f1b8c437a285b2 100644 (file)
@@ -112,6 +112,7 @@ struct ib_mr *mana_ib_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 length,
                  "start 0x%llx, iova 0x%llx length 0x%llx access_flags 0x%x",
                  start, iova, length, access_flags);
 
+       access_flags &= ~IB_ACCESS_OPTIONAL;
        if (access_flags & ~VALID_MR_FLAGS)
                return ERR_PTR(-EINVAL);