1. 07 Oct, 2010 1 commit
    • Jeff Layton's avatar
      cifs: add routines to build sessions and tcons on the fly · 9d002df4
      Jeff Layton authored
      This patch is rather large, but it's a bit difficult to do piecemeal...
      
      For non-multiuser mounts, everything will basically work as it does
      today. A call to cifs_sb_tlink will return the "master" tcon link.
      
      Turn the tcon pointer in the cifs_sb into a radix tree that uses the
      fsuid of the process as a key. The value is a new "tcon_link" struct
      that contains info about a tcon that's under construction.
      
      When a new process needs a tcon, it'll call cifs_sb_tcon. That will
      then look up the tcon_link in the radix tree. If it exists and is
      valid, it's returned.
      
      If it doesn't exist, then we stuff a new tcon_link into the tree and
      mark it as pending and then go and try to build the session/tcon.
      If that works, the tcon pointer in the tcon_link is updated and the
      pending flag is cleared.
      
      If the construction fails, then we set the tcon pointer to an ERR_PTR
      and clear the pending flag.
      
      If the radix tree is searched and the tcon_link is marked pending
      then we go to sleep and wait for the pending flag to be cleared.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      9d002df4
  2. 06 Oct, 2010 5 commits
  3. 29 Sep, 2010 24 commits
  4. 28 Sep, 2010 9 commits
  5. 27 Sep, 2010 1 commit
    • Dan Rosenberg's avatar
      Fix pktcdvd ioctl dev_minor range check · 252a52aa
      Dan Rosenberg authored
      The PKT_CTRL_CMD_STATUS device ioctl retrieves a pointer to a
      pktcdvd_device from the global pkt_devs array.  The index into this
      array is provided directly by the user and is a signed integer, so the
      comparison to ensure that it falls within the bounds of this array will
      fail when provided with a negative index.
      
      This can be used to read arbitrary kernel memory or cause a crash due to
      an invalid pointer dereference.  This can be exploited by users with
      permission to open /dev/pktcdvd/control (on many distributions, this is
      readable by group "cdrom").
      Signed-off-by: default avatarDan Rosenberg <dan.j.rosenberg@gmail.com>
      [ Rather than add a cast, just make the function take the right type -Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      252a52aa