1. 12 8月, 2011 5 次提交
    • E
      ext4: Properly count journal credits for long symlinks · 8c208719
      Eric Sandeen 提交于
      Commit df5e6223 ("ext4: fix deadlock in ext4_symlink() in ENOSPC
      conditions") recalculated the number of credits needed for a long
      symlink, in the process of splitting it into two transactions.  However,
      the first credit calculation under-counted because if selinux is
      enabled, credits are needed to create the selinux xattr as well.
      
      Overrunning the reservation will result in an OOPS in
      jbd2_journal_dirty_metadata() due to this assert:
      
        J_ASSERT_JH(jh, handle->h_buffer_credits > 0);
      
      Fix this by increasing the reservation size.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Acked-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8c208719
    • E
      ext3: Properly count journal credits for long symlinks · d2db60df
      Eric Sandeen 提交于
      Commit ae54870a ("ext3: Fix lock inversion in ext3_symlink()")
      recalculated the number of credits needed for a long symlink, in the
      process of splitting it into two transactions.  However, the first
      credit calculation under-counted because if selinux is enabled, credits
      are needed to create the selinux xattr as well.
      
      Overrunning the reservation will result in an OOPS in
      journal_dirty_metadata() due to this assert:
      
        J_ASSERT_JH(jh, handle->h_buffer_credits > 0);
      
      Fix this by increasing the reservation size.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Acked-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d2db60df
    • V
      move RLIMIT_NPROC check from set_user() to do_execve_common() · 72fa5997
      Vasiliy Kulikov 提交于
      The patch http://lkml.org/lkml/2003/7/13/226 introduced an RLIMIT_NPROC
      check in set_user() to check for NPROC exceeding via setuid() and
      similar functions.
      
      Before the check there was a possibility to greatly exceed the allowed
      number of processes by an unprivileged user if the program relied on
      rlimit only.  But the check created new security threat: many poorly
      written programs simply don't check setuid() return code and believe it
      cannot fail if executed with root privileges.  So, the check is removed
      in this patch because of too often privilege escalations related to
      buggy programs.
      
      The NPROC can still be enforced in the common code flow of daemons
      spawning user processes.  Most of daemons do fork()+setuid()+execve().
      The check introduced in execve() (1) enforces the same limit as in
      setuid() and (2) doesn't create similar security issues.
      
      Neil Brown suggested to track what specific process has exceeded the
      limit by setting PF_NPROC_EXCEEDED process flag.  With the change only
      this process would fail on execve(), and other processes' execve()
      behaviour is not changed.
      
      Solar Designer suggested to re-check whether NPROC limit is still
      exceeded at the moment of execve().  If the process was sleeping for
      days between set*uid() and execve(), and the NPROC counter step down
      under the limit, the defered execve() failure because NPROC limit was
      exceeded days ago would be unexpected.  If the limit is not exceeded
      anymore, we clear the flag on successful calls to execve() and fork().
      
      The flag is also cleared on successful calls to set_user() as the limit
      was exceeded for the previous user, not the current one.
      
      Similar check was introduced in -ow patches (without the process flag).
      
      v3 - clear PF_NPROC_EXCEEDED on successful calls to set_user().
      Reviewed-by: NJames Morris <jmorris@namei.org>
      Signed-off-by: NVasiliy Kulikov <segoon@openwall.com>
      Acked-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      72fa5997
    • L
      Merge branch 'perf-urgent-for-linus' of... · 1d229d54
      Linus Torvalds 提交于
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        perf symbols: Check '/tmp/perf-' symbol file ownership
        perf sched: Usage leftover from trace -> script rename
        perf sched: Do not delete session object prematurely
        perf tools: Check $HOME/.perfconfig ownership
        perf, x86: Add model 45 SandyBridge support
        perf tools: Add support to install perf python extension
        perf tools: do not look at ./config for configuration
        perf tools: Make clean leaves some files
        perf lock: Dropping unsupported ':r' modifier
        perf probe: Fix coredump introduced by probe module option
        jump label: Reduce the cycle count by changing the link order
        perf report: Use ui__warning in some more places
        perf python: Add PERF_RECORD_{LOST,READ,SAMPLE} routine tables
        perf evlist: Introduce 'disable' method
        trace events: Update version number reference to new 3.x scheme for EVENT_POWER_TRACING_DEPRECATED
        perf buildid-cache: Zero out buffer of filenames when adding/removing buildid
      1d229d54
    • T
      MAINTAINERS: Update linus' git repository · d16adea3
      Tracey Dent 提交于
      Change to new git tree -
       (git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git).
      Signed-off-by: NTracey Dent <tdent48227@gmail.com>
      Acked-by: NWANG Cong <xiyou.wangcong@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d16adea3
  2. 11 8月, 2011 6 次提交
  3. 10 8月, 2011 14 次提交
  4. 09 8月, 2011 15 次提交