diff options
author | np <np@FreeBSD.org> | 2016-03-30 01:08:08 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2016-03-30 01:08:08 +0000 |
commit | 0254414aa559520f3865dca5dd97f19c5cc6a245 (patch) | |
tree | 6664009b32a80fac76cca915c5b97b47ccdeabc4 /sys/ofed/drivers/infiniband | |
parent | 8857d6b6f71c57c84a1b3588670efd909ebda3fd (diff) | |
download | FreeBSD-src-0254414aa559520f3865dca5dd97f19c5cc6a245.zip FreeBSD-src-0254414aa559520f3865dca5dd97f19c5cc6a245.tar.gz |
Remove unnecessary dequeue_mutex (added in r294610) from the iWARP
connection manager. Examining so_comp without synchronization with
iw_so_event_handler is a harmless race.
Submitted by: Krishnamraju Eraparaju @ Chelsio
Reviewed by: Steve Wise @ Open Grid Computing
Sponsored by: Chelsio Communications
Diffstat (limited to 'sys/ofed/drivers/infiniband')
-rw-r--r-- | sys/ofed/drivers/infiniband/core/iwcm.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/ofed/drivers/infiniband/core/iwcm.c b/sys/ofed/drivers/infiniband/core/iwcm.c index a90f907..7e27584 100644 --- a/sys/ofed/drivers/infiniband/core/iwcm.c +++ b/sys/ofed/drivers/infiniband/core/iwcm.c @@ -79,7 +79,6 @@ struct iwcm_listen_work { static LIST_HEAD(listen_port_list); static DEFINE_MUTEX(listen_port_mutex); -static DEFINE_MUTEX(dequeue_mutex); struct listen_port_info { struct list_head list; @@ -455,7 +454,6 @@ iw_so_event_handler(struct work_struct *_work) kfree(work); return; } - mutex_lock(&dequeue_mutex); /* Dequeue & process all new 'so' connection requests for this cmid */ while ((so = dequeue_socket(work->cm_id->so)) != NULL) { @@ -475,7 +473,6 @@ iw_so_event_handler(struct work_struct *_work) } } err: - mutex_unlock(&dequeue_mutex); kfree(work); #endif return; @@ -487,7 +484,6 @@ iw_so_upcall(struct socket *parent_so, void *arg, int waitflag) struct socket *so; struct iw_cm_id *cm_id = arg; - mutex_lock(&dequeue_mutex); /* check whether iw_so_event_handler() already dequeued this 'so' */ so = TAILQ_FIRST(&parent_so->so_comp); if (!so) @@ -500,7 +496,6 @@ iw_so_upcall(struct socket *parent_so, void *arg, int waitflag) INIT_WORK(&work->work, iw_so_event_handler); queue_work(iwcm_wq, &work->work); - mutex_unlock(&dequeue_mutex); return SU_OK; } |