1. 17 Oct, 2013 2 commits
    • Rusty Russell's avatar
      virtio_config: introduce size-based accessors. · 0b90d062
      Rusty Russell authored
      This lets the us do endian conversion if necessary, and insulates the
      drivers from that change.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      0b90d062
    • Rusty Russell's avatar
      virtio_ring: plug kmemleak false positive. · bb478d8b
      Rusty Russell authored
      unreferenced object 0xffff88003d467e20 (size 32):
        comm "softirq", pid 0, jiffies 4295197765 (age 6.364s)
        hex dump (first 32 bytes):
          28 19 bf 3d 00 00 00 00 0c 00 00 00 01 00 01 00  (..=............
          02 dc 51 3c 00 00 00 00 56 00 00 00 00 00 00 00  ..Q<....V.......
        backtrace:
          [<ffffffff8152db19>] kmemleak_alloc+0x59/0xc0
          [<ffffffff81102e93>] __kmalloc+0xf3/0x180
          [<ffffffff812db5d6>] vring_add_indirect+0x36/0x280
          [<ffffffff812dc59f>] virtqueue_add_outbuf+0xbf/0x4e0
          [<ffffffff813a8b30>] start_xmit+0x1a0/0x3b0
          [<ffffffff81445861>] dev_hard_start_xmit+0x2d1/0x4d0
          [<ffffffff81460052>] sch_direct_xmit+0xf2/0x1c0
          [<ffffffff81445c28>] dev_queue_xmit+0x1c8/0x460
          [<ffffffff814e3187>] ip6_finish_output2+0x1d7/0x470
          [<ffffffff814e34b0>] ip6_finish_output+0x90/0xb0
          [<ffffffff814e3507>] ip6_output+0x37/0xb0
          [<ffffffff815021eb>] igmp6_send+0x2db/0x470
          [<ffffffff81502645>] igmp6_timer_handler+0x95/0xa0
          [<ffffffff8104b57c>] call_timer_fn+0x2c/0x90
          [<ffffffff8104b7ba>] run_timer_softirq+0x1da/0x1f0
          [<ffffffff81045721>] __do_softirq+0xd1/0x1b0
      
      Address gets embedded in a descriptor via virt_to_phys().  See detach_buf,
      which frees it:
      
      	if (vq->vring.desc[i].flags & VRING_DESC_F_INDIRECT)
      		kfree(phys_to_virt(vq->vring.desc[i].addr));
      Reported-by: default avatarChristoph Paasch <christoph.paasch@uclouvain.be>
      Fix-suggested-by: default avatarChristoph Paasch <christoph.paasch@uclouvain.be>
      Typing-done-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      bb478d8b
  2. 23 Sep, 2013 2 commits
    • Aaron Lu's avatar
      virtio: pm: use CONFIG_PM_SLEEP instead of CONFIG_PM · 89107000
      Aaron Lu authored
      The freeze and restore functions defined in virtio drivers are used
      for suspend and hibernate, so CONFIG_PM_SLEEP is more appropriate than
      CONFIG_PM. This patch replace all CONFIG_PM with CONFIG_PM_SLEEP for
      virtio drivers that implement freeze and restore callbacks.
      Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
      Reviewed-by: default avatarAmit Shah <amit.shah@redhat.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      89107000
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · d8524ae9
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       - some small fixes for msm and exynos
       - a regression revert affecting nouveau users with old userspace
       - intel pageflip deadlock and gpu hang fixes, hsw modesetting hangs
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (22 commits)
        Revert "drm: mark context support as a legacy subsystem"
        drm/i915: Don't enable the cursor on a disable pipe
        drm/i915: do not update cursor in crtc mode set
        drm/exynos: fix return value check in lowlevel_buffer_allocate()
        drm/exynos: Fix address space warnings in exynos_drm_fbdev.c
        drm/exynos: Fix address space warning in exynos_drm_buf.c
        drm/exynos: Remove redundant OF dependency
        drm/msm: drop unnecessary set_need_resched()
        drm/i915: kill set_need_resched
        drm/msm: fix potential NULL pointer dereference
        drm/i915/dvo: set crtc timings again for panel fixed modes
        drm/i915/sdvo: Robustify the dtd<->drm_mode conversions
        drm/msm: workaround for missing irq
        drm/msm: return -EBUSY if bo still active
        drm/msm: fix return value check in ERR_PTR()
        drm/msm: fix cmdstream size check
        drm/msm: hangcheck harder
        drm/msm: handle read vs write fences
        drm/i915/sdvo: Fully translate sync flags in the dtd->mode conversion
        drm/i915: Use proper print format for debug prints
        ...
      d8524ae9
  3. 22 Sep, 2013 3 commits
    • Linus Torvalds's avatar
      Merge branch 'for-3.12/core' of git://git.kernel.dk/linux-block · 68cf8d0c
      Linus Torvalds authored
      Pull block IO fixes from Jens Axboe:
       "After merge window, no new stuff this time only a collection of neatly
        confined and simple fixes"
      
      * 'for-3.12/core' of git://git.kernel.dk/linux-block:
        cfq: explicitly use 64bit divide operation for 64bit arguments
        block: Add nr_bios to block_rq_remap tracepoint
        If the queue is dying then we only call the rq->end_io callout. This leaves bios setup on the request, because the caller assumes when the blk_execute_rq_nowait/blk_execute_rq call has completed that the rq->bios have been cleaned up.
        bio-integrity: Fix use of bs->bio_integrity_pool after free
        blkcg: relocate root_blkg setting and clearing
        block: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
        block: trace all devices plug operation
      68cf8d0c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 0fbf2cc9
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "These are mostly bug fixes and a two small performance fixes.  The
        most important of the bunch are Josef's fix for a snapshotting
        regression and Mark's update to fix compile problems on arm"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (25 commits)
        Btrfs: create the uuid tree on remount rw
        btrfs: change extent-same to copy entire argument struct
        Btrfs: dir_inode_operations should use btrfs_update_time also
        btrfs: Add btrfs: prefix to kernel log output
        btrfs: refuse to remount read-write after abort
        Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0
        Btrfs: don't leak transaction in btrfs_sync_file()
        Btrfs: add the missing mutex unlock in write_all_supers()
        Btrfs: iput inode on allocation failure
        Btrfs: remove space_info->reservation_progress
        Btrfs: kill delay_iput arg to the wait_ordered functions
        Btrfs: fix worst case calculator for space usage
        Revert "Btrfs: rework the overcommit logic to be based on the total size"
        Btrfs: improve replacing nocow extents
        Btrfs: drop dir i_size when adding new names on replay
        Btrfs: replay dir_index items before other items
        Btrfs: check roots last log commit when checking if an inode has been logged
        Btrfs: actually log directory we are fsync()'ing
        Btrfs: actually limit the size of delalloc range
        Btrfs: allocate the free space by the existed max extent size when ENOSPC
        ...
      0fbf2cc9
    • Anatol Pomozov's avatar
      cfq: explicitly use 64bit divide operation for 64bit arguments · f3cff25f
      Anatol Pomozov authored
      'samples' is 64bit operant, but do_div() second parameter is 32.
      do_div silently truncates high 32 bits and calculated result
      is invalid.
      
      In case if low 32bit of 'samples' are zeros then do_div() produces
      kernel crash.
      Signed-off-by: default avatarAnatol Pomozov <anatol.pomozov@gmail.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f3cff25f
  4. 21 Sep, 2013 28 commits
  5. 20 Sep, 2013 5 commits
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 2457aaf7
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
      
       1) Four fixes for cpufreq regressions introduced by the changes that
          removed Device Tree parsing for CPU device nodes from cpufreq
          drivers from Sudeep KarkadaNagesha.
      
       2) Two fixes for recent cpufreq regressions introduced by changes
          related to the preservation of sysfs attributes over system
          suspend/resume cycles from Viresh Kumar.
      
       3) Fix for ACPI-based wakeup signaling in the PCI subsystem that
          fails to stop PME polling for devices put into the D3cold power
          state from Rafael J Wysocki.
      
       4) Fix for bad interactions between cpufreq and udev on systems
          supporting intel_pstate where acpi-cpufreq is available as well
          from Yinghai Lu.
      
      * tag 'pm+acpi-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: return EEXIST instead of EBUSY for second registering
        PCI / ACPI / PM: Clear pme_poll for devices in D3cold on wakeup
        ARM: shmobile: change dev_id to cpu0 while registering cpu clock
        ARM: i.MX: change dev_id to cpu0 while registering cpu clock
        cpufreq: imx6q-cpufreq: assign cpu_dev correctly to cpu0 device
        cpufreq: cpufreq-cpu0: assign cpu_dev correctly to cpu0 device
        cpufreq: unlock correct rwsem while updating policy->cpu
        cpufreq: Clear policy->cpus bits in __cpufreq_remove_dev_finish()
      2457aaf7
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · d45004f9
      Linus Torvalds authored
      Pull vhost updates from Michael Tsirkin:
       "vhost: minor changes on top of 3.12-rc1
      
        This fixes module loading for vhost-scsi, and tweaks locking in vhost
        core a bit.  Both of these are not exactly release blockers but it's
        early in the cycle so I think it's a good idea to apply them now"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vhost-scsi: whitespace tweak
        vhost/scsi: use vmalloc for order-10 allocation
        vhost: wake up worker outside spin_lock
      d45004f9
    • David Howells's avatar
      CacheFiles: Don't try to dump the index key if the cookie has been cleared · 509bf24d
      David Howells authored
      Don't try to dump the index key that distinguishes an object if netfs
      data in the cookie the object refers to has been cleared (ie.  the
      cookie has passed most of the way through
      __fscache_relinquish_cookie()).
      
      Since the netfs holds the index key, we can't get at it once the ->def
      and ->netfs_data pointers have been cleared - and a NULL pointer
      exception will ensue, usually just after a:
      
      	CacheFiles: Error: Unexpected object collision
      
      error is reported.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      509bf24d
    • Josh Boyer's avatar
      CacheFiles: Fix memory leak in cachefiles_check_auxdata error paths · 607566ae
      Josh Boyer authored
      In cachefiles_check_auxdata(), we allocate auxbuf but fail to free it if
      we determine there's an error or that the data is stale.
      
      Further, assigning the output of vfs_getxattr() to auxbuf->len gives
      problems with checking for errors as auxbuf->len is a u16.  We don't
      actually need to set auxbuf->len, so keep the length in a variable for
      now.  We shouldn't need to check the upper limit of the buffer as an
      overflow there should be indicated by -ERANGE.
      
      While we're at it, fscache_check_aux() returns an enum value, not an
      int, so assign it to an appropriately typed variable rather than to ret.
      Signed-off-by: default avatarJosh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Hongyi Jia <jiayisuse@gmail.com>
      cc: Milosz Tanski <milosz@adfin.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      607566ae
    • Will Deacon's avatar
      lockref: use cmpxchg64 explicitly for lockless updates · 8f4c3446
      Will Deacon authored
      The cmpxchg() function tends not to support 64-bit arguments on 32-bit
      architectures.  This could be either due to use of unsigned long
      arguments (like on ARM) or lack of instruction support (cmpxchgq on
      x86).  However, these architectures may implement a specific cmpxchg64()
      function to provide 64-bit cmpxchg support instead.
      
      Since the lockref code requires a 64-bit cmpxchg and relies on the
      architecture selecting ARCH_USE_CMPXCHG_LOCKREF, move to using cmpxchg64
      instead of cmpxchg and allow 32-bit architectures to make use of the
      lockless lockref implementation.
      
      Cc: Waiman Long <Waiman.Long@hp.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8f4c3446