1. 13 Nov, 2008 14 commits
    • Eric W. Biederman's avatar
      vfs: fix shrink_submounts · afef80b3
      Eric W. Biederman authored
      In the last refactoring of shrink_submounts a variable was not completely
      renamed.  So finish the renaming of mnt to m now.
      
      Without this if you attempt to mount an nfs mount that has both automatic
      nfs sub mounts on it, and has normal mounts on it.  The unmount will
      succeed when it should not.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Al Viro <viro@ZenIV.linux.org.uk
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      afef80b3
    • KOSAKI Motohiro's avatar
      mm: remove lru_add_drain_all() from the munlock path · 8891d6da
      KOSAKI Motohiro authored
      lockdep warns about following message at boot time on one of my test
      machine.  Then, schedule_on_each_cpu() sholdn't be called when the task
      have mmap_sem.
      
      Actually, lru_add_drain_all() exist to prevent the unevictalble pages
      stay on reclaimable lru list.  but currenct unevictable code can rescue
      unevictable pages although it stay on reclaimable list.
      
      So removing is better.
      
      In addition, this patch add lru_add_drain_all() to sys_mlock() and
      sys_mlockall().  it isn't must.  but it reduce the failure of moving to
      unevictable list.  its failure can rescue in vmscan later.  but reducing
      is better.
      
      Note, if above rescuing happend, the Mlocked and the Unevictable field
      mismatching happend in /proc/meminfo.  but it doesn't cause any real
      trouble.
      
      =======================================================
      [ INFO: possible circular locking dependency detected ]
      2.6.28-rc2-mm1 #2
      -------------------------------------------------------
      lvm/1103 is trying to acquire lock:
       (&cpu_hotplug.lock){--..}, at: [<c0130789>] get_online_cpus+0x29/0x50
      
      but task is already holding lock:
       (&mm->mmap_sem){----}, at: [<c01878ae>] sys_mlockall+0x4e/0xb0
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #3 (&mm->mmap_sem){----}:
             [<c0153da2>] check_noncircular+0x82/0x110
             [<c0185e6a>] might_fault+0x4a/0xa0
             [<c0156161>] validate_chain+0xb11/0x1070
             [<c0185e6a>] might_fault+0x4a/0xa0
             [<c0156923>] __lock_acquire+0x263/0xa10
             [<c015714c>] lock_acquire+0x7c/0xb0			(*) grab mmap_sem
             [<c0185e6a>] might_fault+0x4a/0xa0
             [<c0185e9b>] might_fault+0x7b/0xa0
             [<c0185e6a>] might_fault+0x4a/0xa0
             [<c0294dd0>] copy_to_user+0x30/0x60
             [<c01ae3ec>] filldir+0x7c/0xd0
             [<c01e3a6a>] sysfs_readdir+0x11a/0x1f0			(*) grab sysfs_mutex
             [<c01ae370>] filldir+0x0/0xd0
             [<c01ae370>] filldir+0x0/0xd0
             [<c01ae4c6>] vfs_readdir+0x86/0xa0			(*) grab i_mutex
             [<c01ae75b>] sys_getdents+0x6b/0xc0
             [<c010355a>] syscall_call+0x7/0xb
             [<ffffffff>] 0xffffffff
      
      -> #2 (sysfs_mutex){--..}:
             [<c0153da2>] check_noncircular+0x82/0x110
             [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
             [<c0156161>] validate_chain+0xb11/0x1070
             [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
             [<c0156923>] __lock_acquire+0x263/0xa10
             [<c015714c>] lock_acquire+0x7c/0xb0			(*) grab sysfs_mutex
             [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
             [<c04f8b55>] mutex_lock_nested+0xa5/0x2f0
             [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
             [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
             [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
             [<c01e422f>] create_dir+0x3f/0x90
             [<c01e42a9>] sysfs_create_dir+0x29/0x50
             [<c04faaf5>] _spin_unlock+0x25/0x40
             [<c028f21d>] kobject_add_internal+0xcd/0x1a0
             [<c028f37a>] kobject_set_name_vargs+0x3a/0x50
             [<c028f41d>] kobject_init_and_add+0x2d/0x40
             [<c019d4d2>] sysfs_slab_add+0xd2/0x180
             [<c019d580>] sysfs_add_func+0x0/0x70
             [<c019d5dc>] sysfs_add_func+0x5c/0x70			(*) grab slub_lock
             [<c01400f2>] run_workqueue+0x172/0x200
             [<c014008f>] run_workqueue+0x10f/0x200
             [<c0140bd0>] worker_thread+0x0/0xf0
             [<c0140c6c>] worker_thread+0x9c/0xf0
             [<c0143c80>] autoremove_wake_function+0x0/0x50
             [<c0140bd0>] worker_thread+0x0/0xf0
             [<c0143972>] kthread+0x42/0x70
             [<c0143930>] kthread+0x0/0x70
             [<c01042db>] kernel_thread_helper+0x7/0x1c
             [<ffffffff>] 0xffffffff
      
      -> #1 (slub_lock){----}:
             [<c0153d2d>] check_noncircular+0xd/0x110
             [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0
             [<c0156161>] validate_chain+0xb11/0x1070
             [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0
             [<c015433d>] mark_lock+0x35d/0xd00
             [<c0156923>] __lock_acquire+0x263/0xa10
             [<c015714c>] lock_acquire+0x7c/0xb0
             [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0
             [<c04f93a3>] down_read+0x43/0x80
             [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0		(*) grab slub_lock
             [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0
             [<c04fd9ac>] notifier_call_chain+0x3c/0x70
             [<c04f5454>] _cpu_up+0x84/0x110
             [<c04f552b>] cpu_up+0x4b/0x70				(*) grab cpu_hotplug.lock
             [<c06d1530>] kernel_init+0x0/0x170
             [<c06d15e5>] kernel_init+0xb5/0x170
             [<c06d1530>] kernel_init+0x0/0x170
             [<c01042db>] kernel_thread_helper+0x7/0x1c
             [<ffffffff>] 0xffffffff
      
      -> #0 (&cpu_hotplug.lock){--..}:
             [<c0155bff>] validate_chain+0x5af/0x1070
             [<c040f7e0>] dev_status+0x0/0x50
             [<c0156923>] __lock_acquire+0x263/0xa10
             [<c015714c>] lock_acquire+0x7c/0xb0
             [<c0130789>] get_online_cpus+0x29/0x50
             [<c04f8b55>] mutex_lock_nested+0xa5/0x2f0
             [<c0130789>] get_online_cpus+0x29/0x50
             [<c0130789>] get_online_cpus+0x29/0x50
             [<c017bc30>] lru_add_drain_per_cpu+0x0/0x10
             [<c0130789>] get_online_cpus+0x29/0x50			(*) grab cpu_hotplug.lock
             [<c0140cf2>] schedule_on_each_cpu+0x32/0xe0
             [<c0187095>] __mlock_vma_pages_range+0x85/0x2c0
             [<c0156945>] __lock_acquire+0x285/0xa10
             [<c0188f09>] vma_merge+0xa9/0x1d0
             [<c0187450>] mlock_fixup+0x180/0x200
             [<c0187548>] do_mlockall+0x78/0x90			(*) grab mmap_sem
             [<c01878e1>] sys_mlockall+0x81/0xb0
             [<c010355a>] syscall_call+0x7/0xb
             [<ffffffff>] 0xffffffff
      
      other info that might help us debug this:
      
      1 lock held by lvm/1103:
       #0:  (&mm->mmap_sem){----}, at: [<c01878ae>] sys_mlockall+0x4e/0xb0
      
      stack backtrace:
      Pid: 1103, comm: lvm Not tainted 2.6.28-rc2-mm1 #2
      Call Trace:
       [<c01555fc>] print_circular_bug_tail+0x7c/0xd0
       [<c0155bff>] validate_chain+0x5af/0x1070
       [<c040f7e0>] dev_status+0x0/0x50
       [<c0156923>] __lock_acquire+0x263/0xa10
       [<c015714c>] lock_acquire+0x7c/0xb0
       [<c0130789>] get_online_cpus+0x29/0x50
       [<c04f8b55>] mutex_lock_nested+0xa5/0x2f0
       [<c0130789>] get_online_cpus+0x29/0x50
       [<c0130789>] get_online_cpus+0x29/0x50
       [<c017bc30>] lru_add_drain_per_cpu+0x0/0x10
       [<c0130789>] get_online_cpus+0x29/0x50
       [<c0140cf2>] schedule_on_each_cpu+0x32/0xe0
       [<c0187095>] __mlock_vma_pages_range+0x85/0x2c0
       [<c0156945>] __lock_acquire+0x285/0xa10
       [<c0188f09>] vma_merge+0xa9/0x1d0
       [<c0187450>] mlock_fixup+0x180/0x200
       [<c0187548>] do_mlockall+0x78/0x90
       [<c01878e1>] sys_mlockall+0x81/0xb0
       [<c010355a>] syscall_call+0x7/0xb
      Signed-off-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Tested-by: default avatarKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8891d6da
    • Masami Hiramatsu's avatar
      kprobes: disable preempt for module_text_address() and kernel_text_address() · a189d035
      Masami Hiramatsu authored
      __register_kprobe() can be preempted after checking probing address but
      before module_text_address() or try_module_get(), and in this interval
      the module can be unloaded.  In that case, try_module_get(probed_mod)
      will access to invalid address, or kprobe will probe invalid address.
      
      This patch uses preempt_disable() to protect it and uses
      __module_text_address() and __kernel_text_address().
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a189d035
    • Li Zefan's avatar
      freezer_cg: disable writing freezer.state of root cgroup · 3b1b3f6e
      Li Zefan authored
      With this change, control file 'freezer.state' doesn't exist in root
      cgroup, making root cgroup unfreezable.
      
      I think it's reasonable to disallow freeze tasks in the root cgroup.  And
      then we can avoid fork overhead when freezer subsystem is compiled but not
      used.
      
      Also make writing invalid value to freezer.state returns EINVAL rather
      than EIO.  This is more consistent with other cgroup subsystem.
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: default avatarPaul Menage <menage@google.com>
      Cc: Cedric Le Goater <clg@fr.ibm.com>
      Cc: Paul Menage <menage@google.com>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Cc: "Serge E. Hallyn" <serue@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3b1b3f6e
    • Li Zefan's avatar
      freezer_cg: remove task_lock from freezer_fork() · 68744676
      Li Zefan authored
      In theory the task can be moved to another cgroup and the freezer will be
      freed right after task_lock is dropped, so the lock results in zero
      protection.
      
      But in the case of freezer_fork() no lock is needed, since the task is not
      in tasklist yet so it won't be moved to another cgroup, so task->cgroups
      won't be changed or invalidated.
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Cc: Cedric Le Goater <clg@fr.ibm.com>
      Cc: "Serge E. Hallyn" <serue@us.ibm.com>
      Cc: Paul Menage <menage@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      68744676
    • John Linn's avatar
      GPIO: add new Xilinx driver for powerpc · 0bcb6069
      John Linn authored
      This driver supports the Xilinx XPS GPIO IP core which has the typical
      GPIO features.
      Signed-off-by: default avatarKiran Sutariya <kirans@xilinx.com>
      Signed-off-by: default avatarJohn Linn <john.linn@xilinx.com>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Kumar Gala <galak@gate.crashing.org>
      Cc: "Grant Likely" <grant.likely@secretlab.ca>
      Cc: <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0bcb6069
    • David Rientjes's avatar
      cpusets: update mems allowed in page allocator · e33c3b5e
      David Rientjes authored
      If all allowable memory is unreclaimable, it is possible to loop forever
      in the page allocator for ~__GFP_NORETRY allocations.
      
      During this time, it is also possible for a task's cpuset to expand its
      set of allowable nodes so that it now includes free memory.  The cached
      copy of this set, current->mems_allowed, is stale, however, since there
      has not been a subsequent call to cpuset_update_task_memory_state().
      
      The cached copy of the set of allowable nodes is now updated in the page
      allocator's slow path so the additional memory is available to
      get_page_from_freelist().
      
      [akpm@linux-foundation.org: add comment]
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Paul Menage <menage@google.com>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e33c3b5e
    • Darrick J. Wong's avatar
      i5000-edac: hold reference to mci kobject · f0f7e0dc
      Darrick J. Wong authored
      It turns out that edac_mc_del_mc will kobject_put the last kref on the
      mci object.
      
      If the timing is just right, that means that the mci object is freed
      before before i5000_remove_one has a chance to free the resources
      associated with it, causing a null pointer exceptions when unloading the
      driver.  Insert a kobject_{get,put} pair so that this doesn't happen.
      Signed-off-by: default avatarDarrick J. Wong <djwong@us.ibm.com>
      Cc: Doug Thompson <norsk5@yahoo.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f0f7e0dc
    • Darrick J. Wong's avatar
      Fix platform drivers that crash on suspend/resume · fe2d5ffc
      Darrick J. Wong authored
      It turns out that if one registers a struct platform_device, the
      platform device code expects that platform_device.device->driver points
      to a struct driver inside a struct platform_driver.
      
      This is not the case with the ipmi-si, ipmi-msghandler and ibmaem
      drivers, which causes the suspend/resume hook functions to jump off into
      nowhere, causing a crash.  Make this assumption hold true for these
      three drivers.
      Signed-off-by: default avatarDarrick J. Wong <djwong@us.ibm.com>
      Acked-by: default avatarCorey Minyard <cminyard@mvista.com>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fe2d5ffc
    • Nicolas Ferre's avatar
      atmel_lcdfb: change irq_base definition to allow error reporting · 722faccc
      Nicolas Ferre authored
      Changed because old the definition of unsigned long cannot be negative.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Reported-by: default avatarRoel Kluin <roel.kluin@gmail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Andrew Victor <linux@maxim.org.za>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      722faccc
    • Henrik Rydberg's avatar
      hwmon: applesmc: add support for Macbook 4 · 468cc032
      Henrik Rydberg authored
      This patch adds accelerometer and temperature sensor support for Macbook 4.
      Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
      Cc: Nicolas Boichat <nicolas@boichat.ch
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      468cc032
    • Adam Litke's avatar
      hugetlb: make unmap_ref_private multi-size-aware · 7526674d
      Adam Litke authored
      Oops.  Part of the hugetlb private reservation code was not fully
      converted to use hstates.
      
      When a huge page must be unmapped from VMAs due to a failed COW,
      HPAGE_SIZE is used in the call to unmap_hugepage_range() regardless of
      the page size being used.  This works if the VMA is using the default
      huge page size.  Otherwise we might unmap too much, too little, or
      trigger a BUG_ON.  Rare but serious -- fix it.
      Signed-off-by: default avatarAdam Litke <agl@us.ibm.com>
      Cc: Jon Tollefson <kniht@linux.vnet.ibm.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7526674d
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · b5f1f555
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        bnx2: fix poll_controller to pass proper structures and check all rx queues
        niu: Fix readq implementation when architecture does not provide one.
        hostap: pad the skb->cb usage in lieu of a proper fix
        rtl8187 : support for Sitecom WL-168 0001 v4
        mac80211: fix notify_mac function
        rtl8187: Add Abocom USB ID
        net: put_cmsg_compat + SO_TIMESTAMP[NS]: use same name for value as caller
        tcp_htcp: last_cong bug fix
        [netdrvr] smc911x: fix for driver resume (and compilation warning)
        RDMA/cxgb3: deadlock in iw_cxgb3 can cause hang when configuring interface.
        cxgb3 - Limit multiqueue setting to msi-x
        cxgb3 - eeprom read fixes
        myri10ge: fix stop/go ordering even more
      b5f1f555
    • Neil Horman's avatar
      bnx2: fix poll_controller to pass proper structures and check all rx queues · b2af2c1d
      Neil Horman authored
      Fix bnx2 so that netpoll works properly.  Specifically:
      
      1) Fix parameters to bnx2_interrupt to be a struct bnx2_napi rather than a
      struct net_device
      
      2) Fix poll_controller method to check every queue in the rx case so frames
      aren't missed
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b2af2c1d
  2. 12 Nov, 2008 26 commits