staging/rdma/hfi1: Reduce snoop locking scope in IOCTL handler.
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Wed, 2 Dec 2015 05:43:37 +0000 (00:43 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 21:53:37 +0000 (13:53 -0800)
commit33ab349037db079aec7d60608fe4fb1114be6b91
treeca2e0f3e844a4ad0e33b0701b54534a28c618f4d
parentf1811cf632bd00947c3a2f7e538148c99d794daf
staging/rdma/hfi1: Reduce snoop locking scope in IOCTL handler.

This patch avoids issues while calling into copy from/to user while holding the
lock by only taking the lock when it is absolutely required.

The only commands which require the snoop lock are: *Set Filter *Clear Filter
*Clear Queue

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/diag.c