An error occurred fetching the project authors.
  1. 23 Nov, 2007 40 commits
    • Linus Torvalds's avatar
      Import 2.2.6pre1 · 780f80d7
      Linus Torvalds authored
      780f80d7
    • Linus Torvalds's avatar
      Import 2.2.3pre2 · f3d40e81
      Linus Torvalds authored
      f3d40e81
    • Linus Torvalds's avatar
      Import 2.2.0pre8 · 3a282a06
      Linus Torvalds authored
      3a282a06
    • Linus Torvalds's avatar
      Linux 2.2.0 (pre1) (28 Dec 1998) · bc586e63
      Linus Torvalds authored
       we're in the pre-2.2.0 series now, I'm all synched up with Alan, and I
      don't have anything pending any more. Over the internet nobody can hear
      you all scream in pain over all your favourite features that didn't make
      it.
      
      	Linus "another year older and wise as hell by now" Torvalds
      bc586e63
    • Linus Torvalds's avatar
      Import 2.1.133pre3 · 9390bd47
      Linus Torvalds authored
      9390bd47
    • Linus Torvalds's avatar
      Linux 2.1.132pre1 · 2e59abdf
      Linus Torvalds authored
      There's a new pre-patch out there. I'm back from Finland, and have caught
      up with just about half the email that I got during the stay. However,
      even the part I caught up with I may have partly missed something in,
      because (for obvious reasons) I didn't read them as carefully (*) as I
      usually do.
      
      This should fix at least part of the NFS problems people have reported:
      there was code to completely incorrectly invalidate quite valid write
      requests under some circumstances. The pre-patch also contains the first
      batch of patches merged in from Alan, and the "rmdir" problems should be
      fixed (mostly thanks to Al Viro).
      
      This pre-patch also gets rid of some imho completely unnecessary
      complexity in some of the VM memory freeing routines. There have been
      patches floating around that added more heuristics on when to do
      something, and this tries to get the same result by just removing old
      heuristics that didn't make much sense.
      
      	Linus
      
      (*) Even my usual "careful" is not very careful by other peoples
      standards. So when _I_ say that I wasn't very careful, you should just
      assume that I was reading my email about as carefully as a hyper-active
      hedgehog on some serious uppers. Can you say "ignored email" three times
      quickly while chewing on an apple?
      2e59abdf
    • Linus Torvalds's avatar
      pre-patch-2.1.131-3 · 16c82539
      Linus Torvalds authored
      Ok,
       I've made a new pre-patch-2.1.131-3.
      
      The basic problem (that Alexander Viro correctly diagnosed) is that the
      inode locking was horribly and subtly wrong for the case of a "rmdir()"
      call. What rmdir() did was essentially something like
      
       - VFS: lock the directory that contains the directory to remove
         (this is normal and required to make sure that the name updates are
         completely atomic - so removing or adding anything requires you to hold
         the lock on the directory that contains the removee/addee)
       - low-level filesystem: lock the directory you're going to remove, in
         order to atomically check that it's empty.
      
      So far so good, the above makes tons of sense. HOWEVER, the problem is
      fairly obvious if anybody before Alexander had actually bothered to think
      about it: when we hold two locks, we had better make sure that we get the
      locks in the right order, or we may end up deadlocked with two (or more)
      processes getting the locks in the wrong order and waiting on each other.
      
      Now, if it was only rmdir(), things would be fine, because the directory
      hierarchy itself imposes a lock order for rmdir(). But we have another
      case that needs to lock two directories: "rename()". And that one doesn't
      have the same kind of obvious order, and uses a different way to order the
      two locks it gets. BOOM.
      
      As far as I can tell, this is a problem in 2.0.x too, but while it's a
      potential really nasty DoS-opening, it does have the saving grace that the
      window to trigger it is really really small. I don't know if you can
      actually make an exploit for it that has any real chance of hitting it,
      but it's at least conceptually possible.
      
      Now, the only sane fix was to actually make the VFS layer do all the
      locking for rmdir(), and thus let the VFS layer make sure the order is
      correct, so that low-level filesystems don't need to worry their pretty
      heads. I tried to do that in the previous pre-patch, and it worked well
      for ext2, but not all that much else. The problem was that too many
      filesystems "knew" what the rmdir() downcall used to do. Oh, well.
      
      Anyway, I've fixed the low-level filesystems as far as I can tell, and the
      end result is a much cleaner interface (and one less bug). But it's an
      interface change at a fairly late date, and while the fixes to smbfs etc
      looked for the most part obvious, I haven't been able to test them, so
      I've done most of them "blind".
      
      Sadly, this bug couldn't just be glossed over, because a normal user could
      (by knowing the exact right incantation) force tons of unkillable
      processes that held critical filesystem resources (any lookup on a
      directory that was locked would in turn also lock up). So I'd ask people
      who have done filesystems for Linux to look over my changes, and if the
      filesystems are not part of the standard distribution please look over
      your own locally maintained fs code. I think we can ignore 2.0.x by virtue
      of it probably being virtually impossible to trigger. I'll leave the
      decision up to Alan.
      
      Most specially, I'd like to have people who use/maintain vfat and umsdos
      filesystems to test out that I actually made those filesystems happy with
      my changes. The other filesystems were more straightforward.
      
      Oh, and thanks to Alexander. Not that I really needed another bug to fix,
      but it feels good to plug holes.
      
                              Linus
      
      The change is basically:
       - the VFS layer locks the directory to be removed for you (as opposed to
         just the directory that contains the directory to be removed as it used
         to). A lot of filesystems didn't actually do this, and it is required,
         because otherwise the test for an empty directory may be subverted by a
         clever hacker.
       - the VFS layer will have done a dcache "prune" operation on the
         directory, and if there were no other uses for that dcache entry, it
         will have done a "d_drop()" on it too.
       - the above essentially means that any filesystem can do a
              if (!list_empty(&dentry->d_hash))
                      return -EBUSY;
         to test whether there are other users of this directory. No need to do
         any extra pruning etc - if it's been dropped there won't be any new
         users of the dentry afterwards, so there are no races. So after doing
         the above test you know that you'll have exclusive access to the dentry
         forever.
         Most notably, the low-level filesystem should _not_ look at the
         dentry->d_count member to see how many users there are. The VFS layer
         currently artificially raises the dentry count to make sure
         "d_delete()" doesn't get rid of the inode early.
       - however: traditional local UNIX-type filesystems tend to want to allow
         removing of the directory even if it is in use by something else. This
         requires that the inode be accessible even after the rmdir() - even
         though it doesn't necessarily need to actually _do_ anything.
         For a normal UNIX-like filesystem this tends to be trivial and quite
         automatic behaviour, but you need to think about whether your
         filesystem is of the kind where the inode stays around even after the
         delete until we locally do the final "iput()". For example, on
         networked filesystems this is generally not true, simply because the
         server will have de-allocated the inode even if we still have a
         reference to it locally.
      16c82539
    • Linus Torvalds's avatar
      pre-2.1.130-3 · 63f5d27a
      Linus Torvalds authored
      There's a new pre-patch for people who want to test these things out: I'll
      probably make a real 2.1.130 soon just to make sure all the silly problems
      in 2.1.129 are left behind (ie the UP flu in particular that people are
      still discussing even though there's a known cure).
      
      The pre-patch fixes a rather serious problem with wall-clock itimer
      functions, that admittedly was very very hard to trigger in real life (the
      only reason we found it was due to the diligent help from John Taves that
      saw sporadic problems under some very specific circumstances - thanks
      John).
      
      It also fixes a very silly NFS path revalidation issue: when we
      revalidated a cached NFS path component, we didn't update the revalidation
      time, so we ended up doing a lookup over the wire every time after the
      first time - essentially making the dcache useless for path component
      caching of NFS. If you use NFS heavily, you _will_ notice this change (it
      also fixes some rather ugly uses of dentries and inodes in the NFS code
      where we didn't update the counter so the inode wasn't guaranteed to even
      be there any more!).
      
      Also, thanks to Richard Gooch &co, who found the rather nasty race
      condition when a kernel thread was started from an init-region. The
      trivial fix was to not have the kernel thread function be inlined, but
      while fixing it was trivial, it wasn't trivial to notice in the first
      place. Good debugging.
      
      And the UP flu is obviously fixed here (as it was in earlier pre-patches
      and in various other patches floating around).
      
                              Linus
      63f5d27a
    • Linus Torvalds's avatar
      Import 2.1.130pre2 · 2eec9bc7
      Linus Torvalds authored
      2eec9bc7
    • Linus Torvalds's avatar
      Import 2.1.129pre1 · ef6a1333
      Linus Torvalds authored
      ef6a1333
    • Linus Torvalds's avatar
      Import 2.1.123pre3 · d13a7654
      Linus Torvalds authored
      d13a7654
    • Linus Torvalds's avatar
      Import 2.1.121pre1 · 716454f0
      Linus Torvalds authored
      716454f0
    • Linus Torvalds's avatar
      Import 2.1.120 · 519cb0c6
      Linus Torvalds authored
      519cb0c6
    • Linus Torvalds's avatar
      Import 2.1.118 · 792ee2cd
      Linus Torvalds authored
      792ee2cd
    • Linus Torvalds's avatar
      Import 2.1.117pre1 · 2b421ec7
      Linus Torvalds authored
      2b421ec7
    • Linus Torvalds's avatar
      Import 2.1.107 · d4f630d9
      Linus Torvalds authored
      d4f630d9
    • Linus Torvalds's avatar
      Import 2.1.82 · 47c1864c
      Linus Torvalds authored
      47c1864c
    • Linus Torvalds's avatar
      Import 2.1.80pre3 · 472bbf0a
      Linus Torvalds authored
      472bbf0a
    • Linus Torvalds's avatar
      Import 2.1.79 · ae04feb3
      Linus Torvalds authored
      ae04feb3
    • Linus Torvalds's avatar
      Import 2.1.78pre1 · 5770cca7
      Linus Torvalds authored
      5770cca7
    • Linus Torvalds's avatar
      Import 2.1.77 · c7c53f5b
      Linus Torvalds authored
      c7c53f5b
    • Linus Torvalds's avatar
      Import 2.1.76 · 3c8de19e
      Linus Torvalds authored
      3c8de19e
    • Linus Torvalds's avatar
      Import 2.1.75 · 76315b72
      Linus Torvalds authored
      76315b72
    • Linus Torvalds's avatar
      Import 2.1.73 · 97ccc379
      Linus Torvalds authored
      97ccc379
    • Linus Torvalds's avatar
      Import 2.1.72 · 62e3b9df
      Linus Torvalds authored
      62e3b9df
    • Linus Torvalds's avatar
      Import 2.1.71 · 56dafec3
      Linus Torvalds authored
      56dafec3
    • Linus Torvalds's avatar
      Import 2.1.67 · c5a4ebcd
      Linus Torvalds authored
      c5a4ebcd
    • Linus Torvalds's avatar
      Import 2.1.64 · 3e213f64
      Linus Torvalds authored
      3e213f64
    • Linus Torvalds's avatar
      Import 2.1.63 · 1a9f55d9
      Linus Torvalds authored
      1a9f55d9
    • Linus Torvalds's avatar
      Import 2.1.62 · a14e97bf
      Linus Torvalds authored
      a14e97bf
    • Linus Torvalds's avatar
      Import 2.1.61 · 73f103e4
      Linus Torvalds authored
      73f103e4
    • Linus Torvalds's avatar
      Import 2.1.60 · be6cc637
      Linus Torvalds authored
      be6cc637
    • Linus Torvalds's avatar
      Import 2.1.59 · 1018aab0
      Linus Torvalds authored
      1018aab0
    • Linus Torvalds's avatar
      Import 2.1.58 · f59dfe26
      Linus Torvalds authored
      f59dfe26
    • Linus Torvalds's avatar
      Import 2.1.57 · b23c7003
      Linus Torvalds authored
      b23c7003
    • Linus Torvalds's avatar
      Import 2.1.55pre1 · 47844733
      Linus Torvalds authored
      47844733
    • Linus Torvalds's avatar
      Import 2.1.52 · ddb701b2
      Linus Torvalds authored
      ddb701b2
    • Linus Torvalds's avatar
      Import 2.1.51pre1 · 94520e42
      Linus Torvalds authored
      94520e42
    • Linus Torvalds's avatar
      Import 2.1.50 · 6efe5c37
      Linus Torvalds authored
      6efe5c37
    • Linus Torvalds's avatar
      Import 2.1.49pre1 · 6f3ded5f
      Linus Torvalds authored
      6f3ded5f