1. 29 2月, 2008 1 次提交
  2. 27 2月, 2008 3 次提交
    • H
      avr32: Fix OCD refcounting bug · 325d6f55
      Haavard Skinnemoen 提交于
      Iff the parent has TIF_DEBUG set, _and_ clone_flags includes
      CLONE_PTRACE we should set the TIF_DEBUG flag for the child and
      increment the ocd refcount. Otherwise, the TIF_DEBUG flag must be
      unset.
      
      Currently, the child inherits TIF_DEBUG from the parent before
      copy_thread is called, so TIF_DEBUG may be already be set before we
      determine whether the child is supposed to inherit debugging
      capabilities from the parent or not. This means that ocd_enable()
      won't increment the refcount, because TIF_DEBUG is already set, and
      that TIF_DEBUG will be set for processes that aren't being debugged.
      
      This leads to a refcounting asymmetry, which may show up as
      
      ------------[ cut here ]------------
      Badness at arch/avr32/kernel/ocd.c:73
      PC is at ocd_disable+0x34/0x60
      LR is at put_lock_stats+0xa/0x20
      
      as reported by David Brownell. Happens when strace'ing a process that
      forks a new child process, e.g. "strace mount -tjffs2 mtd1 /mnt", and
      subsequently killing the child process (e.g. "umount /mnt".)
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      325d6f55
    • D
      [SPARC64]: Loosen checks in exception table handling. · 622eaec6
      David S. Miller 提交于
      Some parts of the kernel now do things like do *_user() accesses while
      set_fs(KERNEL_DS) that fault on purpose.
      
      See, for example, the code added by changeset
      a0c1e907 ("futex: runtime enable pi
      and robust functionality").
      
      That trips up the ASI sanity checking we make in do_kernel_fault().
      
      Just remove it for now.  Maybe we can add it back later with an added
      conditional which looks at the current get_fs() value.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      622eaec6
    • J
      arch/sh/drivers/dma/dma-sh.c: Correct use of ! and & · b2d7c7f7
      Julia Lawall 提交于
      In commit e6bafba5, a bug was fixed that
      involved converting !x & y to !(x & y).  The code below shows the same
      pattern, and thus should perhaps be fixed in the same way.
      
      This is not tested and clearly changes the semantics, so it is only
      something to consider.
      
      The semantic patch that makes this change is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@ expression E1,E2; @@
      (
        !E1 & !E2
      |
      - !E1 & E2
      + !(E1 & E2)
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      b2d7c7f7
  3. 26 2月, 2008 27 次提交
  4. 25 2月, 2008 7 次提交
    • H
      sched: add declaration of sched_tail to sched.h · 2d07b255
      Harvey Harrison 提交于
      Avoids sparse warnings:
      kernel/sched.c:2170:17: warning: symbol 'schedule_tail' was not declared. Should it be static?
      
      Avoids the need for an external declaration in arch/um/process.c
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2d07b255
    • P
      sh: SH5-103 needs to select CPU_SH5. · 8ef97dd7
      Paul Mundt 提交于
      Without this, it's possible to have CONFIG_SUPERH32=y set on SH5-103
      parts, which leads to much build badness.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      8ef97dd7
    • P
      sh: Rename SH-3 CCR3 reg to avoid synclink_cs clash. · cc645a02
      Paul Mundt 提交于
      drivers/char/pcmcia/synclink_cs.c:284:1: warning: "CCR3" redefined
      In file included from include/asm/cache.h:13,
                       from include/asm/processor_32.h:15,
                       from include/asm/processor.h:60,
                       from include/linux/prefetch.h:14,
                       from include/linux/list.h:8,
                       from include/linux/module.h:9,
                       from drivers/char/pcmcia/synclink_cs.c:38:
      include/asm/cpu/cache.h:38:1: warning: this is the location of the previous definition
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      cc645a02
    • S
      [SPARC64]: Fix section mismatch from kernel_map_range · 896aef43
      Sam Ravnborg 提交于
      Fix following warnings:
      WARNING: vmlinux.o(.text+0x4f980): Section mismatch in reference from the function kernel_map_range() to the function .init.text:__alloc_bootmem()
      WARNING: vmlinux.o(.text+0x4f9cc): Section mismatch in reference from the function kernel_map_range() to the function .init.text:__alloc_bootmem()
      
      alloc_bootmem() is only used during early init and for any subsequent
      call to kernel_map_range() the program logic avoid the call.
      So annotate kernel_map_range() with __ref to tell modpost to
      ignore the reference to a __init function.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      896aef43
    • S
      [SPARC64]: Fix section mismatchs from dr_cpu_data · 7769bd1c
      Sam Ravnborg 提交于
      Fix following warnings:
      WARNING: vmlinux.o(.text+0x4b258): Section mismatch in reference from the function dr_cpu_data() to the function .devinit.text:mdesc_fill_in_cpu_data()
      WARNING: vmlinux.o(.text+0x4b290): Section mismatch in reference from the function dr_cpu_data() to the function .cpuinit.text:cpu_up()
      
      mdesc_fill_in_cpu_data() is only used during early init and for
      cpu hotplug so the __cpuinit annotation is the correct choice.
      We have the call chain:
      dr_cpu_data() => dr_cpu_configure() => mdesc_fill_in_cpu_data()
      
      dr_cpu_data() is used only during early init and for cpu
      hotplug. So annotating them all __cpuinit solves the
      section mismatch and should be correct.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7769bd1c
    • D
      [SPARC]: Fix build in arch/sparc/kernel/led.c · b80a7186
      David S. Miller 提交于
        CC [M]  arch/sparc/kernel/led.o
      arch/sparc/kernel/led.c: In function 'led_blink':
      arch/sparc/kernel/led.c:35: error: invalid use of undefined type 'struct
      timer_list'
      arch/sparc/kernel/led.c:35: error: 'jiffies' undeclared (first use in
      this function)
      arch/sparc/kernel/led.c:35: error: (Each undeclared identifier is
      reported only once
      arch/sparc/kernel/led.c:35: error: for each function it appears in.)
      arch/sparc/kernel/led.c:36: error: 'avenrun' undeclared (first use in
      this function)
      arch/sparc/kernel/led.c:36: error: 'FSHIFT' undeclared (first use in
      this function)
      arch/sparc/kernel/led.c:36: error: 'HZ' undeclared (first use in this
      function)
      arch/sparc/kernel/led.c:37: error: invalid use of undefined type 'struct
      timer_list'
      arch/sparc/kernel/led.c:39: error: invalid use of undefined type 'struct
      timer_list'
      arch/sparc/kernel/led.c:40: error: invalid use of undefined type 'struct
      timer_list'
      arch/sparc/kernel/led.c:42: error: implicit declaration of function
      'add_timer'
      arch/sparc/kernel/led.c: In function 'led_write_proc':
      arch/sparc/kernel/led.c:70: error: implicit declaration of function
      'copy_from_user'
      arch/sparc/kernel/led.c:84: error: implicit declaration of function
      'del_timer_sync'
      arch/sparc/kernel/led.c: In function 'led_init':
      arch/sparc/kernel/led.c:109: error: implicit declaration of function
      'init_timer'
      arch/sparc/kernel/led.c:110: error: invalid use of undefined type
      'struct timer_list'
      make[1]: *** [arch/sparc/kernel/led.o] Error 1
      
      Based upon original patch by Robert Reif.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b80a7186
    • J
      ARM: OMAP: Release i2c_adapter after use (Siemens SX1) · c9a2c46d
      Jean Delvare 提交于
      Each call to i2c_get_adapter() must be followed by a call to
      i2c_put_adapter() to release the grabbed reference. Otherwise the
      reference count grows forever and the adapter can never be
      unregistered.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NVladimir Ananiev <vovan888@gmail.com>
      Acked-by: NTony Lindgren <tony@atomide.com>
      c9a2c46d
  5. 24 2月, 2008 2 次提交