Hello. I am reporting an atomic instructions usage
which seem be racy at fs/ocfs2/cluster/heartbeat.c in Linux 2.6.35.
I am reporting this issue while I read the recent code.
Since I do not have much background, I am not certain whether it is
correct or not.
But I hope this report is helpful. Please examine the code.
In o2hb_heartbeat_group_drop_item(), there are following codes:
1626 if (atomic_read(®->hr_steady_iterations) != 0) {
1627 atomic_set(®->hr_steady_iterations, 0);
It first checks ®->hr_steady_iterations and then updates its value.
In the case where other threads manipulate the same
®->hr_steady_iterations concurrently,
race condition might be possible.
I think it would be better to guarantee consecutive executions of
read and write by special purposed atomic operations (e.g. atomic_xchg)
Please examine the issue and let me know your opinion. Thank you.
Sincerely
Shin Hong
_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel