On Thu, Sep 5, 2013 at 4:56 PM, Al Viro wrote:
> I'd probably just do this, and to hell with helper functions...
>
> int d_set_mounted(struct dentry *dentry)
> {
> struct dentry *p;
> int ret = 0;
> write_seqlock(&rename_lock);
> for (p = dentry; !IS_ROOT(p); p = p-
On Thu, Sep 05, 2013 at 05:52:51PM +0200, Miklos Szeredi wrote:
> On Thu, Sep 5, 2013 at 4:56 PM, Al Viro wrote:
> > I'd probably just do this, and to hell with helper functions...
> >
> > int d_set_mounted(struct dentry *dentry)
> > {
> > struct dentry *p;
> > int ret = 0;
> >
I'd probably just do this, and to hell with helper functions...
int d_set_mounted(struct dentry *dentry)
{
struct dentry *p;
int ret = 0;
write_seqlock(&rename_lock);
for (p = dentry; !IS_ROOT(p); p = p->d_parent) {
/* Need exclusion wrt. check_submo
On Thu, Sep 05, 2013 at 02:23:25PM +0100, Al Viro wrote:
> On Thu, Sep 05, 2013 at 02:39:11PM +0200, Miklos Szeredi wrote:
> > +static bool __has_unlinked_ancestor(struct dentry *dentry)
> > +{
> > + struct dentry *this;
> > +
> > + for (this = dentry; !IS_ROOT(this); this = this->d_parent) {
>
On Thu, Sep 05, 2013 at 02:39:11PM +0200, Miklos Szeredi wrote:
> +static bool __has_unlinked_ancestor(struct dentry *dentry)
> +{
> + struct dentry *this;
> +
> + for (this = dentry; !IS_ROOT(this); this = this->d_parent) {
> + int is_unhashed;
> +
> + /* Need exclu
This one actually has a slight chance of working.
Thanks,
Miklos
---
Subject: vfs: check unlinked ancestors before mount
From: Miklos Szeredi
We check submounts before doing d_drop() on a non-empty directory dentry in
NFS (have_submounts()), but we do not exclude a racing mount. Nor do we
prev
On Thu, Sep 5, 2013 at 2:02 PM, Miklos Szeredi wrote:
> On Thu, Sep 05, 2013 at 01:32:10PM +0200, Miklos Szeredi wrote:
>> On Thu, Sep 5, 2013 at 1:18 PM, Al Viro wrote:
>
>> > Something's really odd with locking here. You are take d_lock, do one
>> > check, set flag, drop d_lock, grab rename_lo
On Thu, Sep 05, 2013 at 01:32:10PM +0200, Miklos Szeredi wrote:
> On Thu, Sep 5, 2013 at 1:18 PM, Al Viro wrote:
> > Something's really odd with locking here. You are take d_lock, do one
> > check, set flag, drop d_lock, grab rename_lock, do another check (taking
> > and dropping d_lock in proce
On Thu, Sep 5, 2013 at 1:18 PM, Al Viro wrote:
> On Thu, Sep 05, 2013 at 11:44:37AM +0200, Miklos Szeredi wrote:
>> +static bool __has_unlinked_ancestor(struct dentry *dentry)
>> +{
>> + struct dentry *this;
>> +
>> + for (this = dentry; !IS_ROOT(this); this = this->d_parent) {
>> +
On Thu, Sep 05, 2013 at 11:44:37AM +0200, Miklos Szeredi wrote:
> +static bool __has_unlinked_ancestor(struct dentry *dentry)
> +{
> + struct dentry *this;
> +
> + for (this = dentry; !IS_ROOT(this); this = this->d_parent) {
> + int is_unhashed;
> +
> + /* Need exclu
From: Miklos Szeredi
We check submounts before doing d_drop() on a non-empty directory dentry in
NFS (have_submounts()), but we do not exclude a racing mount. Nor do we
prevent mounts to be added to the disconnected subtree using relative paths
after the d_drop().
This patch fixes these issues
11 matches
Mail list logo