On 03/20/2013 11:39 PM, Wenchao Xia wrote: > This patch use lock 'lifecycle_mutex' to protect gloable shared > data in lifecycle_thread(). This lock exist in Activate/Deactivate > Enable/Disable method, which is meant to protect the gloable
s/gloable/global > shared data, but forgot to be added in new libvirt based CSI > thread. > This patch can avoid following risk at least: Original code have > a small chance to free thread->args in child thread just after main > thread malloc it, for that thread->id is set to zero allowing main > thread to enter that code. > This patch focus on adding missing lock, the CSI can be still > improved as: smaller lock, folder lock into a structure with data > to tip better what it is doing. > > Signed-off-by: Wenchao Xia <[email protected]> > --- > src/Virt_ComputerSystemIndication.c | 39 ++++++++++++++++++++++++++++++++-- > 1 files changed, 36 insertions(+), 3 deletions(-) > ACK John _______________________________________________ Libvirt-cim mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvirt-cim
