Commit 290c4a9
RDMA/rxe: Fix "Replace mr by rkey in responder resources"
The referenced commit generates a reference counting error if the rkey has
the same index but the wrong key. In this case the reference taken by
rxe_pool_get_index() is not dropped.
Drop the reference if the keys don't match in rxe_recheck_mr(). Check
that the mw and mr are still valid.
Fixes: 8a1a0be ("RDMA/rxe: Replace mr by rkey in responder resources")
Link: https://lore.kernel.org/r/20220411030647.20011-1-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>1 parent ce522ba commit 290c4a9
1 file changed
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
683 | 688 | | |
684 | 689 | | |
685 | 690 | | |
| |||
690 | 695 | | |
691 | 696 | | |
692 | 697 | | |
693 | | - | |
| 698 | + | |
694 | 699 | | |
695 | 700 | | |
696 | | - | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
697 | 704 | | |
698 | 705 | | |
699 | 706 | | |
700 | 707 | | |
701 | | - | |
| 708 | + | |
702 | 709 | | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
| 710 | + | |
| 711 | + | |
707 | 712 | | |
708 | 713 | | |
709 | | - | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
710 | 719 | | |
711 | 720 | | |
712 | 721 | | |
| |||
0 commit comments