Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-10824

ll_umount being improper use of cached mountpoint from mount time

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • Upstream
    • Lustre 2.9.0, Lustre 2.10.0, Lustre 2.11.0
    • None
    • 3
    • 9223372036854775807

    Description

      Al Viro chimed in complaining about patch from LU-1882 - http://review.whamcloud.com/20061
       
      Basically the problem is we cache sbi->ll_mnt.mnt as

      »       sbi->ll_mnt.mnt = current->fs->root.mnt;
      

      This is prone to many errors, in particular: did not get reference count, so this mount struct might disappear, it does not take bind mounts into account not mount --move.
      Might result in kernel panics in certain conditions.

      Overall original patch is trying to "fix" something that's not broken in the kernel

      If somebody does stat mountpoint in a tight loop, you will get -EBUSY there.
      No matter what. What's more, you might very well get it after some check in
      ->umount_begin() has told you that at the moment the thing you were trying to
      umount was not busy - just before the next stat hits.

      The patch needs to be reworked and we just need to add some extra retrying logic in the test framework instead I guess.

      Attachments

        Issue Links

          Activity

            People

              simmonsja James A Simmons
              green Oleg Drokin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: