← Back to team overview

kernel-packages team mailing list archive

[Bug 1222442] Re: Linux kernel regression: Links on CIFS shares

 

** Changed in: linux (Ubuntu)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1222442

Title:
  Linux kernel regression: Links on CIFS shares

Status in “linux” package in Ubuntu:
  Triaged

Bug description:
  After upgrading from (Ubuntu) kernel version 3.2.0-45-generic to
  3.2.0-48-generic on Ubuntu Precise (x86_64), links on CIFS shares are
  broken. The used setup is the following:

  Clients running Ubuntu Precise mount a CIFS share with

      mount -t cifs -o
  sec=krb5,multiuser,cifsacl,serverino,nobrl,nounix,cruid=xyz,mfsymlinks
  //srv.example.com /mnt/cifs

  Issuing the following commands

      touch hello
      ln -s hello hello2
      ls -l

  on the mounted CIFS share results in the output

      ls: cannot read symbolic link hello2: Invalid argument
      total 1024
      -rwxr-xr-x 0 user group 0 Sep  8 16:36 hello
      lrwxrwxrwx 1 user group 5 Sep  8 16:36 hello2

  for kernel versions >= 3.2.0-48-generic. Running "less hello2" yields:

      hello2 is not a regular file (use -f to see it)

  Using "less -f hello2" changes the error message to

      hello2: Too many levels of symbolic links

  Some of our users only see this problem if there is at least one
  reboot of the client between link creation and link access.

  The problem can be traced back to the following kernel code change:
  -------------------------------------------------------------------------------------------------------
  diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
  index e851d5b..20431b4 100644
  --- a/fs/cifs/inode.c
  +++ b/fs/cifs/inode.c
  @@ -173,7 +173,8 @@ cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr)
   
          if (fattr->cf_flags & CIFS_FATTR_DFS_REFERRAL)
                  inode->i_flags |= S_AUTOMOUNT;
  -       cifs_set_ops(inode);
  +       if (inode->i_state & I_NEW)
  +               cifs_set_ops(inode);
   }
   
   void
  -------------------------------------------------------------------------------------------------------
  Reverting this change fixes the problem.

  Another way to get rid of the error is to remove the "nounix" and
  "mksymlinks" mount options but this slows down the setup such that it
  becomes practically useless.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1222442/+subscriptions


References