[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1105161248490.3670@dhcp-27-109.brq.redhat.com>
Date: Mon, 16 May 2011 12:53:47 +0200 (CEST)
From: Lukas Czerner <lczerner@...hat.com>
To: Jan Kara <jack@...e.cz>
cc: Lukas Czerner <lczerner@...hat.com>,
Amir Goldstein <amir73il@...il.com>,
Ext4 Developers List <linux-ext4@...r.kernel.org>,
Theodore Tso <tytso@....edu>
Subject: Re: [PATCH] ext4: fix NULL pointer dereference in ext4_quota_off
On Mon, 16 May 2011, Jan Kara wrote:
> On Mon 16-05-11 11:49:22, Lukas Czerner wrote:
> > On Mon, 16 May 2011, Amir Goldstein wrote:
> > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> > > index fc827bb..2689351 100644
> > > --- a/fs/ext4/super.c
> > > +++ b/fs/ext4/super.c
> > > @@ -4681,6 +4681,9 @@ static int ext4_quota_off(struct super_block
> > > *sb, int type)
> > > if (test_opt(sb, DELALLOC))
> > > sync_filesystem(sb);
> > >
> > > + if (!inode)
> > > + goto out;
> >
> > Just out of curiosity, why would the quota inode be NULL ?
> Because quota is already turned off (we then release all references to
> quota file). Just what I don't understand is why in Amir's testing quota is
> not turned on before calling quota off. Because when I run the same test, I
> don't trigger the issue.
>
> Honza
>
Exactly, I did not read the quota code very deeply, but it seems to me
that when we are turning the quota off, it should be on before. So if it
is not, it might be something broken and this is not the solution (or
maybe it is and I just do not see why:)).
Thanks Honzo!
-Lukas
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists