lkml.org 
[lkml]   [2012]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: processes hung after sys_renameat, and 'missing' processes
On Thu, Jun 07, 2012 at 12:54:04AM +0100, Al Viro wrote:

> What we need is ->i_mutex on parents. And I'm much more concerned about
> this: 7732a557b1342c6e6966efb5f07effcf99f56167 and
> 3f50fff4dace23d3cfeb195d5cd4ee813cee68b7.
>
> Dave, you seem to be able to reproduce it; could you try with those two
> commits reverted? This stuff is *definitely* wrong with the way it
> treats d_move(); there we might get it with parents not locked at all.
>
> FWIW, I'd suggest adding a check into d_move(); new parent must be
> locked in all cases and old one whenever dentry has one (i.e. isn't
> disconnected). If you can find a violation of that, you very likely
> have found the cause of that bug.

Like this ?

void d_move(struct dentry *dentry, struct dentry *target)
{
write_seqlock(&rename_lock);
+
+ BUG_ON(!spin_is_locked(&target->d_parent->d_lock));
+
+ if (dentry->d_parent != NULL)
+ BUG_ON(!spin_is_locked(&dentry->d_parent->d_lock));
+
__d_move(dentry, target);
write_sequnlock(&rename_lock);
}


To be clear, do you want me to try that with or without the reverts ?

Dave



\
 
 \ /
  Last update: 2012-06-07 03:01    [W:0.240 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site