Hi Martin,
On Mon, Apr 09, 2012 at 06:55:10PM +0200, Martin Hundebøll wrote:
Hi Antonio,
On 04/04/2012 02:42 PM, Antonio Quartulli wrote:
rcu_read_lock(); head =&entry->orig_list; hlist_for_each_entry_rcu(tmp_orig_entry, node, head, list) { if (tmp_orig_entry->orig_node == orig_node) {
found = true;
} } rcu_read_unlock();orig_entry = tmp_orig_entry; break;
- return found;
- return orig_entry; }
I'm not that well into the tt code, but shouldn't there be some reference counting when handing pointers round like this?
mh..I'd agree with you. The entry could be freed somewhere else causing something we would never imagine ;P
Actually the tt_orig_list_entry doesn't have any mechanism like that and so I forgot about taking care of this issue.
Thank you very much!
Cheers,