diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/Kconfig | 1 | ||||
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index 79c8e2dd9c33..32cdfb30e9b4 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | menu "InfiniBand support" | 1 | menu "InfiniBand support" |
2 | 2 | ||
3 | config INFINIBAND | 3 | config INFINIBAND |
4 | depends on PCI || BROKEN | ||
4 | tristate "InfiniBand support" | 5 | tristate "InfiniBand support" |
5 | ---help--- | 6 | ---help--- |
6 | Core support for InfiniBand (IB). Make sure to also select | 7 | Core support for InfiniBand (IB). Make sure to also select |
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index eb99e693dec2..5f6e9ea29cd7 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -130,13 +130,14 @@ static int ib_dealloc_ucontext(struct ib_ucontext *context) | |||
130 | 130 | ||
131 | list_for_each_entry_safe(uobj, tmp, &context->mr_list, list) { | 131 | list_for_each_entry_safe(uobj, tmp, &context->mr_list, list) { |
132 | struct ib_mr *mr = idr_find(&ib_uverbs_mr_idr, uobj->id); | 132 | struct ib_mr *mr = idr_find(&ib_uverbs_mr_idr, uobj->id); |
133 | struct ib_device *mrdev = mr->device; | ||
133 | struct ib_umem_object *memobj; | 134 | struct ib_umem_object *memobj; |
134 | 135 | ||
135 | idr_remove(&ib_uverbs_mr_idr, uobj->id); | 136 | idr_remove(&ib_uverbs_mr_idr, uobj->id); |
136 | ib_dereg_mr(mr); | 137 | ib_dereg_mr(mr); |
137 | 138 | ||
138 | memobj = container_of(uobj, struct ib_umem_object, uobject); | 139 | memobj = container_of(uobj, struct ib_umem_object, uobject); |
139 | ib_umem_release_on_close(mr->device, &memobj->umem); | 140 | ib_umem_release_on_close(mrdev, &memobj->umem); |
140 | 141 | ||
141 | list_del(&uobj->list); | 142 | list_del(&uobj->list); |
142 | kfree(memobj); | 143 | kfree(memobj); |