Possible Bug in gnet_start_copy_compat for the file,gen_stats.c
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · nick
Greets to Everyone,
I am wondering after running sparse on the latest mainline tree why we are not unlocking the spinlock_bh,lock when calling the function,gnet_stats_start_copy_compatat the end of this function's body. Unless someone can explain to me why there is a very good reason for not unlocking the spinlock_bh,lock at the end of this function I will send in a patch fixing this. I am assuming this is a bug due to us infinitely looping in thespinlock_bhand deadlocking unless we exit this lock external to the call to the function,gnet_start_copy_compat.
The last time I looked at this, there is some place calling unlock, you need to find it out. I don't think anyone touched it ever since that time.
Let me know if you still can't find it. And yes, that code is kinda messy, I _do_ have a patch to clean it up (not sent out yet).
David Miller
maintainerFrom: nick <[email protected]>
Date: Thu, 12 Feb 2015 21:33:16 -0500
Quoted 9 lines
I am wondering after running sparse on the latest mainline tree why we are not unlocking the spinlock_bh,lock when calling the function,
gnet_stats_start_copy_compatat the end of this function's body. Unless someone can explain to me why there is a very good reason for not unlocking the spinlock_bh,lock at the end of this function I will send in a patch fixing this. I am assuming this is a bug due to us infinitely looping in thespinlock_bhand deadlocking unless we exit this lock external to the call to the function,gnet_start_copy_compat.
This function is used to start a dump, and the caller needs the lock to be held during the dump operation.
The lock is released by the caller by invoking gnet_stats_finish_copy().