milos-linux/drivers/infiniband/core
Jason Gunthorpe badad6fad6 RDMA: During rereg_mr ensure that REREG_ACCESS is compatible
If IB_MR_REREG_ACCESS changes from RO to RW then the umem has to be
re-evaluated to ensure it is properly pinned as RW. Since the umem is
hidden inside each driver's mr struct add a ib_umem_check_rereg() function
that each driver has to call before processing IB_MR_REREG_ACCESS.

mlx4 has to retain its duplicate ib_access_writable check because it
implements IB_MR_REREG_ACCESS | IB_MR_REREG_TRANS by changing both items
in place sequentially while the MR is live, so it will continue to not
support this combination.

Cc: stable@vger.kernel.org
Fixes: b40656aa7d ("RDMA/umem: remove FOLL_FORCE usage")
Link: https://patch.msgid.link/r/0-v1-06fb1a2d6cf5+107-rereg_access_jgg@nvidia.com
Reported-by: Philip Tsukerman <philiptsukerman@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2026-06-08 13:39:20 -03:00
..
addr.c IB/core: Fix IPv6 netlink message size in ib_nl_ip_send_msg() 2026-04-29 16:37:12 -03:00
agent.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
agent.h
cache.c RDMA/core: Fix memory free for GID table 2026-04-07 11:42:34 -03:00
cgroup.c
cm.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
cm_msgs.h
cm_trace.c
cm_trace.h IB/cm: Remove dead code and adjust naming 2025-05-25 06:24:21 -04:00
cma.c RDMA/core: Check id_priv->restricted_node_type in cma_listen_on_dev() 2026-02-25 07:50:10 -05:00
cma_configfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cma_priv.h RDMA/core: introduce rdma_restrict_node_type() 2026-02-08 17:12:58 -06:00
cma_trace.c
cma_trace.h IB/cm: Remove dead code and adjust naming 2025-05-25 06:24:21 -04:00
core_priv.h RDMA/core: Fix stale RoCE GIDs during netdev events at registration 2026-02-24 03:43:16 -05:00
counters.c RDMA/counter: Check CAP_NET_RAW check in user namespace for RDMA counters 2025-07-02 05:11:44 -04:00
cq.c RDMA/core: Reject zero CQE count 2026-02-25 08:15:30 -05:00
device.c RDMA v7.1 merge window 2026-04-20 11:20:35 -07:00
frmr_pools.c RDMA/core: Add netlink command to modify FRMR aging 2026-03-02 13:45:37 -05:00
frmr_pools.h RDMA/core: Add netlink command to modify FRMR aging 2026-03-02 13:45:37 -05:00
ib_core_uverbs.c RDMA/core: Do not read wild stack memory in uverbs_get_handler_fn() 2026-05-19 19:32:48 -03:00
iter.c RDMA/umem: Fix truncation for block sizes >= 4G 2026-06-03 09:37:34 -03:00
iwcm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
iwcm.h RDMA/iwcm: Fix workqueue list corruption by removing work_list 2026-01-15 04:59:53 -05:00
iwpm_msg.c RDMA/core: Prefer NLA_NUL_STRING 2026-04-09 10:58:56 -03:00
iwpm_util.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
iwpm_util.h
lag.c
mad.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mad_priv.h IB/mad: Add flow control for solicited MADs 2025-07-09 02:51:30 -04:00
mad_rmpp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mad_rmpp.h
Makefile IB/core: Introduce FRMR pools 2026-03-02 13:44:58 -05:00
mr_pool.c
multicast.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
netlink.c
nldev.c RDMA/nldev: Add mutual exclusion in nldev_dellink() 2026-05-13 14:17:16 -04:00
opa_smi.h
packer.c
rdma_core.c RDMA/uverbs: Update outdated reference to remove_commit_idr_uobject() 2026-03-30 13:47:44 -04:00
rdma_core.h RDMA: Add ib_copy_validate_udata_in() 2026-03-08 06:20:25 -04:00
restrack.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
restrack.h
roce_gid_mgmt.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
rw.c RDMA/rw: Fix MR pool exhaustion in bvec RDMA READ path 2026-03-17 15:00:56 -04:00
sa.h
sa_query.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
security.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
smi.c
smi.h
sysfs.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
trace.c
ucaps.c RDMA/core: Validate the passed in fops for ib_get_ucaps() 2026-06-01 21:19:11 -03:00
ucma.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ud_header.c RDMA/core: Remove unused ib_ud_header_unpack 2024-12-24 05:00:42 -05:00
umem.c RDMA: During rereg_mr ensure that REREG_ACCESS is compatible 2026-06-08 13:39:20 -03:00
umem_dmabuf.c RDMA v7.1 merge window 2026-04-20 11:20:35 -07:00
umem_odp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
user_mad.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
uverbs.h RDMA/core: Do not read wild stack memory in uverbs_get_handler_fn() 2026-05-19 19:32:48 -03:00
uverbs_cmd.c RDMA/core: Fix rereg_mr use-after-free race 2026-04-29 16:37:12 -03:00
uverbs_ioctl.c RDMA/core: Do not read wild stack memory in uverbs_get_handler_fn() 2026-05-19 19:32:48 -03:00
uverbs_main.c mm: rename zap_vma_ptes() to zap_special_vma_range() 2026-04-05 13:53:15 -07:00
uverbs_marshall.c RDMA/core: Remove unused ib_copy_path_rec_from_user 2024-12-24 05:00:42 -05:00
uverbs_std_types.c
uverbs_std_types_async_fd.c
uverbs_std_types_counters.c
uverbs_std_types_cq.c RDMA/core: Fix user CQ creation for drivers without create_cq 2026-04-17 12:16:00 -03:00
uverbs_std_types_device.c RDMA: Add IB_UVERBS_CORE_SUPPORT_ROBUST_UDATA 2026-03-08 06:20:25 -04:00
uverbs_std_types_dm.c
uverbs_std_types_dmabuf.c drm-misc-next for v7.1: 2026-03-02 16:58:07 +10:00
uverbs_std_types_dmah.c RDMA/core: Validate cpu_id against nr_cpu_ids in DMAH alloc 2026-06-03 14:55:48 -03:00
uverbs_std_types_flow_action.c
uverbs_std_types_mr.c IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
uverbs_std_types_qp.c RDMA/uverbs: Check CAP_NET_RAW in user namespace for RAW QP create 2025-07-01 05:21:44 -04:00
uverbs_std_types_srq.c
uverbs_std_types_wq.c
uverbs_uapi.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
verbs.c RDMA/core: Remove unused ib_resize_cq() implementation 2026-03-30 13:47:43 -04:00