1. 21 Aug, 2013 1 commit
    • Li Zhong's avatar
      cpufreq: fix bad unlock balance on !CONFIG_SMP · 5025d628
      Li Zhong authored
      This patch tries to fix lockdep complaint attached below.
      
      It seems that we should always read acquire the cpufreq_rwsem,
      whether CONFIG_SMP is enabled or not.  And CONFIG_HOTPLUG_CPU
      depends on CONFIG_SMP, so it seems we don't need CONFIG_SMP for the
      code enabled by CONFIG_HOTPLUG_CPU.
      
      [    0.504191] =====================================
      [    0.504627] [ BUG: bad unlock balance detected! ]
      [    0.504627] 3.11.0-rc6-next-20130819 #1 Not tainted
      [    0.504627] -------------------------------------
      [    0.504627] swapper/1 is trying to release lock (cpufreq_rwsem) at:
      [    0.504627] [<ffffffff813d927a>] cpufreq_add_dev+0x13a/0x3e0
      [    0.504627] but there are no more locks to release!
      [    0.504627]
      [    0.504627] other info that might help us debug this:
      [    0.504627] 1 lock held by swapper/1:
      [    0.504627]  #0:  (subsys mutex#4){+.+.+.}, at: [<ffffffff8134a7bf>] subsys_interface_register+0x4f/0xe0
      [    0.504627]
      [    0.504627] stack backtrace:
      [    0.504627] CPU: 0 PID: 1 Comm: swapper Not tainted 3.11.0-rc6-next-20130819 #1
      [    0.504627] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
      [    0.504627]  ffffffff813d927a ffff88007f847c98 ffffffff814c062b ffff88007f847cc8
      [    0.504627]  ffffffff81098bce ffff88007f847cf8 ffffffff81aadc30 ffffffff813d927a
      [    0.504627]  00000000ffffffff ffff88007f847d68 ffffffff8109d0be 0000000000000006
      [    0.504627] Call Trace:
      [    0.504627]  [<ffffffff813d927a>] ? cpufreq_add_dev+0x13a/0x3e0
      [    0.504627]  [<ffffffff814c062b>] dump_stack+0x19/0x1b
      [    0.504627]  [<ffffffff81098bce>] print_unlock_imbalance_bug+0xfe/0x110
      [    0.504627]  [<ffffffff813d927a>] ? cpufreq_add_dev+0x13a/0x3e0
      [    0.504627]  [<ffffffff8109d0be>] lock_release_non_nested+0x1ee/0x310
      [    0.504627]  [<ffffffff81099d0e>] ? mark_held_locks+0xae/0x120
      [    0.504627]  [<ffffffff811510cb>] ? kfree+0xcb/0x1d0
      [    0.504627]  [<ffffffff813d77ea>] ? cpufreq_policy_free+0x4a/0x60
      [    0.504627]  [<ffffffff813d927a>] ? cpufreq_add_dev+0x13a/0x3e0
      [    0.504627]  [<ffffffff8109d2a4>] lock_release+0xc4/0x250
      [    0.504627]  [<ffffffff8106c9f3>] up_read+0x23/0x40
      [    0.504627]  [<ffffffff813d927a>] cpufreq_add_dev+0x13a/0x3e0
      [    0.504627]  [<ffffffff8134a809>] subsys_interface_register+0x99/0xe0
      [    0.504627]  [<ffffffff81b19f3b>] ? cpufreq_gov_dbs_init+0x12/0x12
      [    0.504627]  [<ffffffff813d7f0d>] cpufreq_register_driver+0x9d/0x1d0
      [    0.504627]  [<ffffffff81b19f3b>] ? cpufreq_gov_dbs_init+0x12/0x12
      [    0.504627]  [<ffffffff81b1a039>] acpi_cpufreq_init+0xfe/0x1f8
      [    0.504627]  [<ffffffff810002ba>] do_one_initcall+0xda/0x180
      [    0.504627]  [<ffffffff81ae301e>] kernel_init_freeable+0x12c/0x1bb
      [    0.504627]  [<ffffffff81ae2841>] ? do_early_param+0x8c/0x8c
      [    0.504627]  [<ffffffff814b4dd0>] ? rest_init+0x140/0x140
      [    0.504627]  [<ffffffff814b4dde>] kernel_init+0xe/0xf0
      [    0.504627]  [<ffffffff814d029a>] ret_from_fork+0x7a/0xb0
      [    0.504627]  [<ffffffff814b4dd0>] ? rest_init+0x140/0x140
      Signed-off-by: default avatarLi Zhong <zhong@linux.vnet.ibm.com>
      Acked-and-tested-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5025d628
  2. 20 Aug, 2013 5 commits
  3. 18 Aug, 2013 1 commit
  4. 14 Aug, 2013 9 commits
  5. 12 Aug, 2013 3 commits
  6. 11 Aug, 2013 4 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · e5d081f4
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is three bug fixes: An fnic warning caused by sleeping under a
        lock, a major regression with our updated WRITE SAME/UNMAP logic which
        caused tons of USB devices (and one RAID card) to cease to function
        and a megaraid_sas firmware initialisation problem which causes kdump
        failures"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] Don't attempt to send extended INQUIRY command if skip_vpd_pages is set
        [SCSI] fnic: BUG: sleeping function called from invalid context during probe
        [SCSI] megaraid_sas: megaraid_sas driver init fails in kdump kernel
      e5d081f4
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 77f63b4d
      Linus Torvalds authored
      Pull powerpc fixes from Ben Herrenschmidt:
       "This includes small series from Michael Neuling to fix a couple of
        nasty remaining problems with the new Power8 support, also targeted at
        stable 3.10, without which some new userspace accessible registers
        aren't properly context switched, and in some case, can be clobbered
        by the user of transactional memory.
      
        Along with that, a few slightly more minor things, such as a missing
        Kconfig option to enable handling of denorm exceptions when not
        running under a hypervisor (or userspace will randomly crash when
        hitting denorms with the vector unit), some nasty bugs in the new
        pstore oops code, and other simple bug fixes worth having in now.
      
        Note: I picked up the two powerpc KVM fixes as Alex Graf asked me to
        handle KVM bits while he is on vacation.  However I'll let him decide
        whether they should go to -stable or not when he is back"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/tm: Fix context switching TAR, PPR and DSCR SPRs
        powerpc: Save the TAR register earlier
        powerpc: Fix context switch DSCR on POWER8
        powerpc: Rework setting up H/FSCR bit definitions
        powerpc: Fix hypervisor facility unavaliable vector number
        powerpc/kvm/book3s_pr: Return appropriate error when allocation fails
        powerpc/kvm: Add signed type cast for comparation
        powerpc/eeh: Add missing procfs entry for PowerNV
        powerpc/pseries: Add backward compatibilty to read old kernel oops-log
        powerpc/pseries: Fix buffer overflow when reading from pstore
        powerpc: On POWERNV enable PPC_DENORMALISATION by default
      77f63b4d
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 30b229bd
      Linus Torvalds authored
      Pull s390 kvm fixes from Paolo Bonzini:
       "Two fixes for s390"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: s390: fix pfmf non-quiescing control handling
        KVM: s390: move kvm_guest_enter,exit closer to sie
      30b229bd
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 9e6bdaaa
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Some driver bugfixes for the I2C subsystem"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: mv64xxx: Document the newly introduced allwinner compatible
        i2c: Fix Kontron PLD prescaler calculation
        i2c: i2c-mxs: Use DMA mode even for small transfers
      9e6bdaaa
  7. 10 Aug, 2013 12 commits
  8. 09 Aug, 2013 5 commits
    • Zach Brown's avatar
      btrfs: don't loop on large offsets in readdir · db62efbb
      Zach Brown authored
      When btrfs readdir() hits the last entry it sets the readdir offset to a
      huge value to stop buggy apps from breaking when the same name is
      returned by readdir() with concurrent rename()s.
      
      But unconditionally setting the offset to INT_MAX causes readdir() to
      loop returning any entries with offsets past INT_MAX.  It only takes a
      few hours of constant file creation and removal to create entries past
      INT_MAX.
      
      So let's set the huge offset to LLONG_MAX if the last entry has already
      overflowed 32bit loff_t.   Without large offsets behaviour is identical.
      With large offsets 64bit apps will work and 32bit apps will be no more
      broken than they currently are if they see large offsets.
      Signed-off-by: default avatarZach Brown <zab@redhat.com>
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      db62efbb
    • Josef Bacik's avatar
      Btrfs: check to see if root_list is empty before adding it to dead roots · cfad392b
      Josef Bacik authored
      A user reported a panic when running with autodefrag and deleting snapshots.
      This is because we could end up trying to add the root to the dead roots list
      twice.  To fix this check to see if we are empty before adding ourselves to the
      dead roots list.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      cfad392b
    • Josef Bacik's avatar
      Btrfs: release both paths before logging dir/changed extents · f3b15ccd
      Josef Bacik authored
      The ceph guys tripped over this bug where we were still holding onto the
      original path that we used to copy the inode with when logging.  This is based
      on Chris's fix which was reported to fix the problem.  We need to drop the paths
      in two cases anyway so just move the drop up so that we don't have duplicate
      code.  Thanks,
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      f3b15ccd
    • Josef Bacik's avatar
      Btrfs: allow splitting of hole em's when dropping extent cache · ee20a983
      Josef Bacik authored
      I noticed while running multi-threaded fsync tests that sometimes fsck would
      complain about an improper gap.  This happens because we fail to add a hole
      extent to the file, which was happening when we'd split a hole EM because
      btrfs_drop_extent_cache was just discarding the whole em instead of splitting
      it.  So this patch fixes this by allowing us to split a hole em properly, which
      means that added holes actually get logged properly and we no longer see this
      fsck error.  Thankfully we're tolerant of these sort of problems so a user would
      not see any adverse effects of this bug, other than fsck complaining.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      ee20a983
    • Josef Bacik's avatar
      Btrfs: make sure the backref walker catches all refs to our extent · ed8c4913
      Josef Bacik authored
      Because we don't mess with the offset into the extent for compressed we will
      properly find both extents for this case
      
      [extent a][extent b][rest of extent a]
      
      but because we already added a ref for the front half we won't add the inode
      information for the second half.  This causes us to leak that memory and not
      print out the other offset when we do logical-resolve.  So fix this by calling
      ulist_add_merge and then add our eie to the existing entry if there is one.
      With this patch we get both offsets out of logical-resolve.  With this and the
      other 2 patches I've sent we now pass btrfs/276 on my vm with compress-force=lzo
      set.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      ed8c4913