1. 25 Oct, 2012 4 commits
    • Jan Kara's avatar
      mm: fix XFS oops due to dirty pages without buffers on s390 · ef5d437f
      Jan Kara authored
      On s390 any write to a page (even from kernel itself) sets architecture
      specific page dirty bit.  Thus when a page is written to via buffered
      write, HW dirty bit gets set and when we later map and unmap the page,
      page_remove_rmap() finds the dirty bit and calls set_page_dirty().
      
      Dirtying of a page which shouldn't be dirty can cause all sorts of
      problems to filesystems.  The bug we observed in practice is that
      buffers from the page get freed, so when the page gets later marked as
      dirty and writeback writes it, XFS crashes due to an assertion
      BUG_ON(!PagePrivate(page)) in page_buffers() called from
      xfs_count_page_state().
      
      Similar problem can also happen when zero_user_segment() call from
      xfs_vm_writepage() (or block_write_full_page() for that matter) set the
      hardware dirty bit during writeback, later buffers get freed, and then
      page unmapped.
      
      Fix the issue by ignoring s390 HW dirty bit for page cache pages of
      mappings with mapping_cap_account_dirty().  This is safe because for
      such mappings when a page gets marked as writeable in PTE it is also
      marked dirty in do_wp_page() or do_page_fault().  When the dirty bit is
      cleared by clear_page_dirty_for_io(), the page gets writeprotected in
      page_mkclean().  So pagecache page is writeable if and only if it is
      dirty.
      
      Thanks to Hugh Dickins for pointing out mapping has to have
      mapping_cap_account_dirty() for things to work and proposing a cleaned
      up variant of the patch.
      
      The patch has survived about two hours of running fsx-linux on tmpfs
      while heavily swapping and several days of running on out build machines
      where the original problem was triggered.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: <stable@vger.kernel.org>		[3.0+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ef5d437f
    • Linus Torvalds's avatar
      Merge tag 'spi-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc · 4864ccbb
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A bunch of fixes here, mostly minor except for the pl022 which has
        just been a bit of a shambles all round, the recent runtime PM changes
        have as far as I can tell never worked so they're just getting thrown
        out."
      
      * tag 'spi-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc:
        spi/pl022: Revert recent runtime PM changes
        spi: tsc2005: delete soon-obsolete e-mail address
        spi: spi-rspi: fix build error for the latest shdma driver
      4864ccbb
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 735f0a98
      Linus Torvalds authored
      Pull IOMMU fixes from Joerg Roedel:
       "Two fixes this time:
      
         1. Another fix for a broken BIOS to detect when AMD IOMMU interrupt
            remapping can not work reliably
         2. Typo fix for NVidia IOMMU driver"
      
      * tag 'iommu-fixes-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/tegra: smmu: Fix deadly typo
        iommu/amd: Work around wrong IOAPIC device-id in IVRS table
      735f0a98
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 99103f77
      Linus Torvalds authored
      Pull pinctrl fixes from Linus Walleij:
       "This fixes a few pinctrl problems seen since v3.7-rc1:
         - Section tagging for init code
         - Use proper pointers to lookup struct device * in the bcm2835
           (a.k.a.  Raspberry Pi)
         - Remove duplicate #includes
         - Fix bad return values in errorpath
         - Remove extraneous pull function from the sirf driver causing build
           errors
         - Provide compilation stubs for the Nomadik pinctrl driver when used
           with legacy systems without PRCMU units
         - Various irqdomain fixes in the Nomadik driver as predicted
         - Various smallish bugs in the Tegra driver, most also targeted for
           stable
         - Removed a deadlocking mutex in the groups debugfs show function"
      
      * tag 'pinctrl-v3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl/nomadik: pass DT node to the irqdomain
        pinctrl/nomadik: use zero as default irq_start
        pinctrl: fix missing unlock on error in pinctrl_groups_show()
        pinctrl/nomadik: use irq_create_mapping()
        pinctrl: remove mutex lock in groups show
        pinctrl: tegra: correct bank for pingroup and drv pingroup
        pinctrl: tegra: set low power mode bank width to 2
        dt: Document: correct tegra20/30 pinctrl slew-rate name
      99103f77
  2. 24 Oct, 2012 16 commits
  3. 23 Oct, 2012 18 commits
  4. 22 Oct, 2012 2 commits
    • Lukas Czerner's avatar
      ext4: Avoid underflow in ext4_trim_fs() · 5de35e8d
      Lukas Czerner authored
      Currently if len argument in ext4_trim_fs() is smaller than one block,
      the 'end' variable underflow. Avoid that by returning EINVAL if len is
      smaller than file system block.
      
      Also remove useless unlikely().
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      5de35e8d
    • Sasha Levin's avatar
      KVM guest: exit idleness when handling KVM_PV_REASON_PAGE_NOT_PRESENT · c5e015d4
      Sasha Levin authored
      KVM_PV_REASON_PAGE_NOT_PRESENT kicks cpu out of idleness, but we haven't
      marked that spot as an exit from idleness.
      
      Not doing so can cause RCU warnings such as:
      
      [  732.788386] ===============================
      [  732.789803] [ INFO: suspicious RCU usage. ]
      [  732.790032] 3.7.0-rc1-next-20121019-sasha-00002-g6d8d02d-dirty #63 Tainted: G        W
      [  732.790032] -------------------------------
      [  732.790032] include/linux/rcupdate.h:738 rcu_read_lock() used illegally while idle!
      [  732.790032]
      [  732.790032] other info that might help us debug this:
      [  732.790032]
      [  732.790032]
      [  732.790032] RCU used illegally from idle CPU!
      [  732.790032] rcu_scheduler_active = 1, debug_locks = 1
      [  732.790032] RCU used illegally from extended quiescent state!
      [  732.790032] 2 locks held by trinity-child31/8252:
      [  732.790032]  #0:  (&rq->lock){-.-.-.}, at: [<ffffffff83a67528>] __schedule+0x178/0x8f0
      [  732.790032]  #1:  (rcu_read_lock){.+.+..}, at: [<ffffffff81152bde>] cpuacct_charge+0xe/0x200
      [  732.790032]
      [  732.790032] stack backtrace:
      [  732.790032] Pid: 8252, comm: trinity-child31 Tainted: G        W    3.7.0-rc1-next-20121019-sasha-00002-g6d8d02d-dirty #63
      [  732.790032] Call Trace:
      [  732.790032]  [<ffffffff8118266b>] lockdep_rcu_suspicious+0x10b/0x120
      [  732.790032]  [<ffffffff81152c60>] cpuacct_charge+0x90/0x200
      [  732.790032]  [<ffffffff81152bde>] ? cpuacct_charge+0xe/0x200
      [  732.790032]  [<ffffffff81158093>] update_curr+0x1a3/0x270
      [  732.790032]  [<ffffffff81158a6a>] dequeue_entity+0x2a/0x210
      [  732.790032]  [<ffffffff81158ea5>] dequeue_task_fair+0x45/0x130
      [  732.790032]  [<ffffffff8114ae29>] dequeue_task+0x89/0xa0
      [  732.790032]  [<ffffffff8114bb9e>] deactivate_task+0x1e/0x20
      [  732.790032]  [<ffffffff83a67c29>] __schedule+0x879/0x8f0
      [  732.790032]  [<ffffffff8117e20d>] ? trace_hardirqs_off+0xd/0x10
      [  732.790032]  [<ffffffff810a37a5>] ? kvm_async_pf_task_wait+0x1d5/0x2b0
      [  732.790032]  [<ffffffff83a67cf5>] schedule+0x55/0x60
      [  732.790032]  [<ffffffff810a37c4>] kvm_async_pf_task_wait+0x1f4/0x2b0
      [  732.790032]  [<ffffffff81139e50>] ? abort_exclusive_wait+0xb0/0xb0
      [  732.790032]  [<ffffffff81139c25>] ? prepare_to_wait+0x25/0x90
      [  732.790032]  [<ffffffff810a3a66>] do_async_page_fault+0x56/0xa0
      [  732.790032]  [<ffffffff83a6a6e8>] async_page_fault+0x28/0x30
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Acked-by: default avatarGleb Natapov <gleb@redhat.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      c5e015d4