1. 30 6月, 2010 9 次提交
    • M
      compiler-gcc.h: gcc-4.5 needs noclone and noinline on __naked functions · 9c695203
      Mikael Pettersson 提交于
      A __naked function is defined in C but with a body completely implemented
      by asm(), including any prologue and epilogue.  These asm() bodies expect
      standard calling conventions for parameter passing.  Older GCCs implement
      that correctly, but 4.[56] currently do not, see GCC PR44290.  In the
      Linux kernel this breaks ARM, causing most arch/arm/mm/copypage-*.c
      modules to get miscompiled, resulting in kernel crashes during bootup.
      
      Part of the kernel fix is to augment the __naked function attribute to
      also imply noinline and noclone.  This patch implements that, and has been
      verified to fix boot failures with gcc-4.5 compiled 2.6.34 and 2.6.35-rc1
      kernels.  The patch is a no-op with older GCCs.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NKhem Raj <raj.khem@gmail.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9c695203
    • M
      flat: tweak default stack alignment · 2952095c
      Mike Frysinger 提交于
      The recent commit 1f0ce8b3 ("mm: Move ARCH_SLAB_MINALIGN and
      ARCH_KMALLOC_MINALIGN to <linux/slab_def.h>") which moved the
      ARCH_SLAB_MINALIGN default into the global header inadvertently broke FLAT
      for a bunch of systems.  Blackfin systems now fail on any FLAT exec with:
      Unable to read code+data+bss, errno 14 When your /init is a FLAT binary,
      obviously this can be annoying ;).
      
      This stems from the alignment usage in the FLAT loader.  The behavior
      before was that FLAT would default to ARCH_SLAB_MINALIGN only if it was
      defined, and this was only defined by arches when they wanted a larger
      alignment value.  Otherwise it'd default to pointer alignment.  Arguably,
      this is kind of hokey that the FLAT is semi-abusing defines it shouldn't.
      
      So let's merge the two alignment requirements so the floor is never 0.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Cc: David McCullough <davidm@snapgear.com>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: David Woodhouse <David.Woodhouse@intel.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2952095c
    • A
      lxfb: fix incorrect __init annotation · 12c46b33
      Andres Salomon 提交于
      WARNING: vmlinux.o(.data+0x196e8): Section mismatch in reference from the
      variable lxfb_driver to the function .init.text:lxfb_probe() The variable
      lxfb_driver references the function __init lxfb_probe()
      
      This changes lxfb_probe and friends to use __devinit, and also adds
      __devexit to lxfb_remove.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Cc: Jordan Crouse <jordan.crouse@amd.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      12c46b33
    • A
      gxfb: fix incorrect __init annotation · 500ebb82
      Andres Salomon 提交于
      WARNING: vmlinux.o(.data+0x195d8): Section mismatch in reference from the
      variable gxfb_driver to the function .init.text:gxfb_probe() The variable
      gxfb_driver references the function __init gxfb_probe()
      
      This changes gxfb_probe and friends to use __devinit, and also adds
      __devexit to gxfb_remove.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Cc: Jordan Crouse <jordan.crouse@amd.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      500ebb82
    • K
      memcg: fix wake up in oom wait queue · 4d845ebf
      KAMEZAWA Hiroyuki 提交于
      OOM-waitqueue should be waken up when oom_disable is canceled.  This is a
      fix for 3c11ecf4 ("memcg: oom kill disable and oom status").
      
      How to test:
       Create a cgroup A...
       1. set memory.limit and memory.memsw.limit to be small value
       2. echo 1 > /cgroup/A/memory.oom_control, this disables oom-kill.
       3. run a program which must cause OOM.
      
      A program executed in 3 will sleep by oom_waiqueue in memcg.  Then, how to
      wake it up is problem.
      
       1. echo 0 > /cgroup/A/memory.oom_control (enable OOM-killer)
       2. echo big mem > /cgroup/A/memory.memsw.limit_in_bytes(allow more swap)
      
      etc..
      
      Without the patch, a task in slept can not be waken up.
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: NDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4d845ebf
    • M
      nommu: add '[stack]' label to /proc/pid/maps output · 3c26c9d9
      Mike Frysinger 提交于
      Add support to the NOMMU /proc/pid/maps file to show which mapping is the stack
      of the original thread after execve.  This is largely based on the MMU code.
      Subsidiary thread stacks are not indicated.
      
      For FDPIC, we now get:
      
      	root:/> cat /proc/self/maps
      	02064000-02067ccc rw-p 0004d000 00:01 22         /bin/busybox
      	0206e000-0206f35c rw-p 00006000 00:01 295        /lib/ld-uClibc.so.0
      	025f0000-025f6f0c r-xs 00000000 00:01 295        /lib/ld-uClibc.so.0
      	02680000-026ba6b0 r-xs 00000000 00:01 297        /lib/libc.so.0
      	02700000-0274d384 r-xs 00000000 00:01 22         /bin/busybox
      	02816000-02817000 rw-p 00000000 00:00 0
      	02848000-0284c0d8 rw-p 00000000 00:00 0
      	02860000-02880000 rw-p 00000000 00:00 0          [stack]
      
      The semi-downside here is that for FLAT, we get:
      
      	root:/> cat /proc/155/maps
      	029f0000-029f9000 rwxp 00000000 00:00 0          [stack]
      
      The reason being that FLAT combines a whole lot of stuff into one map
      (including the stack).  But this isn't any worse than the current output
      (which is nothing), so screw it.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: Greg Ungerer <gerg@snapgear.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3c26c9d9
    • I
      genalloc: fix allocation from end of pool · e621ba99
      Imre Deak 提交于
      bitmap_find_next_zero_area requires the size of the bitmap, we instead
      passed the last suitable position.  This made it impossible to allocate
      from the end of the pool.
      
      Fixes a regression introduced by 243797f5
      ("genalloc: use bitmap_find_next_zero_area").
      Signed-off-by: NImre Deak <imre.deak@nokia.com>
      Cc: Zygo Blaxell <zygo.blaxell@xandros.com>
      Cc: Tejun Heo <tj@kernel.org>
      Acked-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e621ba99
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · 984bc960
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        block: Don't count_vm_events for discard bio in submit_bio.
        cfq: fix recursive call in cfq_blkiocg_update_completion_stats()
        cfq-iosched: Fixed boot warning with BLK_CGROUP=y and CFQ_GROUP_IOSCHED=n
        cfq: Don't allow queue merges for queues that have no process references
        block: fix DISCARD_BARRIER requests
        cciss: set SCSI max cmd len to 16, as default is wrong
        cpqarray: fix two more wrong section type
        cpqarray: fix wrong __init type on pci probe function
        drbd: Fixed a race between disk-attach and unexpected state changes
        writeback: fix pin_sb_for_writeback
        writeback: add missing requeue_io in writeback_inodes_wb
        writeback: simplify and split bdi_start_writeback
        writeback: simplify wakeup_flusher_threads
        writeback: fix writeback_inodes_wb from writeback_inodes_sb
        writeback: enforce s_umount locking in writeback_inodes_sb
        writeback: queue work on stack in writeback_inodes_sb
        writeback: fix writeback completion notifications
      984bc960
    • N
      fs: fix superblock iteration race · 57439f87
      npiggin@suse.de 提交于
      list_for_each_entry_safe is not suitable to protect against concurrent
      modification of the list. 6754af64 introduced a race in sb walking.
      
      list_for_each_entry can use the trick of pinning the current entry in
      the list before we drop and retake the lock because it subsequently
      follows cur->next. However list_for_each_entry_safe saves n=cur->next
      for following before entering the loop body, so when the lock is
      dropped, n may be deleted.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: John Stultz <johnstul@us.ibm.com>
      Cc: Frank Mayhar <fmayhar@google.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      57439f87
  2. 29 6月, 2010 7 次提交
  3. 28 6月, 2010 9 次提交
  4. 27 6月, 2010 15 次提交