Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

IB/rxe: Fix missing umem_odp->umem_mutex unlock on error path

rxe_odp_map_range_and_lock() must release umem_odp->umem_mutex when an
error occurs, including cases where rxe_check_pagefault() fails.

Fixes: 2fae67ab63db ("RDMA/rxe: Add support for Send/Recv/Write/Read with ODP")
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Link: https://patch.msgid.link/20251226094112.3042583-1-lizhijian@fujitsu.com
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>

authored by

Li Zhijian and committed by
Leon Romanovsky
3c68cf68 3d70e0fb

+3 -1
+3 -1
drivers/infiniband/sw/rxe/rxe_odp.c
··· 179 179 return err; 180 180 181 181 need_fault = rxe_check_pagefault(umem_odp, iova, length); 182 - if (need_fault) 182 + if (need_fault) { 183 + mutex_unlock(&umem_odp->umem_mutex); 183 184 return -EFAULT; 185 + } 184 186 } 185 187 186 188 return 0;