Re: inode_unused list corruption in 2.4.26 - spin_lock problem?

From: Chris Caputo (ccaputo_at_alt.net)
Date: 06/25/04

  • Next message: Lionel Bouton: "Re: Elastic Quota File System (EQFS)"
    Date:	Fri, 25 Jun 2004 00:47:39 -0700 (PDT)
    To: Trond Myklebust <trond.myklebust@fys.uio.no>
    
    

    On Wed, 23 Jun 2004, Chris Caputo wrote:
    > On Mon, 21 Jun 2004, Trond Myklebust wrote:
    > > På su , 20/06/2004 klokka 20:45, skreiv Marcelo Tosatti:
    > > > Lets see if I get this right, while we drop the lock in iput to call
    > > > write_inode_now() an iget happens, possibly from write_inode_now itself
    > > > (sync_one->__iget) causing the inode->i_list to be added to to inode_in_use.
    > > > But then the call returns, locks inode_lock, decreases inodes_stat.nr_unused--
    > > > and deletes the inode from the inode_in_use and adds to inode_unused.
    > > >
    > > > AFAICS its an inode with i_count==1 in the unused list, which does not
    > > > mean "list corruption", right? Am I missing something here?
    > >
    > > Yes. Please don't forget that the inode is still hashed and is not yet
    > > marked as FREEING: find_inode() can grab it on behalf of some other
    > > process as soon as we drop that spinlock inside iput(). Then we have the
    > > calls to clear_inode() + destroy_inode() just a few lines further down.
    > > ;-)
    > >
    > > If the above scenario ever does occur, it will cause random Oopses for
    > > third party processes. Since we do not see this too often, my guess is
    > > that the write_inode_now() path must be very rarely (or never?) called.
    > >
    > > > If you are indeed right all 2.4.x versions contain this bug.
    > >
    > > ...and all 2.6.x versions...
    > >
    > > I'm not saying this is the same problem that Chris is seeing, but I am
    > > failing to see how iput() is safe as it stands right now. Please
    > > enlighten me if I'm missing something.
    >
    > I think this is a different (albeit apparently valid) problem. In my case
    > MS_ACTIVE (in iput() below) will be set since I am not unmounting a volume
    > and so I believe iput() will return immediately after adding the inode to
    > the unused list.
    >
    > That said, I have added your patch to my test setup in case it helps.

    I was able to duplicate the problem I am seeing even with Trond's patch
    applied. So the patch potentially solves a different problem but not the
    one I am seeing.

    Chris

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Lionel Bouton: "Re: Elastic Quota File System (EQFS)"

    Relevant Pages

    • Re: [BUG]Missing i_sb NULL pointer check in destroy_inode()
      ... > calling iput(). ... There is a little typo in your patch. ... void iput(struct inode *inode) ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Linux 2.6.16.14
      ... route for getting bug fixes and security fixes to users, ... devel cycle helping distro folks get more regular drops from upstream. ... This particular patch applies all the way back to the beginning of git ... amazed that Chris & Greg manage to update so often. ...
      (Linux-Kernel)
    • Re: Possible dcache BUG
      ... > Linus, Andrew, should I apply this patch too at the next remake? ... - there really is a prefetch bug (or possibly, ... but I'm wondering whether Chris and wli might ...
      (Linux-Kernel)
    • Re: RFC: PCI quirks update for 2.6.16
      ... If you can't depend on the stable tree being a real ... The problem is that the fix for Chris' issue went into the -stable ... The fix in 2.6.19 was considered suboptimal, and Alan's patch for fixing ...
      (Linux-Kernel)
    • Re: patch- legitimate?
      ... Install ALL Critical Updates IMMEDIATELY. ... An easier way to read newsgroup messages: ... "CHRIS" wrote in message ... Is this patch legit. ...
      (microsoft.public.security.virus)