]> git.baikalelectronics.ru Git - kernel.git/commit
staging/rdma/hfi1: Fix downgrade race
authorDean Luick <dean.luick@intel.com>
Tue, 17 Nov 2015 02:59:24 +0000 (21:59 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 21:45:29 +0000 (13:45 -0800)
commitb423ff7477f511520f0a325e7b589f3935ba850a
tree8df60db3ada9a414ec21b3315679332438195cc8
parenta8a9e043a78d5bed1c2ff7c910b66b859773a502
staging/rdma/hfi1: Fix downgrade race

A link downgrade can race with link up. Avoid the race
in two ways. First, by having the downgrade application logic
take the link state mutex for all of its checking. Second, by
waiting for the link to move out of the going up state.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/chip.c