1. 21 Jan, 2010 3 commits
    • Yongseok Koh's avatar
      vmalloc: remove BUG_ON due to racy counting of VM_LAZY_FREE · 88f50044
      Yongseok Koh authored
      In free_unmap_area_noflush(), va->flags is marked as VM_LAZY_FREE first, and
      then vmap_lazy_nr is increased atomically.
      
      But, in __purge_vmap_area_lazy(), while traversing of vmap_are_list, nr
      is counted by checking VM_LAZY_FREE is set to va->flags.  After counting
      the variable nr, kernel reads vmap_lazy_nr atomically and checks a
      BUG_ON condition whether nr is greater than vmap_lazy_nr to prevent
      vmap_lazy_nr from being negative.
      
      The problem is that, if interrupted right after marking VM_LAZY_FREE,
      increment of vmap_lazy_nr can be delayed.  Consequently, BUG_ON
      condition can be met because nr is counted more than vmap_lazy_nr.
      
      It is highly probable when vmalloc/vfree are called frequently.  This
      scenario have been verified by adding delay between marking VM_LAZY_FREE
      and increasing vmap_lazy_nr in free_unmap_area_noflush().
      
      Even the vmap_lazy_nr is for checking high watermark, it never be the
      strict watermark.  Although the BUG_ON condition is to prevent
      vmap_lazy_nr from being negative, vmap_lazy_nr is signed variable.  So,
      it could go down to negative value temporarily.
      
      Consequently, removing the BUG_ON condition is proper.
      
      A possible BUG_ON message is like the below.
      
         kernel BUG at mm/vmalloc.c:517!
         invalid opcode: 0000 [#1] SMP
         EIP: 0060:[<c04824a4>] EFLAGS: 00010297 CPU: 3
         EIP is at __purge_vmap_area_lazy+0x144/0x150
         EAX: ee8a8818 EBX: c08e77d4 ECX: e7c7ae40 EDX: c08e77ec
         ESI: 000081fe EDI: e7c7ae60 EBP: e7c7ae64 ESP: e7c7ae3c
         DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
         Call Trace:
         [<c0482ad9>] free_unmap_vmap_area_noflush+0x69/0x70
         [<c0482b02>] remove_vm_area+0x22/0x70
         [<c0482c15>] __vunmap+0x45/0xe0
         [<c04831ec>] vmalloc+0x2c/0x30
         Code: 8d 59 e0 eb 04 66 90 89 cb 89 d0 e8 87 fe ff ff 8b 43 20 89 da 8d 48 e0 8d 43 20 3b 04 24 75 e7 fe 05 a8 a5 a3 c0 e9 78 ff ff ff <0f> 0b eb fe 90 8d b4 26 00 00 00 00 56 89 c6 b8 ac a5 a3 c0 31
         EIP: [<c04824a4>] __purge_vmap_area_lazy+0x144/0x150 SS:ESP 0068:e7c7ae3c
      
      [ See also http://marc.info/?l=linux-kernel&m=126335856228090&w=2 ]
      Signed-off-by: default avatarYongseok Koh <yongseok.koh@samsung.com>
      Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      88f50044
    • Linus Torvalds's avatar
      Merge branch 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 · 970114a1
      Linus Torvalds authored
      * 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
        sh64: wire up sys_accept4.
        sh: unwire sys_recvmmsg.
        sh: ms7724: Correct sh-eth EEPROM polling timeout.
      970114a1
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · def20529
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm:
        ARM: 5888/1: arm: Update comments in cacheflush.h and remove unnecessary V6 and V7 comments
        ARM: 5886/1: arm: Fix cpu_proc_fin() for proc-v7.S and make kexec work
        ARM: 5885/1: arm: Flush TLB entries in setup_mm_for_reboot()
        ARM: 5884/1: arm: Fix DCC console for v7
        ARM: 5883/1: Revert "disable NX support for OABI-supporting kernels"
        ARM: 5882/1: ARM: Fix uncompress code compile for different defines of flush(void)
        ARM: fix badly placed mach/plat entries in Kconfig & Makefile
      def20529
  2. 19 Jan, 2010 6 commits
  3. 18 Jan, 2010 26 commits
  4. 17 Jan, 2010 5 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · 7dc9c484
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
        do_add_mount() should sanitize mnt_flags
        CIFS shouldn't make mountpoints shrinkable
        mnt_flags fixes in do_remount()
        attach_recursive_mnt() needs to hold vfsmount_lock over set_mnt_shared()
        may_umount() needs namespace_sem
        Fix configfs leak
        Fix the -ESTALE handling in do_filp_open()
        ecryptfs: Fix refcnt leak on ecryptfs_follow_link() error path
        Fix ACC_MODE() for real
        Unrot uml mconsole a bit
        hppfs: handle ->put_link()
        Kill 9p readlink()
        fix autofs/afs/etc. magic mountpoint breakage
      7dc9c484
    • Mike Frysinger's avatar
      modpost: fix segfault in sym_is() with prefixed arches · 3a5dd791
      Mike Frysinger authored
      The sym_is() compares a symbol in an attempt to automatically skip symbol
      prefixes.  It does this first by searching the real symbol with the normal
      unprefixed symbol.  But then it uses the length of the original symbol to
      check the end of the substring instead of the length of the symbol it is
      looking for.  On non-prefixed arches, this is effectively the same thing,
      so there is no problem.  On prefixed-arches, since this is exceeds by just
      one byte, a crash is rare and it is usually a NUL byte anyways.  But every
      once in a blue moon, you get the right page alignment and it segfaults.
      
      For example, on the Blackfin arch, sym_is() will be called with the real
      symbol "___mod_usb_device_table" as "symbol" when looking for the normal
      symbol "__mod_usb_device_table" as "name".  The substring will thus return
      one byte into "symbol" and store it into "match".  But then "match" will
      be indexed with the length of "symbol" instead of "name" and so we will
      exceed the storage.  i.e. the code ends up doing:
      	char foo[] = "abc"; return foo[strlen(foo)+1] == '\0';
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3a5dd791
    • Russell King's avatar
    • Manu Abraham's avatar
      V4L/DVB (13851): Fix Input dependency for Mantis · fcd89de3
      Manu Abraham authored
      >
      >
      >
      > CONFIG_INPUT=n
      
      As reported by Randy Dunlap <randy.dunlap@oracle.com>:
      > ERROR: "ir_input_register" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "ir_input_unregister" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "ir_input_init" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "input_free_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "input_allocate_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
      Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      fcd89de3
    • Mauro Carvalho Chehab's avatar
      V4L/DVB(13824a): mantis: Fix __devexit bad annotations · 4cf0b3f1
      Mauro Carvalho Chehab authored
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x13d7): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x1433): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x185e): Section mismatch in reference from the function hopper_pci_probe() to the function
      .devexit.text:mantis_i2c_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x18ba): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x68b8): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6914): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d3f): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d9b): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14634): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14690): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14abb): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14b17): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      Acked-by: default avatarManu Abraham <manu@linuxtv.org>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      4cf0b3f1