diff options
author | Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> | 2016-07-29 16:15:18 -0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-08-15 09:46:46 -0600 |
commit | f6b6a28e2dbc401416ff12f775d75281c9b41918 (patch) | |
tree | 88f3765ae063a57ee5b1180af0839f5c7be36c39 /kernel | |
parent | 694d0d0bb2030d2e36df73e2d23d5770511dbc8d (diff) | |
download | blackbird-op-linux-f6b6a28e2dbc401416ff12f775d75281c9b41918.tar.gz blackbird-op-linux-f6b6a28e2dbc401416ff12f775d75281c9b41918.zip |
nvme: Prevent controller state invalid transition
Acquiring the nvme_ctrl lock before reading ctrl->state in
nvme_change_ctrl_state() should prevent a theoretical invalid state
transition, in the event of two threads racing inside that function.
I haven't been able to observe this happening with the current code, and
the current state machine seems to be simple enough to not be
affected by these invalid transitions, but future modifications could
make it more likely to happen.
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Reviewed-by: Sagi Grimberg <sag@grimberg.me>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions