This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Patch [2/3] Userspace probes readpage hooks
- From: Prasanna S Panchamukhi <prasanna at in dot ibm dot com>
- To: "Zhang, Yanmin" <yanmin dot zhang at intel dot com>
- Cc: systemtap at sources dot redhat dot com, "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, "Mao, Bibo" <bibo dot mao at intel dot com>
- Date: Thu, 2 Feb 2006 14:05:46 +0530
- Subject: Re: Patch [2/3] Userspace probes readpage hooks
- References: <99FA2ED298A9834DB1BF5DE8BDBF24130FD187@pdsmsx403>
- Reply-to: prasanna at in dot ibm dot com
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