Merge branch 'for-linus-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 12 Jan 2016 21:27:18 +0000 (13:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 12 Jan 2016 21:27:18 +0000 (13:27 -0800)
Pull UML updates from Richard Weinberger:
 "This contains beside of random fixes/cleanups two bigger changes:

   - seccomp support by Mickaël Salaün

   - IRQ rework by Anton Ivanov"

* 'for-linus-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: Use race-free temporary file creation
  um: Do not set unsecure permission for temporary file
  um: Fix build error and kconfig for i386
  um: Add seccomp support
  um: Add full asm/syscall.h support
  selftests/seccomp: Remove the need for HAVE_ARCH_TRACEHOOK
  um: Fix ptrace GETREGS/SETREGS bugs
  um: link with -lpthread
  um: Update UBD to use pread/pwrite family of functions
  um: Do not change hard IRQ flags in soft IRQ processing
  um: Prevent IRQ handler reentrancy
  uml: flush stdout before forking
  uml: fix hostfs mknod()

1  2 
fs/hostfs/hostfs_kern.c

diff --combined fs/hostfs/hostfs_kern.c
index 7db524cc85b6bf12358ce2ea1ea7df998b523be0,5a7b3229b956ea99fe57b1e88f7d8234b5fee690..f49be23e78aab4a25599fe97839848211432c05a
@@@ -730,15 -730,13 +730,13 @@@ static int hostfs_mknod(struct inode *d
  
        init_special_inode(inode, mode, dev);
        err = do_mknod(name, mode, MAJOR(dev), MINOR(dev));
-       if (!err)
+       if (err)
                goto out_free;
  
        err = read_name(inode, name);
        __putname(name);
        if (err)
                goto out_put;
-       if (err)
-               goto out_put;
  
        d_instantiate(dentry, inode);
        return 0;
@@@ -892,14 -890,9 +890,14 @@@ static const struct inode_operations ho
        .setattr        = hostfs_setattr,
  };
  
 -static const char *hostfs_follow_link(struct dentry *dentry, void **cookie)
 +static const char *hostfs_get_link(struct dentry *dentry,
 +                                 struct inode *inode,
 +                                 struct delayed_call *done)
  {
 -      char *link = __getname();
 +      char *link;
 +      if (!dentry)
 +              return ERR_PTR(-ECHILD);
 +      link = kmalloc(PATH_MAX, GFP_KERNEL);
        if (link) {
                char *path = dentry_name(dentry);
                int err = -ENOMEM;
                        __putname(path);
                }
                if (err < 0) {
 -                      __putname(link);
 +                      kfree(link);
                        return ERR_PTR(err);
                }
        } else {
                return ERR_PTR(-ENOMEM);
        }
  
 -      return *cookie = link;
 -}
 -
 -static void hostfs_put_link(struct inode *unused, void *cookie)
 -{
 -      __putname(cookie);
 +      set_delayed_call(done, kfree_link, link);
 +      return link;
  }
  
  static const struct inode_operations hostfs_link_iops = {
        .readlink       = generic_readlink,
 -      .follow_link    = hostfs_follow_link,
 -      .put_link       = hostfs_put_link,
 +      .get_link       = hostfs_get_link,
  };
  
  static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)