diff options
-rw-r--r-- | drivers/staging/rdma/hfi1/init.c | 2 | ||||
-rw-r--r-- | drivers/staging/rdma/hfi1/pio.c | 2 | ||||
-rw-r--r-- | drivers/staging/rdma/hfi1/sdma.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/rdma/hfi1/init.c b/drivers/staging/rdma/hfi1/init.c index 371ed293677d..37b3ce8377b6 100644 --- a/drivers/staging/rdma/hfi1/init.c +++ b/drivers/staging/rdma/hfi1/init.c | |||
@@ -1324,6 +1324,8 @@ static void cleanup_device_data(struct hfi1_devdata *dd) | |||
1324 | dd->num_send_contexts = 0; | 1324 | dd->num_send_contexts = 0; |
1325 | kfree(dd->send_contexts); | 1325 | kfree(dd->send_contexts); |
1326 | dd->send_contexts = NULL; | 1326 | dd->send_contexts = NULL; |
1327 | kfree(dd->hw_to_sw); | ||
1328 | dd->hw_to_sw = NULL; | ||
1327 | kfree(dd->boardname); | 1329 | kfree(dd->boardname); |
1328 | vfree(dd->events); | 1330 | vfree(dd->events); |
1329 | vfree(dd->status); | 1331 | vfree(dd->status); |
diff --git a/drivers/staging/rdma/hfi1/pio.c b/drivers/staging/rdma/hfi1/pio.c index 859cb4601547..361b43d47c76 100644 --- a/drivers/staging/rdma/hfi1/pio.c +++ b/drivers/staging/rdma/hfi1/pio.c | |||
@@ -1881,7 +1881,7 @@ void free_pio_map(struct hfi1_devdata *dd) | |||
1881 | /* Free PIO map if allocated */ | 1881 | /* Free PIO map if allocated */ |
1882 | if (rcu_access_pointer(dd->pio_map)) { | 1882 | if (rcu_access_pointer(dd->pio_map)) { |
1883 | spin_lock_irq(&dd->pio_map_lock); | 1883 | spin_lock_irq(&dd->pio_map_lock); |
1884 | kfree(rcu_access_pointer(dd->pio_map)); | 1884 | pio_map_free(rcu_access_pointer(dd->pio_map)); |
1885 | RCU_INIT_POINTER(dd->pio_map, NULL); | 1885 | RCU_INIT_POINTER(dd->pio_map, NULL); |
1886 | spin_unlock_irq(&dd->pio_map_lock); | 1886 | spin_unlock_irq(&dd->pio_map_lock); |
1887 | synchronize_rcu(); | 1887 | synchronize_rcu(); |
diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c index e29b5d394a5f..abb8ebc1fcac 100644 --- a/drivers/staging/rdma/hfi1/sdma.c +++ b/drivers/staging/rdma/hfi1/sdma.c | |||
@@ -966,7 +966,7 @@ static void sdma_clean(struct hfi1_devdata *dd, size_t num_engines) | |||
966 | sde->tx_ring = NULL; | 966 | sde->tx_ring = NULL; |
967 | } | 967 | } |
968 | spin_lock_irq(&dd->sde_map_lock); | 968 | spin_lock_irq(&dd->sde_map_lock); |
969 | kfree(rcu_access_pointer(dd->sdma_map)); | 969 | sdma_map_free(rcu_access_pointer(dd->sdma_map)); |
970 | RCU_INIT_POINTER(dd->sdma_map, NULL); | 970 | RCU_INIT_POINTER(dd->sdma_map, NULL); |
971 | spin_unlock_irq(&dd->sde_map_lock); | 971 | spin_unlock_irq(&dd->sde_map_lock); |
972 | synchronize_rcu(); | 972 | synchronize_rcu(); |