Dan Carpenter
2010-Feb-09 08:09 UTC
[Ocfs2-devel] ocfs2: bug in dlm_process_recovery_data()
I noticed a change was merged to dlm_process_recovery_data() so I thought you might want to fix this as well. fs/ocfs2/dlm/dlmrecovery.c 1788 list_for_each_entry(lock, tmpq, list) { 1789 if (lock->ml.cookie != ml->cookie) 1790 lock = NULL; We dereference lock in list_for_each_entry(). Maybe you want list_for_each_entry_safe() or something? 1791 else 1792 break; 1793 } 1794 if (lock) 1795 break; regards, dan carpenter
Sunil Mushran
2010-Feb-09 17:53 UTC
[Ocfs2-devel] ocfs2: bug in dlm_process_recovery_data()
Dan Carpenter wrote:> I noticed a change was merged to dlm_process_recovery_data() so I > thought you might want to fix this as well. > > fs/ocfs2/dlm/dlmrecovery.c > 1788 list_for_each_entry(lock, tmpq, list) { > 1789 if (lock->ml.cookie != ml->cookie) > 1790 lock = NULL; > > We dereference lock in list_for_each_entry(). Maybe you want > list_for_each_entry_safe() or something? > > 1791 else > 1792 break; > 1793 } > 1794 if (lock) > 1795 break; >Why? That's only required if we are deleting a list entry.