diff options
author | Li Zhijian <[email protected]> | 2021-12-28 09:44:06 +0800 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2022-01-04 10:29:34 -0400 |
commit | 8ff5f5d9d8cfce6a1e368a6daa7123be133a6c35 (patch) | |
tree | 7393e9589e14b2601094969804e503574860ab7b /net/lapb/lapb_timer.c | |
parent | c9e6606c7fe92b50a02ce51dda82586ebdf99b48 (diff) |
RDMA/rxe: Prevent double freeing rxe_map_set()
The same rxe_map_set could be freed twice:
rxe_reg_user_mr()
-> rxe_mr_init_user()
-> rxe_mr_free_map_set() # 1st
-> rxe_drop_ref()
...
-> rxe_mr_cleanup()
-> rxe_mr_free_map_set() # 2nd
Follow normal convection and put resource cleanup either in the error
unwind of the allocator, or the overall free function. Leave the object
unchanged with a NULL cur_map_set on failure and remove the unncessary
free in rxe_mr_init_user().
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Li Zhijian <[email protected]>
Acked-by: Zhu Yanjun <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions