]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jun 2012 18:53:44 +0000 (11:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jun 2012 18:53:44 +0000 (11:53 -0700)
Pull third pile of signal handling patches from Al Viro:
 "This time it's mostly helpers and conversions to them; there's a lot
  of stuff remaining in the tree, but that'll either go in -rc2
  (isolated bug fixes, ideally via arch maintainers' trees) or will sit
  there until the next cycle."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
  x86: get rid of calling do_notify_resume() when returning to kernel mode
  blackfin: check __get_user() return value
  whack-a-mole with TIF_FREEZE
  FRV: Optimise the system call exit path in entry.S [ver #2]
  FRV: Shrink TIF_WORK_MASK [ver #2]
  FRV: Prevent syscall exit tracing and notify_resume at end of kernel exceptions
  new helper: signal_delivered()
  powerpc: get rid of restore_sigmask()
  most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set
  set_restore_sigmask() is never called without SIGPENDING (and never should be)
  TIF_RESTORE_SIGMASK can be set only when TIF_SIGPENDING is set
  don't call try_to_freeze() from do_signal()
  pull clearing RESTORE_SIGMASK into block_sigmask()
  sh64: failure to build sigframe != signal without handler
  openrisc: tracehook_signal_handler() is supposed to be called on success
  new helper: sigmask_to_save()
  new helper: restore_saved_sigmask()
  new helpers: {clear,test,test_and_clear}_restore_sigmask()
  HAVE_RESTORE_SIGMASK is defined on all architectures now

1  2 
fs/compat.c

diff --combined fs/compat.c
index 3004d2bad13f037682becb107ab24a21e61a5e7d,3adf3d4c2cd9e1a5da0da2bf9a6b984a0d276edf..6161255fac45648efdfe437d9d880d390268d14f
@@@ -871,12 -871,12 +871,12 @@@ asmlinkage long compat_sys_old_readdir(
  {
        int error;
        struct file *file;
 +      int fput_needed;
        struct compat_readdir_callback buf;
  
 -      error = -EBADF;
 -      file = fget(fd);
 +      file = fget_light(fd, &fput_needed);
        if (!file)
 -              goto out;
 +              return -EBADF;
  
        buf.result = 0;
        buf.dirent = dirent;
        if (buf.result)
                error = buf.result;
  
 -      fput(file);
 -out:
 +      fput_light(file, fput_needed);
        return error;
  }
  
@@@ -952,15 -953,16 +952,15 @@@ asmlinkage long compat_sys_getdents(uns
        struct file * file;
        struct compat_linux_dirent __user * lastdirent;
        struct compat_getdents_callback buf;
 +      int fput_needed;
        int error;
  
 -      error = -EFAULT;
        if (!access_ok(VERIFY_WRITE, dirent, count))
 -              goto out;
 +              return -EFAULT;
  
 -      error = -EBADF;
 -      file = fget(fd);
 +      file = fget_light(fd, &fput_needed);
        if (!file)
 -              goto out;
 +              return -EBADF;
  
        buf.current_dir = dirent;
        buf.previous = NULL;
                else
                        error = count - buf.count;
        }
 -      fput(file);
 -out:
 +      fput_light(file, fput_needed);
        return error;
  }
  
@@@ -1038,15 -1041,16 +1038,15 @@@ asmlinkage long compat_sys_getdents64(u
        struct file * file;
        struct linux_dirent64 __user * lastdirent;
        struct compat_getdents_callback64 buf;
 +      int fput_needed;
        int error;
  
 -      error = -EFAULT;
        if (!access_ok(VERIFY_WRITE, dirent, count))
 -              goto out;
 +              return -EFAULT;
  
 -      error = -EBADF;
 -      file = fget(fd);
 +      file = fget_light(fd, &fput_needed);
        if (!file)
 -              goto out;
 +              return -EBADF;
  
        buf.current_dir = dirent;
        buf.previous = NULL;
                else
                        error = count - buf.count;
        }
 -      fput(file);
 -out:
 +      fput_light(file, fput_needed);
        return error;
  }
  #endif /* ! __ARCH_OMIT_COMPAT_SYS_GETDENTS64 */
@@@ -1542,7 -1547,6 +1542,6 @@@ asmlinkage long compat_sys_old_select(s
                                 compat_ptr(a.exp), compat_ptr(a.tvp));
  }
  
- #ifdef HAVE_SET_RESTORE_SIGMASK
  static long do_compat_pselect(int n, compat_ulong_t __user *inp,
        compat_ulong_t __user *outp, compat_ulong_t __user *exp,
        struct compat_timespec __user *tsp, compat_sigset_t __user *sigmask,
@@@ -1665,11 -1669,9 +1664,9 @@@ asmlinkage long compat_sys_ppoll(struc
  
        return ret;
  }
- #endif /* HAVE_SET_RESTORE_SIGMASK */
  
  #ifdef CONFIG_EPOLL
  
- #ifdef HAVE_SET_RESTORE_SIGMASK
  asmlinkage long compat_sys_epoll_pwait(int epfd,
                        struct compat_epoll_event __user *events,
                        int maxevents, int timeout,
  
        return err;
  }
- #endif /* HAVE_SET_RESTORE_SIGMASK */
  
  #endif /* CONFIG_EPOLL */