1. 01 Dec, 2010 5 commits
    • Sebastian Ott's avatar
      [S390] css: fix rsid evaluation for 2nd crw · 8d7bfb4a
      Sebastian Ott authored
      Use correct bit positions of rsid field.
      Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      8d7bfb4a
    • Heiko Carstens's avatar
      [S390] nohz/s390: fix arch_needs_cpu() return value on offline cpus · 39881215
      Heiko Carstens authored
      This fixes the same problem as described in the patch "nohz: fix
      printk_needs_cpu() return value on offline cpus" for the arch_needs_cpu()
      primitive:
      
      arch_needs_cpu() may return 1 if called on offline cpus. When a cpu gets
      offlined it schedules the idle process which, before killing its own cpu,
      will call tick_nohz_stop_sched_tick().
      That function in turn will call arch_needs_cpu() in order to check if the
      local tick can be disabled. On offline cpus this function should naturally
      return 0 since regardless if the tick gets disabled or not the cpu will be
      dead short after. That is besides the fact that __cpu_disable() should already
      have made sure that no interrupts on the offlined cpu will be delivered anyway.
      
      In this case it prevents tick_nohz_stop_sched_tick() to call
      select_nohz_load_balancer(). No idea if that really is a problem. However what
      made me debug this is that on 2.6.32 the function get_nohz_load_balancer() is
      used within __mod_timer() to select a cpu on which a timer gets enqueued.
      If arch_needs_cpu() returns 1 then the nohz_load_balancer cpu doesn't get
      updated when a cpu gets offlined. It may contain the cpu number of an offline
      cpu. In turn timers get enqueued on an offline cpu and not very surprisingly
      they never expire and cause system hangs.
      
      This has been observed 2.6.32 kernels. On current kernels __mod_timer() uses
      get_nohz_timer_target() which doesn't have that problem. However there might
      be other problems because of the too early exit tick_nohz_stop_sched_tick()
      in case a cpu goes offline.
      
      This specific bug was indrocuded with 3c5d92a0 "nohz: Introduce
      arch_needs_cpu".
      
      In this case a cpu hotplug notifier is used to fix the issue in order to keep
      the normal/fast path small. All we need to do is to clear the condition that
      makes arch_needs_cpu() return 1 since it is just a performance improvement
      which is supposed to keep the local tick running for a short period if a cpu
      goes idle. Nothing special needs to be done except for clearing the condition.
      
      Cc: stable@kernel.org
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      39881215
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://github.com/at91linux/linux-2.6-at91 · 22a5b566
      Linus Torvalds authored
      * 'for_linus' of git://github.com/at91linux/linux-2.6-at91:
        at91/board-yl-9200: fix typo in video support
        atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'
        at91/picotux200: remove commenting usb device and dataflash support
        at91: rename rm9200ek and rm9200dk board file name
        at91rm9200ek: fix warning: 'ek_mmc_data' defined but not used
        at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used
        at91: Convert remaining boards to new-style UART initialization
        at91: merge all at91rm9200 defconfig in one single file
      22a5b566
    • Oleg Nesterov's avatar
      exec: copy-and-paste the fixes into compat_do_execve() paths · 114279be
      Oleg Nesterov authored
      Note: this patch targets 2.6.37 and tries to be as simple as possible.
      That is why it adds more copy-and-paste horror into fs/compat.c and
      uglifies fs/exec.c, this will be cleanuped later.
      
      compat_copy_strings() plays with bprm->vma/mm directly and thus has
      two problems: it lacks the RLIMIT_STACK check and argv/envp memory
      is not visible to oom killer.
      
      Export acct_arg_size() and get_arg_page(), change compat_copy_strings()
      to use get_arg_page(), change compat_do_execve() to do acct_arg_size(0)
      as do_execve() does.
      
      Add the fatal_signal_pending/cond_resched checks into compat_count() and
      compat_copy_strings(), this matches the code in fs/exec.c and certainly
      makes sense.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      114279be
    • Oleg Nesterov's avatar
      exec: make argv/envp memory visible to oom-killer · 3c77f845
      Oleg Nesterov authored
      Brad Spengler published a local memory-allocation DoS that
      evades the OOM-killer (though not the virtual memory RLIMIT):
      http://www.grsecurity.net/~spender/64bit_dos.c
      
      execve()->copy_strings() can allocate a lot of memory, but
      this is not visible to oom-killer, nobody can see the nascent
      bprm->mm and take it into account.
      
      With this patch get_arg_page() increments current's MM_ANONPAGES
      counter every time we allocate the new page for argv/envp. When
      do_execve() succeds or fails, we change this counter back.
      
      Technically this is not 100% correct, we can't know if the new
      page is swapped out and turn MM_ANONPAGES into MM_SWAPENTS, but
      I don't think this really matters and everything becomes correct
      once exec changes ->mm or fails.
      Reported-by: default avatarBrad Spengler <spender@grsecurity.net>
      Reviewed-and-discussed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3c77f845
  2. 30 Nov, 2010 11 commits
  3. 29 Nov, 2010 18 commits
  4. 28 Nov, 2010 6 commits