1. 09 Nov, 2009 1 commit
    • Naohiro Ooiwa's avatar
      signal: Print warning message when dropping signals · f84d49b2
      Naohiro Ooiwa authored
      When the system has too many timers or too many aggregate
      queued signals, the EAGAIN error is returned to application
      from kernel, including timer_create() [POSIX.1b].
      
      It means that the app exceeded the limit of pending signals,
      but in general application writers do not expect this
      outcome and the current silent failure can cause rare app
      failures under very high load.
      
      This patch adds a new message when we reach the limit
      and if print_fatal_signals is enabled:
      
          task/1234: reached RLIMIT_SIGPENDING, dropping signal
      
      If you see this message and your system behaved unexpectedly,
      you can run following command to lift the limit:
      
         # ulimit -i unlimited
      
      With help from Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>.
      Signed-off-by: default avatarNaohiro Ooiwa <nooiwa@miraclelinux.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: oleg@redhat.com
      LKML-Reference: <4AF6E7E2.9080406@miraclelinux.com>
      [ Modified a few small details, gave surrounding code some love. ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f84d49b2
  2. 04 Nov, 2009 3 commits
    • Sebastian Andrzej Siewior's avatar
      signal: Fix alternate signal stack check · 2a855dd0
      Sebastian Andrzej Siewior authored
      All architectures in the kernel increment/decrement the stack pointer
      before storing values on the stack.
      
      On architectures which have the stack grow down sas_ss_sp == sp is not
      on the alternate signal stack while sas_ss_sp + sas_ss_size == sp is
      on the alternate signal stack.
      
      On architectures which have the stack grow up sas_ss_sp == sp is on
      the alternate signal stack while sas_ss_sp + sas_ss_size == sp is not
      on the alternate signal stack.
      
      The current implementation fails for architectures which have the
      stack grow down on the corner case where sas_ss_sp == sp.This was
      reported as Debian bug #544905 on AMD64.
      Simplified test case: http://download.breakpoint.cc/tc-sig-stack.c
      
      The test case creates the following stack scenario:
         0xn0300	stack top
         0xn0200	alt stack pointer top (when switching to alt stack)
         0xn01ff	alt stack end
         0xn0100	alt stack start == stack pointer
      
      If the signal is sent the stack pointer is pointing to the base
      address of the alt stack and the kernel erroneously decides that it
      has already switched to the alternate stack because of the current
      check for "sp - sas_ss_sp < sas_ss_size"
      
      On parisc (stack grows up) the scenario would be:
         0xn0200	stack pointer
         0xn01ff	alt stack end
         0xn0100	alt stack start = alt stack pointer base
         		    	  	  (when switching to alt stack)
         0xn0000	stack base
      
      This is handled correctly by the current implementation.
      
      [ tglx: Modified for archs which have the stack grow up (parisc) which
        	would fail with the correct implementation for stack grows
        	down. Added a check for sp >= current->sas_ss_sp which is
        	strictly not necessary but makes the code symetric for both
        	variants ]
      Signed-off-by: default avatarSebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: stable@kernel.org
      LKML-Reference: <20091025143758.GA6653@Chamillionaire.breakpoint.cc>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      2a855dd0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · 51bb296b
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        cfq-iosched: limit coop preemption
        cfq-iosched: fix bad return value cfq_should_preempt()
        backing-dev: bdi sb prune should be in the unregister path, not destroy
        Fix bio_alloc() and bio_kmalloc() documentation
        bio_put(): add bio_clone() to the list of functions in the comment
      51bb296b
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · dc79d2f2
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        sata_via: Remove redundant device ID for VIA VT8261
        drivers/ata/libata: Move dereference after NULL test
        ahci: Enable SB600 64bit DMA on MSI K9A2 Platinum v2
      dc79d2f2
  3. 03 Nov, 2009 32 commits
  4. 02 Nov, 2009 4 commits