Date: Wed, 30 Mar 2016 01:08:09 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297406 - head/sys/ofed/drivers/infiniband/core Message-ID: <201603300108.u2U189ei032609@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Wed Mar 30 01:08:08 2016 New Revision: 297406 URL: https://svnweb.freebsd.org/changeset/base/297406 Log: 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 Modified: head/sys/ofed/drivers/infiniband/core/iwcm.c Modified: head/sys/ofed/drivers/infiniband/core/iwcm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/iwcm.c Wed Mar 30 00:44:10 2016 (r297405) +++ head/sys/ofed/drivers/infiniband/core/iwcm.c Wed Mar 30 01:08:08 2016 (r297406) @@ -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 * 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 * } } err: - mutex_unlock(&dequeue_mutex); kfree(work); #endif return; @@ -487,7 +484,6 @@ iw_so_upcall(struct socket *parent_so, v 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, v INIT_WORK(&work->work, iw_so_event_handler); queue_work(iwcm_wq, &work->work); - mutex_unlock(&dequeue_mutex); return SU_OK; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603300108.u2U189ei032609>