From: Gavin Shan <gws...@linux.vnet.ibm.com> Date: Thu, 29 Sep 2016 15:03:08 +1000
> This replaces the atomic access to NCSI channel's state with READ_ONCE() > and WRITE_ONCE() to avoid the above build warning. We needn't hold the > channel's lock when updating its state as well. No logical changes > introduced. I don't understand this. If it's important to take the lock for the list add/del, then it must be important to make the state change appear atomic wrt. that lock as well. Can parallel threads of control enter these functions which change the state? If so, then you need to make the state changes under the lock. In fact, you probably have to make the state tests under the locks as well. If not, please explain what prevents it from happening. Thanks.