1. 14 Aug, 2013 5 commits
  2. 09 Aug, 2013 1 commit
  3. 07 Aug, 2013 20 commits
  4. 06 Aug, 2013 9 commits
  5. 05 Aug, 2013 5 commits
    • Zheng Liu's avatar
      vfs: add missing check for __O_TMPFILE in fcntl_init() · 3d62c45b
      Zheng Liu authored
      As comment in include/uapi/asm-generic/fcntl.h described, when
      introducing new O_* bits, we need to check its uniqueness in
      fcntl_init().  But __O_TMPFILE bit is missing.  So fix it.
      Signed-off-by: default avatarZheng Liu <wenqing.lz@taobao.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      3d62c45b
    • Andy Lutomirski's avatar
      fs: Allow unprivileged linkat(..., AT_EMPTY_PATH) aka flink · bb2314b4
      Andy Lutomirski authored
      Every now and then someone proposes a new flink syscall, and this spawns
      a long discussion of whether it would be a security problem.  I think
      that this is missing the point: flink is *already* allowed without
      privilege as long as /proc is mounted -- it's called AT_SYMLINK_FOLLOW.
      
      Now that O_TMPFILE is here, the ability to create a file with O_TMPFILE,
      write it, and link it in is very convenient.  The only problem is that
      it requires that /proc be mounted so that you can do:
      
      linkat(AT_FDCWD, "/proc/self/fd/<tmpfd>", dfd, path, AT_SYMLINK_NOFOLLOW)
      
      This sucks -- it's much nicer to do:
      
      linkat(tmpfd, "", dfd, path, AT_EMPTY_PATH)
      
      Let's allow it.
      
      If this turns out to be excessively scary, it we could instead require
      that the inode in question be I_LINKABLE, but this seems pointless given
      the /proc situation
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      bb2314b4
    • Andy Lutomirski's avatar
      fs: Fix file mode for O_TMPFILE · e305f48b
      Andy Lutomirski authored
      O_TMPFILE, like O_CREAT, should respect the requested mode and should
      create regular files.
      
      This fixes two bugs: O_TMPFILE required privilege (because the mode
      ended up as 000) and it produced bogus inodes with no type.
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      e305f48b
    • Al Viro's avatar
      reiserfs: fix deadlock in umount · 672fe15d
      Al Viro authored
      Since remove_proc_entry() started to wait for IO in progress (i.e.
      since 2007 or so), the locking in fs/reiserfs/proc.c became wrong;
      if procfs read happens between the moment when umount() locks the
      victim superblock and removal of /proc/fs/reiserfs/<device>/*,
      we'll get a deadlock - read will wait for s_umount (in sget(),
      called by r_start()), while umount will wait in remove_proc_entry()
      for that read to finish, holding s_umount all along.
      
      Fortunately, the same change allows a much simpler race avoidance -
      all we need to do is remove the procfs entries in the very beginning
      of reiserfs ->kill_sb(); that'll guarantee that pointer to superblock
      will remain valid for the duration for procfs IO, so we don't need
      sget() to keep the sucker alive.  As the matter of fact, we can
      get rid of the home-grown iterator completely, and use single_open()
      instead.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      672fe15d
    • Florian Fainelli's avatar
      MIPS: BMIPS: fix hardware interrupt routing for boot CPU != 0 · fcfa66de
      Florian Fainelli authored
      The hardware interrupt routing for boot CPU != 0 is wrong because it
      will route all the hardware interrupts to TP0 which is not the one we
      booted from. Fix this by properly checking which boot CPU we are booting
      from and updating the right interrupt mask for the boot CPU. This fixes
      booting on BCM3368 with bmips_smp_emabled = 0.
      Signed-off-by: default avatarFlorian Fainelli <florian@openwrt.org>
      Cc: linux-mips@linux-mips.org
      Cc: blogic@openwrt.org
      Cc: jogo@openwrt.org
      Cc: cernekee@gmail.com
      Patchwork: https://patchwork.linux-mips.org/patch/5650/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      fcfa66de