Patch [2/3] Userspace probes readpage hooks

Prasanna S Panchamukhi prasanna@in.ibm.com
Thu Feb 2 08:32:00 GMT 2006


Yanmin,

> >>> >>+	mutex_lock(&uprobe_mutex);
> >>> >>+
> >>> >>+	umodule = get_module_by_inode(file->f_dentry->d_inode);
> >>> >>+	if (!umodule) {
> >>> [YM] The race condition is still not resolved.
> >>
> >>Could you please elaborate the race condition?
> [YM] Scenario: There are 2 threads. The 1st is calling uprobe_readpages (from readpages path), while the 2nd one is unregistering the uprobe and uprobe_module. So before the 1st one is executing the mutex_lock, the 2nd one might already remove the uprobe_module, then, uprobe_readpages returns failure. Actually, the 1st should reexecutes the original readpages proc instead of returning failure when it couldn't find right uprobe_module.

Yes, this will be taken care in next patch release.

Thanks
Prasanna
-- 
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-51776329



More information about the Systemtap mailing list