Thread (4 messages) 4 messages, 4 authors, 2016-08-15
STALE3602d

[PATCH] nvme: Prevent controller state invalid transition

From: Steve Wise <hidden>
Date: 2016-08-15 15:17:25

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 at linux.vnet.ibm.com>
Looks correct.

Reviewed-by: Steve Wise <swise at opengridcomputing.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help