1. 05 Nov, 2014 11 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-fixes-for-3.18b' of... · bce20b23
      Greg Kroah-Hartman authored
      Merge tag 'iio-fixes-for-3.18b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
      
      Jonathan writes:
      
      Second round of IIO fixes for the 3.18 cycle.
      
      * tsl4531 - fix a compile error when CONFIG_PM_OPS not set.
      * kxcjk-1013 - event spec direction was invalid - leading to 'interesting'
        attrribute names.
      * as3935 - sizeof(st) used instead of sizeof(*st) leading to allocation of
        space for a pointer rather than the structure desired.
      * ade7758 - Another null pointer deref fix due to different channels
        being provided to the the buffer register than used for the sysfs
        side of things.
      * ade7758 - Check there is a channel enabled in preenable for the buffer
        before doing anything.
      * ade7758 - Drop a stray raw from the channel name that leads to _raw_raw
        postfix.
      bce20b23
    • Lars-Peter Clausen's avatar
      staging:iio:ade7758: Remove "raw" from channel name · b598aacc
      Lars-Peter Clausen authored
      "raw" is a property of a channel, but should not be part of the name of
      channel.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      b598aacc
    • Lars-Peter Clausen's avatar
      staging:iio:ade7758: Fix check if channels are enabled in prenable · 79fa64eb
      Lars-Peter Clausen authored
      We should check if a channel is enabled, not if no channels are enabled.
      
      Fixes: 550268ca ("staging:iio: scrap scan_count and ensure all drivers use active_scan_mask")
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      79fa64eb
    • Lars-Peter Clausen's avatar
      staging:iio:ade7758: Fix NULL pointer deref when enabling buffer · e1055473
      Lars-Peter Clausen authored
      In older versions of the IIO framework it was possible to pass a completely
      different set of channels to iio_buffer_register() as the one that is
      assigned to the IIO device. Commit 959d2952 ("staging:iio: make
      iio_sw_buffer_preenable much more general.") introduced a restriction that
      requires that the set of channels that is passed to iio_buffer_register() is
      a subset of the channels assigned to the IIO device as the IIO core will use
      the list of channels that is assigned to the device to lookup a channel by
      scan index in iio_compute_scan_bytes(). If it can not find the channel the
      function will crash. This patch fixes the issue by making sure that the same
      set of channels is assigned to the IIO device and passed to
      iio_buffer_register().
      
      Note that we need to remove the IIO_CHAN_INFO_RAW and IIO_CHAN_INFO_SCALE
      info attributes from the channels since we don't actually want those to be
      registered.
      
      Fixes the following crash:
      	Unable to handle kernel NULL pointer dereference at virtual address 00000016
      	pgd = d2094000
      	[00000016] *pgd=16e39831, *pte=00000000, *ppte=00000000
      	Internal error: Oops: 17 [#1] PREEMPT SMP ARM
      	Modules linked in:
      	CPU: 1 PID: 1695 Comm: bash Not tainted 3.17.0-06329-g29461ee #9686
      	task: d7768040 ti: d5bd4000 task.ti: d5bd4000
      	PC is at iio_compute_scan_bytes+0x38/0xc0
      	LR is at iio_compute_scan_bytes+0x34/0xc0
      	pc : [<c0316de8>]    lr : [<c0316de4>]    psr: 60070013
      	sp : d5bd5ec0  ip : 00000000  fp : 00000000
      	r10: d769f934  r9 : 00000000  r8 : 00000001
      	r7 : 00000000  r6 : c8fc6240  r5 : d769f800  r4 : 00000000
      	r3 : d769f800  r2 : 00000000  r1 : ffffffff  r0 : 00000000
      	Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      	Control: 18c5387d  Table: 1209404a  DAC: 00000015
      	Process bash (pid: 1695, stack limit = 0xd5bd4240)
      	Stack: (0xd5bd5ec0 to 0xd5bd6000)
      	5ec0: d769f800 d7435640 c8fc6240 d769f984 00000000 c03175a4 d7435690 d7435640
      	5ee0: d769f990 00000002 00000000 d769f800 d5bd4000 00000000 000b43a8 c03177f4
      	5f00: d769f810 0162b8c8 00000002 c8fc7e00 d77f1d08 d77f1da8 c8fc7e00 c01faf1c
      	5f20: 00000002 c010694c c010690c d5bd5f88 00000002 c8fc6840 c8fc684c c0105e08
      	5f40: 00000000 00000000 d20d1580 00000002 000af408 d5bd5f88 c000de84 c00b76d4
      	5f60: d20d1580 000af408 00000002 d20d1580 d20d1580 00000002 000af408 c000de84
      	5f80: 00000000 c00b7a44 00000000 00000000 00000002 b6ebea78 00000002 000af408
      	5fa0: 00000004 c000dd00 b6ebea78 00000002 00000001 000af408 00000002 00000000
      	5fc0: b6ebea78 00000002 000af408 00000004 bee96a4c 000a6094 00000000 000b43a8
      	5fe0: 00000000 bee969cc b6e2eb77 b6e6525c 40070010 00000001 00000000 00000000
      	[<c0316de8>] (iio_compute_scan_bytes) from [<c03175a4>] (__iio_update_buffers+0x248/0x438)
      	[<c03175a4>] (__iio_update_buffers) from [<c03177f4>] (iio_buffer_store_enable+0x60/0x7c)
      	[<c03177f4>] (iio_buffer_store_enable) from [<c01faf1c>] (dev_attr_store+0x18/0x24)
      	[<c01faf1c>] (dev_attr_store) from [<c010694c>] (sysfs_kf_write+0x40/0x4c)
      	[<c010694c>] (sysfs_kf_write) from [<c0105e08>] (kernfs_fop_write+0x110/0x154)
      	[<c0105e08>] (kernfs_fop_write) from [<c00b76d4>] (vfs_write+0xbc/0x170)
      	[<c00b76d4>] (vfs_write) from [<c00b7a44>] (SyS_write+0x40/0x78)
      	[<c00b7a44>] (SyS_write) from [<c000dd00>] (ret_fast_syscall+0x0/0x30)
      
      Fixes: 959d2952 ("staging:iio: make iio_sw_buffer_preenable much more general.")
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      e1055473
    • George McCollister's avatar
      iio: as3935: allocate correct iio_device size · f73cde60
      George McCollister authored
      Signed-off-by: default avatarGeorge McCollister <george.mccollister@gmail.com>
      Acked-by: default avatarHartmut Knaack <knaack.h@gmx.de>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      f73cde60
    • Daniel Baluta's avatar
      io: accel: kxcjk-1013: Fix iio_event_spec direction · 25afffe1
      Daniel Baluta authored
      Because IIO_EV_DIR_* are not bitmasks but enums,
      IIO_EV_DIR_RISING | IIO_EV_DIR_FALLING is not equal
      with IIO_EV_DIR_EITHER.
      
      This could lead to potential misformatted sysfs attributes
      like:
      	* in_accel_x_thresh_(null)_en
      	* in_accel_x_thresh_(null)_period
      	* in_accel_x_thresh_(null)_value
      
      or even memory corruption.
      
      Fixes: b4b491c0 (iio: accel: kxcjk-1013: Support threshold)
      Signed-off-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      25afffe1
    • Dan Murphy's avatar
      iio: tsl4531: Fix compiler error when CONFIG_PM_OPS is not defined · 03045bcf
      Dan Murphy authored
      Fix the compiler error when the CONFIG_PM_OPS flag is not set.
      
      drivers/iio/light/tsl4531.c:235:8: error: ‘tsl4531_suspend’ undeclared here (not in a function)
      drivers/iio/light/tsl4531.c:235:8: error: ‘tsl4531_resume’ undeclared here (not in a function)
      Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      03045bcf
    • Fabio Estevam's avatar
      iio: adc: mxs-lradc: Disable the clock on probe failure · 4748119f
      Fabio Estevam authored
      We should disable lradc->clk in the case of errors in the probe function.
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Reviewed-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      Cc: <Stable@vger.kernel.org>
      4748119f
    • Robin van der Gracht's avatar
      iio: st_sensors: Fix buffer copy · c6b4cac2
      Robin van der Gracht authored
      Use byte_for_channel as iterator to properly initialize the buffer.
      Signed-off-by: default avatarRobin van der Gracht <robin@protonic.nl>
      Acked-by: default avatarDenis Ciocca <denis.ciocca@st.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      Cc: <Stable@vger.kernel.org>
      c6b4cac2
    • Lars-Peter Clausen's avatar
      staging:iio:ad5933: Drop "raw" from channel names · 97fb3033
      Lars-Peter Clausen authored
      "raw" is the name of a channel property, but should not be part of the
      channel name itself.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      97fb3033
    • Lars-Peter Clausen's avatar
      staging:iio:ad5933: Fix NULL pointer deref when enabling buffer · 4a53d3af
      Lars-Peter Clausen authored
      In older versions of the IIO framework it was possible to pass a
      completely different set of channels to iio_buffer_register() as the one
      that is assigned to the IIO device. Commit 959d2952 ("staging:iio: make
      iio_sw_buffer_preenable much more general.") introduced a restriction that
      requires that the set of channels that is passed to iio_buffer_register() is
      a subset of the channels assigned to the IIO device as the IIO core will use
      the list of channels that is assigned to the device to lookup a channel by
      scan index in iio_compute_scan_bytes(). If it can not find the channel the
      function will crash. This patch fixes the issue by making sure that the same
      set of channels is assigned to the IIO device and passed to
      iio_buffer_register().
      
      Fixes the follow NULL pointer derefernce kernel crash:
      	Unable to handle kernel NULL pointer dereference at virtual address 00000016
      	pgd = d53d0000
      	[00000016] *pgd=1534e831, *pte=00000000, *ppte=00000000
      	Internal error: Oops: 17 [#1] PREEMPT SMP ARM
      	Modules linked in:
      	CPU: 1 PID: 1626 Comm: bash Not tainted 3.15.0-19969-g2a180eb-dirty #9545
      	task: d6c124c0 ti: d539a000 task.ti: d539a000
      	PC is at iio_compute_scan_bytes+0x34/0xa8
      	LR is at iio_compute_scan_bytes+0x34/0xa8
      	pc : [<c03052e4>]    lr : [<c03052e4>]    psr: 60070013
      	sp : d539beb8  ip : 00000001  fp : 00000000
      	r10: 00000002  r9 : 00000000  r8 : 00000001
      	r7 : 00000000  r6 : d6dc8800  r5 : d7571000  r4 : 00000002
      	r3 : d7571000  r2 : 00000044  r1 : 00000001  r0 : 00000000
      	Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      	Control: 18c5387d  Table: 153d004a  DAC: 00000015
      	Process bash (pid: 1626, stack limit = 0xd539a240)
      	Stack: (0xd539beb8 to 0xd539c000)
      	bea0:                                                       c02fc0e4 d7571000
      	bec0: d76c1640 d6dc8800 d757117c 00000000 d757112c c0305b04 d76c1690 d76c1640
      	bee0: d7571188 00000002 00000000 d7571000 d539a000 00000000 000dd1c8 c0305d54
      	bf00: d7571010 0160b868 00000002 c69d3900 d7573278 d7573308 c69d3900 c01ece90
      	bf20: 00000002 c0103fac c0103f6c d539bf88 00000002 c69d3b00 c69d3b0c c0103468
      	bf40: 00000000 00000000 d7694a00 00000002 000af408 d539bf88 c000dd84 c00b2f94
      	bf60: d7694a00 000af408 00000002 d7694a00 d7694a00 00000002 000af408 c000dd84
      	bf80: 00000000 c00b32d0 00000000 00000000 00000002 b6f1aa78 00000002 000af408
      	bfa0: 00000004 c000dc00 b6f1aa78 00000002 00000001 000af408 00000002 00000000
      	bfc0: b6f1aa78 00000002 000af408 00000004 be806a4c 000a6094 00000000 000dd1c8
      	bfe0: 00000000 be8069cc b6e8ab77 b6ec125c 40070010 00000001 22940489 154a5007
      	[<c03052e4>] (iio_compute_scan_bytes) from [<c0305b04>] (__iio_update_buffers+0x248/0x438)
      	[<c0305b04>] (__iio_update_buffers) from [<c0305d54>] (iio_buffer_store_enable+0x60/0x7c)
      	[<c0305d54>] (iio_buffer_store_enable) from [<c01ece90>] (dev_attr_store+0x18/0x24)
      	[<c01ece90>] (dev_attr_store) from [<c0103fac>] (sysfs_kf_write+0x40/0x4c)
      	[<c0103fac>] (sysfs_kf_write) from [<c0103468>] (kernfs_fop_write+0x110/0x154)
      	[<c0103468>] (kernfs_fop_write) from [<c00b2f94>] (vfs_write+0xd0/0x160)
      	[<c00b2f94>] (vfs_write) from [<c00b32d0>] (SyS_write+0x40/0x78)
      	[<c00b32d0>] (SyS_write) from [<c000dc00>] (ret_fast_syscall+0x0/0x30)
      	Code: ea00000e e1a01008 e1a00005 ebfff6fc (e5d0a016)
      
      Fixes: 959d2952 ("staging:iio: make iio_sw_buffer_preenable much more general.")
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Cc: Stable@vger.kernel.org
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      4a53d3af
  2. 02 Nov, 2014 19 commits
    • Linus Torvalds's avatar
      Linux 3.18-rc3 · 0df1f248
      Linus Torvalds authored
      0df1f248
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20141102' of git://git.infradead.org/linux-mtd · 81d92dc1
      Linus Torvalds authored
      Pull MTD fixes from Brian Norris:
       "Three main MTD fixes for 3.18:
      
         - A regression from 3.16 which was noticed in 3.17.  With the
           restructuring of the m25p80.c driver and the SPI NOR library
           framework, we omitted proper listing of the SPI device IDs.  This
           means m25p80.c wouldn't auto-load (modprobe) properly when built as
           a module.  For now, we duplicate the device IDs into both modules.
      
         - The OMAP / ELM modules were depending on an implicit link ordering.
           Use deferred probing so that the new link order (in 3.18-rc) can
           still allow for successful probing.
      
         - Fix suspend/resume support for LH28F640BF NOR flash"
      
      * tag 'for-linus-20141102' of git://git.infradead.org/linux-mtd:
        mtd: cfi_cmdset_0001.c: fix resume for LH28F640BF chips
        mtd: omap: fix mtd devices not showing up
        mtd: m25p80,spi-nor: Fix module aliases for m25p80
        mtd: spi-nor: make spi_nor_scan() take a chip type name, not spi_device_id
        mtd: m25p80: get rid of spi_get_device_id
      81d92dc1
    • Linus Torvalds's avatar
      Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · ad2be379
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of six patches consisting of:
         - two MAINTAINER updates
         - two scsi-mq fixs for the old parallel interface (not every request
           is tagged and we need to set the right flags to populate the SPI
           tag message)
         - a fix for a memory leak in scatterlist traversal caused by a
           preallocation update in 3.17
         - an ipv6 fix for cxgbi"
      
      [ The scatterlist fix also came in separately through the block layer tree ]
      
      * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        MAINTAINERS: ufs - remove self
        MAINTAINERS: change hpsa and cciss maintainer
        libcxgbi : support ipv6 address host_param
        scsi: set REQ_QUEUE for the blk-mq case
        Revert "block: all blk-mq requests are tagged"
        lib/scatterlist: fix memory leak with scsi-mq
      ad2be379
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 12267166
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Nothing too astounding or major: radeon, i915, vmwgfx, armada and
        exynos.
      
        Biggest ones:
         - vmwgfx has one big locking regression fix
         - i915 has come displayport fixes
         - radeon has some stability and a memory alloc failure
         - armada and exynos have some vblank fixes"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (24 commits)
        drm/exynos: correct connector->dpms field before resuming
        drm/exynos: enable vblank after DPMS on
        drm/exynos: init kms poll at the end of initialization
        drm/exynos: propagate plane initialization errors
        drm/exynos: vidi: fix build warning
        drm/exynos: remove explicit encoder/connector de-initialization
        drm/exynos: init vblank with real number of crtcs
        drm/vmwgfx: Filter out modes those cannot be supported by the current VRAM size.
        drm/vmwgfx: Fix hash key computation
        drm/vmwgfx: fix lock breakage
        drm/i915/dp: only use training pattern 3 on platforms that support it
        drm/radeon: remove some buggy dead code
        drm/i915: Ignore VBT backlight check on Macbook 2, 1
        drm/radeon: remove invalid pci id
        drm/radeon: dpm fixes for asrock systems
        radeon: clean up coding style differences in radeon_get_bios()
        drm/radeon: Use drm_malloc_ab instead of kmalloc_array
        drm/radeon/dpm: disable ulv support on SI
        drm/i915: Fix GMBUSFREQ on vlv/chv
        drm/i915: Ignore long hpds on eDP ports
        ...
      12267166
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 3c43de0f
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       - add the new bpf syscall to ARM.
       - drop a redundant return statement in __iommu_alloc_remap()
       - fix a performance issue noticed by Thomas Petazzoni with
         kmap_atomic().
       - fix an issue with the L2 cache OF parsing code which caused it to
         incorrectly print warnings on each boot, and make the warning text
         more consistent with the rest of the code
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8180/1: mm: implement no-highmem fast path in kmap_atomic_pfn()
        ARM: 8183/1: l2c: Improve l2c310_of_parse() error message
        ARM: 8181/1: Drop extra return statement
        ARM: 8182/1: l2c: Make l2x0_cache_size_of_parse() return 'int'
        ARM: enable bpf syscall
      3c43de0f
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 7501a533
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "A small set of x86 fixes.  The most serious is an SRCU lockdep fix.
      
        A bit late - needed some time to test the SRCU fix, which only came in
        on Friday"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: vmx: defer load of APIC access page address during reset
        KVM: nVMX: Disable preemption while reading from shadow VMCS
        KVM: x86: Fix far-jump to non-canonical check
        KVM: emulator: fix execution close to the segment limit
        KVM: emulator: fix error code for __linearize
      7501a533
    • Dave Airlie's avatar
      Merge branch 'exynos-drm-fixes' of... · 66338fee
      Dave Airlie authored
      Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
      This pull-request includes some bug fixes and code cleanups.
      Especially, this fixes the bind failure issue occurred when it tries
      to re-bind Exynos drm driver after unbound, and the modetest failure
      issue incurred by not having a pair to vblank on and off requests.
      
      * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos: correct connector->dpms field before resuming
        drm/exynos: enable vblank after DPMS on
        drm/exynos: init kms poll at the end of initialization
        drm/exynos: propagate plane initialization errors
        drm/exynos: vidi: fix build warning
        drm/exynos: remove explicit encoder/connector de-initialization
        drm/exynos: init vblank with real number of crtcs
      66338fee
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 7e05b807
      Linus Torvalds authored
      Pull VFS fixes from Al Viro:
       "A bunch of assorted fixes, most of them followups to overlayfs merge"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        ovl: initialize ->is_cursor
        Return short read or 0 at end of a raw device, not EIO
        isofs: don't bother with ->d_op for normal case
        isofs_cmp(): we'll never see a dentry for . or ..
        overlayfs: fix lockdep misannotation
        ovl: fix check for cursor
        overlayfs: barriers for opening upper-layer directory
        rcu: Provide counterpart to rcu_dereference() for non-RCU situations
        staging: android: logger: Fix log corruption regression
      7e05b807
    • Linus Torvalds's avatar
      irda: stop calling sk_prot->disconnect() on connection failure · 4cb8c359
      Linus Torvalds authored
      The sk_prot is irda's own set of protocol handlers, so irda should
      statically know what that function is anyway, without using an indirect
      pointer.  And as it happens, we know *exactly* what that pointer is
      statically: it's NULL, because irda doesn't define a disconnect
      operation.
      
      So calling that function is doubly wrong, and will just cause an oops.
      Reported-by: default avatarMartin Lang <mlg.hessigheim@gmail.com>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4cb8c359
    • Andrzej Hajda's avatar
      drm/exynos: correct connector->dpms field before resuming · 74cfe07a
      Andrzej Hajda authored
      During system suspend after connector switch off its dpms field
      is set to connector previous dpms state. To properly resume dpms field
      should be set to its actual state (off) before resuming to previous dpms state.
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      74cfe07a
    • Andrzej Hajda's avatar
      drm/exynos: enable vblank after DPMS on · d6948b2f
      Andrzej Hajda authored
      Before DPMS off driver disables vblank.
      It should be balanced by vblank enable after DPMS on.
      The patch fixes issue with page_flip ioctl not being able
      to acquire vblank counter introduced by patch:
      drm: Always reject drm_vblank_get() after drm_vblank_off()
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      d6948b2f
    • Andrzej Hajda's avatar
      drm/exynos: init kms poll at the end of initialization · 3cb6830a
      Andrzej Hajda authored
      HPD events can be generated by components even if drm_dev is not fully
      initialized, to skip such events kms poll initialization should
      be performed at the end of load callback followed directly by forced
      connection detection.
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      3cb6830a
    • Andrzej Hajda's avatar
      drm/exynos: propagate plane initialization errors · 64f7aed8
      Andrzej Hajda authored
      In case of error during plane initialization load callback
      incorrectly return success, this patch fixes it.
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      64f7aed8
    • Inki Dae's avatar
      drm/exynos: vidi: fix build warning · 9887e2d9
      Inki Dae authored
      encoder object isn't used anymore so remove it.
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      9887e2d9
    • Andrzej Hajda's avatar
      drm/exynos: remove explicit encoder/connector de-initialization · d9aaf757
      Andrzej Hajda authored
      All KMS objects are destroyed by drm_mode_config_cleanup in proper order
      so component drivers should not care about it.
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      d9aaf757
    • Andrzej Hajda's avatar
      drm/exynos: init vblank with real number of crtcs · c52142e6
      Andrzej Hajda authored
      Initialization of vblank with MAX_CRTC caused attempts
      to disabling vblanks for non-existing crtcs in case
      drm used fewer crtcs. The patch fixes it.
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      c52142e6
    • Paolo Bonzini's avatar
      KVM: vmx: defer load of APIC access page address during reset · a73896cb
      Paolo Bonzini authored
      Most call paths to vmx_vcpu_reset do not hold the SRCU lock.  Defer loading
      the APIC access page to the next vmentry.
      
      This avoids the following lockdep splat:
      
      [ INFO: suspicious RCU usage. ]
      3.18.0-rc2-test2+ #70 Not tainted
      -------------------------------
      include/linux/kvm_host.h:474 suspicious rcu_dereference_check() usage!
      
      other info that might help us debug this:
      
      rcu_scheduler_active = 1, debug_locks = 0
      1 lock held by qemu-system-x86/2371:
       #0:  (&vcpu->mutex){+.+...}, at: [<ffffffffa037d800>] vcpu_load+0x20/0xd0 [kvm]
      
      stack backtrace:
      CPU: 4 PID: 2371 Comm: qemu-system-x86 Not tainted 3.18.0-rc2-test2+ #70
      Hardware name: Dell Inc. OptiPlex 9010/0M9KCM, BIOS A12 01/10/2013
       0000000000000001 ffff880209983ca8 ffffffff816f514f 0000000000000000
       ffff8802099b8990 ffff880209983cd8 ffffffff810bd687 00000000000fee00
       ffff880208a2c000 ffff880208a10000 ffff88020ef50040 ffff880209983d08
      Call Trace:
       [<ffffffff816f514f>] dump_stack+0x4e/0x71
       [<ffffffff810bd687>] lockdep_rcu_suspicious+0xe7/0x120
       [<ffffffffa037d055>] gfn_to_memslot+0xd5/0xe0 [kvm]
       [<ffffffffa03807d3>] __gfn_to_pfn+0x33/0x60 [kvm]
       [<ffffffffa0380885>] gfn_to_page+0x25/0x90 [kvm]
       [<ffffffffa038aeec>] kvm_vcpu_reload_apic_access_page+0x3c/0x80 [kvm]
       [<ffffffffa08f0a9c>] vmx_vcpu_reset+0x20c/0x460 [kvm_intel]
       [<ffffffffa039ab8e>] kvm_vcpu_reset+0x15e/0x1b0 [kvm]
       [<ffffffffa039ac0c>] kvm_arch_vcpu_setup+0x2c/0x50 [kvm]
       [<ffffffffa037f7e0>] kvm_vm_ioctl+0x1d0/0x780 [kvm]
       [<ffffffff810bc664>] ? __lock_is_held+0x54/0x80
       [<ffffffff812231f0>] do_vfs_ioctl+0x300/0x520
       [<ffffffff8122ee45>] ? __fget+0x5/0x250
       [<ffffffff8122f0fa>] ? __fget_light+0x2a/0xe0
       [<ffffffff81223491>] SyS_ioctl+0x81/0xa0
       [<ffffffff816fed6d>] system_call_fastpath+0x16/0x1b
      Reported-by: default avatarTakashi Iwai <tiwai@suse.de>
      Reported-by: default avatarAlexei Starovoitov <alexei.starovoitov@gmail.com>
      Reviewed-by: default avatarWanpeng Li <wanpeng.li@linux.intel.com>
      Tested-by: default avatarWanpeng Li <wanpeng.li@linux.intel.com>
      Fixes: 38b99173Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a73896cb
    • Jan Kiszka's avatar
      KVM: nVMX: Disable preemption while reading from shadow VMCS · 282da870
      Jan Kiszka authored
      In order to access the shadow VMCS, we need to load it. At this point,
      vmx->loaded_vmcs->vmcs and the actually loaded one start to differ. If
      we now get preempted by Linux, vmx_vcpu_put and, on return, the
      vmx_vcpu_load will work against the wrong vmcs. That can cause
      copy_shadow_to_vmcs12 to corrupt the vmcs12 state.
      
      Fix the issue by disabling preemption during the copy operation.
      copy_vmcs12_to_shadow is safe from this issue as it is executed by
      vmx_vcpu_run when preemption is already disabled before vmentry.
      
      This bug is exposed by running Jailhouse within KVM on CPUs with
      shadow VMCS support.  Jailhouse never expects an interrupt pending
      vmexit, but the bug can cause it if, after copy_shadow_to_vmcs12
      is preempted, the active VMCS happens to have the virtual interrupt
      pending flag set in the CPU-based execution controls.
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      282da870
    • Nadav Amit's avatar
      KVM: x86: Fix far-jump to non-canonical check · 7e46dddd
      Nadav Amit authored
      Commit d1442d85 ("KVM: x86: Handle errors when RIP is set during far
      jumps") introduced a bug that caused the fix to be incomplete.  Due to
      incorrect evaluation, far jump to segment with L bit cleared (i.e., 32-bit
      segment) and RIP with any of the high bits set (i.e, RIP[63:32] != 0) set may
      not trigger #GP.  As we know, this imposes a security problem.
      
      In addition, the condition for two warnings was incorrect.
      
      Fixes: d1442d85Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarNadav Amit <namit@cs.technion.ac.il>
      [Add #ifdef CONFIG_X86_64 to avoid complaints of undefined behavior. - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7e46dddd
  3. 01 Nov, 2014 8 commits
    • Dave Airlie's avatar
      Merge branch 'vmwgfx-fixes-3.18' of git://people.freedesktop.org/~thomash/linux · 10a8fce8
      Dave Airlie authored
      A critical 3.18 regression fix from Rob, (thanks!)
      A fix to avoid advertizing modes we can't support from Sinclair
        (welcome Sinclair!)
      and a fix for an incorrect  hash key computation from me that is
        completely harmless, but can wait 'til the next merge window if necessary.
        (I can't really bother stable with this one).
      
      * 'vmwgfx-fixes-3.18' of git://people.freedesktop.org/~thomash/linux:
        drm/vmwgfx: Filter out modes those cannot be supported by the current VRAM size.
        drm/vmwgfx: Fix hash key computation
        drm/vmwgfx: fix lock breakage
      10a8fce8
    • Linus Torvalds's avatar
      Merge tag 'staging-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 12d7aaca
      Linus Torvalds authored
      Pull staging fixes from Greg KH:
       "Here are some staging driver fixes for 3.18-rc3.  Mostly iio and
        comedi driver fixes for issues reported by people.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: fix memory leak / bad pointer freeing for chanlist
        staging: comedi: Kconfig: fix config COMEDI_ADDI_APCI_3120 dependants
        staging: comedi: widen subdevice number argument in ioctl handlers
        staging: rtl8723au: Fix alignment of mac_addr for ether_addr_copy() usage
        drivers/staging/comedi/Kconfig: Let COMEDI_II_PCI20KC depend on HAS_IOMEM
        staging: comedi: (regression) channel list must be set for COMEDI_CMD ioctl
        iio: adc: mxs-lradc: Disable the clock on probe failure
        iio: st_sensors: Fix buffer copy
        staging:iio:ad5933: Drop "raw" from channel names
        staging:iio:ad5933: Fix NULL pointer deref when enabling buffer
      12d7aaca
    • Linus Torvalds's avatar
      Merge tag 'usb-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 528a506e
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a bunch of USB fixes for 3.18-rc3.
      
        Mostly usb-serial device ids and gadget fixes for issues that have
        been reported.  Full details are in the shortlog.
      
        All of these have been in linux-next for a while"
      
      * tag 'usb-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (42 commits)
        usb: chipidea: Fix oops when removing the ci_hdrc module
        usb: gadget: function: Fixed the return value on error path
        usb: dwc2: gadget: disable phy before turning off power regulators
        usb: gadget: function: Remove redundant usb_free_all_descriptors
        usb: dwc3: gadget: Properly initialize LINK TRB
        usb: dwc2: gadget: fix gadget unregistration in udc_stop() function
        usb: dwc2: Bits in bitfield should add up to 32
        usb: dwc2: gadget: sparse warning of context imbalance
        usb: gadget: udc: core: fix kernel oops with soft-connect
        usb: musb: musb_dsps: fix NULL pointer in suspend
        usb: musb: dsps: start OTG timer on resume again
        usb: gadget: loopback: don't queue requests to bogus endpoints
        usb: ffs: fix regression when quirk_ep_out_aligned_size flag is set
        usb: gadget: f_fs: remove redundant ffs_data_get()
        usb: gadget: udc: USB_GADGET_XILINX should depend on HAS_DMA
        Revert "usb: dwc3: dwc3-omap: Disable/Enable only wrapper interrupts in prepare/complete"
        usb: gadget: composite: enable BESL support
        usb: musb: cppi41: restart hrtimer only if not yet done
        usb: dwc3: ep0: fix Data Phase for transfer sizes aligned to wMaxPacketSize
        usb: serial: ftdi_sio: add "bricked" FTDI device PID
        ...
      528a506e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 4f4274af
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "Filipe is nailing down some problems with our skinny extent variation,
        and Dave's patch fixes endian problems in the new super block checks"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix race that makes btrfs_lookup_extent_info miss skinny extent items
        Btrfs: properly clean up btrfs_end_io_wq_cache
        Btrfs: fix invalid leaf slot access in btrfs_lookup_extent()
        btrfs: use macro accessors in superblock validation checks
      4f4274af
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 9f935675
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
       "A bunch of fixes for minor defects reported by Coverity, a few driver
        fixups and revert of i8042.nomux change so that we are once again
        enable active MUX mode if box claims to support it"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Revert "Input: i8042 - disable active multiplexing by default"
        Input: altera_ps2 - use correct type for irq return value
        Input: altera_ps2 - write to correct register when disabling interrupts
        Input: max77693-haptic - fix potential overflow
        Input: psmouse - remove unneeded check in psmouse_reconnect()
        Input: vsxxxaa - fix code dropping bytes from queue
        Input: ims-pcu - fix dead code in ims_pcu_ofn_reg_addr_store()
        Input: opencores-kbd - fix error handling
        Input: wm97xx - adapt parameters to tosa touchscreen.
        Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook AH544
        Input: stmpe-keypad - fix valid key line bitmask
        Input: soc_button_array - update calls to gpiod_get*()
      9f935675
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ab01f963
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These are fixes received after my previous pull request plus one that
        has been in the works for quite a while, but its previous version
        caused problems to happen, so it's been deferred till now.
      
        Fixed are two recent regressions (MFD enumeration and cpufreq-dt),
        ACPI EC regression introduced in 3.17, system suspend error code path
        regression introduced in 3.15, an older bug related to recovery from
        failing resume from hibernation and a cpufreq-dt driver issue related
        to operation performance points.
      
        Specifics:
      
         - Fix a crash on r8a7791/koelsch during resume from system suspend
           caused by a recent cpufreq-dt commit (Geert Uytterhoeven).
      
         - Fix an MFD enumeration problem introduced by a recent commit adding
           ACPI support to the MFD subsystem that exposed a weakness in the
           ACPI core causing ACPI enumeration to be applied to all devices
           associated with one ACPI companion object, although it should be
           used for one of them only (Mika Westerberg).
      
         - Fix an ACPI EC regression introduced during the 3.17 cycle causing
           some Samsung laptops to misbehave as a result of a workaround
           targeted at some Acer machines.  That includes a revert of a commit
           that went too far and a quirk for the Acer machines in question.
           From Lv Zheng.
      
         - Fix a regression in the system suspend error code path introduced
           during the 3.15 cycle that causes it to fail to take errors from
           asychronous execution of "late" suspend callbacks into account
           (Imre Deak).
      
         - Fix a long-standing bug in the hibernation resume error code path
           that fails to roll back everything correcty on "freeze" callback
           errors and leaves some devices in a "suspended" state causing more
           breakage to happen subsequently (Imre Deak).
      
         - Make the cpufreq-dt driver disable operation performance points
           that are not supported by the VR connected to the CPU voltage plane
           with acceptable tolerance instead of constantly failing voltage
           scaling later on (Lucas Stach)"
      
      * tag 'pm+acpi-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / EC: Fix regression due to conflicting firmware behavior between Samsung and Acer.
        Revert "ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC"
        cpufreq: cpufreq-dt: Restore default cpumask_setall(policy->cpus)
        PM / Sleep: fix recovery during resuming from hibernation
        PM / Sleep: fix async suspend_late/freeze_late error handling
        ACPI: Use ACPI companion to match only the first physical device
        cpufreq: cpufreq-dt: disable unsupported OPPs
      ab01f963
    • Linus Torvalds's avatar
      Merge tag 'pci-v3.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 08da742e
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
       "These changes, intended for v3.18, fix:
      
        Sysfs
          - Fix "enable" filename change (Greg Kroah-Hartman)
      
            An unintentional sysfs filename change in commit 5136b2da
            ("PCI: convert bus code to use dev_groups"), which appeared in
            v3.13, changed "enable" to "enabled", and this changes it back.
      
            Old users of "enable" are currently broken and will be helped by
            this change.  Anything that started to use "enabled" after v3.13
            will be broken by this change.  If necessary, we can add a symlink
            to make both work, but this patch doesn't do that.
      
        PCI device hotplug
          - Revert duplicate merge (Kamal Mostafa)
      
            A mistaken duplicate merge that added a check twice.  Nothing's
            broken; this just removes the unnecessary code.
      
        Freescale i.MX6
          - Wait for clocks to stabilize after ref_en (Richard Zhu)
      
            An i.MX6 clock problem that prevents mx6 nitrogen boards from booting"
      
      * tag 'pci-v3.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Rename sysfs 'enabled' file back to 'enable'
        PCI: imx6: Wait for clocks to stabilize after ref_en
        Revert duplicate "PCI: pciehp: Prevent NULL dereference during probe"
      08da742e
    • Andy Lutomirski's avatar
      x86_64, entry: Fix out of bounds read on sysenter · 653bc77a
      Andy Lutomirski authored
      Rusty noticed a Really Bad Bug (tm) in my NT fix.  The entry code
      reads out of bounds, causing the NT fix to be unreliable.  But, and
      this is much, much worse, if your stack is somehow just below the
      top of the direct map (or a hole), you read out of bounds and crash.
      
      Excerpt from the crash:
      
      [    1.129513] RSP: 0018:ffff88001da4bf88  EFLAGS: 00010296
      
        2b:*    f7 84 24 90 00 00 00     testl  $0x4000,0x90(%rsp)
      
      That read is deterministically above the top of the stack.  I
      thought I even single-stepped through this code when I wrote it to
      check the offset, but I clearly screwed it up.
      
      Fixes: 8c7aa698 ("x86_64, entry: Filter RFLAGS.NT on entry from userspace")
      Reported-by: default avatarRusty Russell <rusty@ozlabs.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      653bc77a
  4. 31 Oct, 2014 2 commits