11 Jan, 2015

2 commits


10 Jan, 2015

2 commits

  • Pull HID updates from Jiri Kosina:

    - bounds checking fixes in logitech and roccat drivers, from Peter Wu
    and Dan Carpenter

    - double-kfree fix in i2c-hid driver on bus shutdown, from Mika
    Westerberg

    - a couple of various small driver fixes

    - a few device id additions

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: roccat: potential out of bounds in pyra_sysfs_write_settings()
    HID: Add a new id 0x501a for Genius MousePen i608X
    HID: logitech-hidpp: prefix the name with "Logitech"
    HID: logitech-hidpp: avoid unintended fall-through
    HID: Allow HID_BATTERY_STRENGTH to be enabled
    HID: i2c-hid: Do not free buffers in i2c_hid_stop()
    HID: add battery quirk for USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO keyboard
    HID: logitech-hidpp: check WTP report length
    HID: logitech-dj: check report length

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "I'm briefly working between holidays and LCA, so this is close to a
    couple of weeks of fixes,

    Two sets of amdkfd fixes, this is a new feature this kernel, and this
    pull fixes a few issues since it got merged, ordering when built-in to
    kernel and also the iommu vs gpu ordering patch, it also reworks the
    ioctl before the initial release.

    Otherwise:
    - radeon: some misc fixes all over, hdmi, 4k, dpm
    - nouveau: mcp77 init fixes, oops fix, bug on fix, msi fix
    - i915: power fixes, revert VGACNTR patch

    Probably be quiteer next week since I'll be at LCA anyways"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (33 commits)
    drm/amdkfd: rewrite kfd_ioctl() according to drm_ioctl()
    drm/amdkfd: reformat IOCTL definitions to drm-style
    drm/amdkfd: Do copy_to/from_user in general kfd_ioctl()
    drm/radeon: integer underflow in radeon_cp_dispatch_texture()
    drm/radeon: adjust default bapm settings for KV
    drm/radeon: properly filter DP1.2 4k modes on non-DP1.2 hw
    drm/radeon: fix sad_count check for dce3
    drm/radeon: KV has three PPLLs (v2)
    drm/amdkfd: unmap VMIDPASID when relesing VMID (non-HWS)
    drm/radeon: Init amdkfd only if it was compiled
    amdkfd: actually allocate longs for the pasid bitmask
    drm/nouveau/nouveau: Do not BUG_ON(!spin_is_locked()) on UP
    drm/nv4c/mc: disable msi
    drm/nouveau/fb/ram/mcp77: enable NISO poller
    drm/nouveau/fb/ram/mcp77: use carveout reg to determine size
    drm/nouveau/fb/ram/mcp77: subclass nouveau_ram
    drm/nouveau: wake up the card if necessary during gem callbacks
    drm/nouveau/device: Add support for GK208B, resolves bug 86935
    drm/nouveau: fix missing return statement in nouveau_ttm_tt_unpopulate
    drm/nouveau/bios: fix oops on pre-nv50 chipsets
    ...

    Linus Torvalds
     

09 Jan, 2015

5 commits

  • This is a static checker fix. We write some binary settings to the
    sysfs file. One of the settings is the "->startup_profile". There
    isn't any checking to make sure it fits into the
    pyra->profile_settings[] array in the profile_activated() function.

    I added a check to pyra_sysfs_write_settings() in both places because
    I wasn't positive that the other callers were correct.

    Cc:
    Signed-off-by: Dan Carpenter
    Signed-off-by: Jiri Kosina

    Dan Carpenter
     
  • Pull pinctrl fixes from Linus Walleij:
    "Allright allright I've been lazy over christmas and New Years. Here
    are a few collected pin control fixes eventually. Details:

    A set of assorted pin control fixes for the Rockchip and STi drivers"

    * tag 'pinctrl-v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
    pinctrl: st: Add irq_disable hook to st_gpio_irqchip
    pinctrl: st: avoid multiple mutex lock
    pinctrl: rockchip: Fix enable/disable/mask/unmask
    pinctrl: rockchip: Handle wakeup pins

    Linus Torvalds
     
  • Pull power management and ACPI fixes from Rafael Wysocki:
    "These are an ACPI device power management initialization fix (-stable
    material), two commits renaming stuff in the ACPI processor driver to
    make it more suitable for ARM64 processors and a new ACPI backlight
    blacklist entry.

    Specifics:

    - Fix ACPI power management intialization for device objects
    corresponding to devices that are not present at the init time (the
    _STA control method returns 0 for them) and therefore should not be
    regarded as power manageable (Rafael J Wysocki).

    - Rename a structure field and two functions used by the ACPI
    processor driver to make them less tied to architectures that use
    APICs (both x86 and ia64) and more suitable for ARM64 processors
    (Hanjun Guo).

    - Add a disable_native_backlight quirk for Dell XPS15 L521X designed
    in an unusual way preventing native backlight from working on that
    machine (Hans de Goede)"

    * tag 'pm+acpi-3.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / video: Add disable_native_backlight quirk for Dell XPS15 L521X
    ACPI / processor: Rename acpi_(un)map_lsapic() to acpi_(un)map_cpu()
    ACPI / processor: Convert apic_id to phys_id to make it arch agnostic
    ACPI / PM: Fix PM initialization for devices that are not present

    Linus Torvalds
     
  • pull virtio/vhost fixes from Michael Tsirkin:
    "This fixes a couple of bugs triggered by hot-unplug of virtio devices,
    as well as a regression in vhost-net"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    vhost/net: length miscalculation
    virtio_pci: document why we defer kfree
    virtio_pci: defer kfree until release callback
    virtio_pci: device-specific release callback
    virtio: make del_vqs idempotent

    Linus Torvalds
     
  • Pull IOMMU fixes from Joerg Roedel:
    "Including:

    - a domain structure leak fix in the Intel VT-d driver

    - compile error fix for the VMSA IPMMU driver because of the
    IOMMU_EXEC -> IOMMU_NOEXEC conversion

    - two small cleanups as an aftermath of the merge window and the
    domain-leak fix"

    * tag 'iommu-fixes-v3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    iommu/rockchip: Drop owner assignment from platform_drivers
    iommu/vt-d: Remove dead code in device_notifier
    iommu/vt-d: Fix dmar_domain leak in iommu_attach_device
    iommu/ipmmu-vmsa: Change IOMMU_EXEC to IOMMU_NOEXEC

    Linus Torvalds
     

08 Jan, 2015

4 commits

  • - Complete overhaul to the main IOCTL function, kfd_ioctl(), according to
    drm_ioctl() example. This includes changing the IOCTL definitions, so it
    breaks compatibility with previous versions of the userspace. However,
    because the kernel was not officialy released yet, and this the first
    kernel that includes amdkfd, I assume I can still do that at this stage.

    - A couple of bug fixes for the non-HWS path (used for bring-ups and
    debugging purposes only).

    * tag 'amdkfd-fixes-2015-01-06' of git://people.freedesktop.org/~gabbayo/linux:
    drm/amdkfd: rewrite kfd_ioctl() according to drm_ioctl()
    drm/amdkfd: reformat IOCTL definitions to drm-style
    drm/amdkfd: Do copy_to/from_user in general kfd_ioctl()
    drm/amdkfd: unmap VMIDPASID when relesing VMID (non-HWS)
    drm/radeon: Assign VMID to PASID for IH in non-HWS mode
    drm/radeon: do not leave queue acquired if timeout happens in kgd_hqd_destroy()
    drm/amdkfd: Load mqd to hqd in non-HWS mode
    drm/amd: Fixing typos in kfdkgd interface

    Dave Airlie
     
  • some minor radeon fixes.

    * 'drm-fixes-3.19' of git://people.freedesktop.org/~agd5f/linux:
    drm/radeon: integer underflow in radeon_cp_dispatch_texture()
    drm/radeon: adjust default bapm settings for KV
    drm/radeon: properly filter DP1.2 4k modes on non-DP1.2 hw
    drm/radeon: fix sad_count check for dce3
    drm/radeon: KV has three PPLLs (v2)

    Dave Airlie
     
  • - Fix BUG() on !SMP builds
    - Fix for OOPS on pre-NV50 that snuck into -next
    - MCP7[789A] hang fix where firmware hasn't already setup NISO pollers
    - NV4x IGP MSI disable, it doesn't appear to work correctly
    - Add GK208B to recognised boards (no code change aside from adding
    chipset recognition)

    * 'linux-3.19' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
    drm/nouveau/nouveau: Do not BUG_ON(!spin_is_locked()) on UP
    drm/nv4c/mc: disable msi
    drm/nouveau/fb/ram/mcp77: enable NISO poller
    drm/nouveau/fb/ram/mcp77: use carveout reg to determine size
    drm/nouveau/fb/ram/mcp77: subclass nouveau_ram
    drm/nouveau: wake up the card if necessary during gem callbacks
    drm/nouveau/device: Add support for GK208B, resolves bug 86935
    drm/nouveau: fix missing return statement in nouveau_ttm_tt_unpopulate
    drm/nouveau/bios: fix oops on pre-nv50 chipsets

    Dave Airlie
     
  • Current vfio-pci just supports normal pci device, so vfio_pci_probe() will
    return if the pci device is not a normal device. While current code makes a
    mistake. PCI_HEADER_TYPE is the offset in configuration space of the device
    type, but we use this value to mask the type value.

    This patch fixs this by do the check directly on the pci_dev->hdr_type.

    Signed-off-by: Wei Yang
    Signed-off-by: Alex Williamson
    Cc: stable@vger.kernel.org # v3.6+

    Wei Yang
     

07 Jan, 2015

13 commits

  • commit 8b38694a2dc8b18374310df50174f1e4376d6824
    vhost/net: virtio 1.0 byte swap
    had this chunk:
    - heads[headcount - 1].len += datalen;
    + heads[headcount - 1].len = cpu_to_vhost32(vq, len - datalen);

    This adds datalen with the wrong sign, causing guest panics.

    Fixes: 8b38694a2dc8b18374310df50174f1e4376d6824
    Reported-by: Alex Williamson
    Suggested-by: Greg Kurz
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • Currently disable_irq() doesn't work for pinctrl-st driver, due to
    missing irq_disable hook in the driver.
    disable_irq() is required only for level-triggered interrupts, which
    is not the case normally.

    Signed-off-by: Pankaj Dev
    Signed-off-by: Patrice Chotard
    Signed-off-by: Linus Walleij

    Patrice CHOTARD
     
  • Using the sysfs inteface to inspect the pins configuration
    the system can walk around a path which acquires the same
    mutex twice.

    On STiH407 platform, for example :
    cat /sys/kernel/debug/pinctrl/920f080.pin-controller-front0/pinconf-pins
    hangs the kernel and never returns.

    With this patch the mutex is temporary freed.

    Signed-off-by: Francesco Virlinzi
    Signed-off-by: Patrice Chotard
    Signed-off-by: Linus Walleij

    Francesco VIRLINZI
     
  • Pull networking fixes from David Miller:
    "Just a pile of random fixes, including:

    1) Do not apply TSO limits to non-TSO packets, fix from Herbert Xu.

    2) MDI{,X} eeprom check in e100 driver is reversed, from John W.
    Linville.

    3) Missing error return assignments in several ethernet drivers, from
    Julia Lawall.

    4) Altera TSE device doesn't come back up after ifconfig down/up
    sequence, fix from Kostya Belezko.

    5) Add more cases to the check for whether the qmi_wwan device has a
    bogus MAC address and needs to be assigned a random one. From
    Kristian Evensen.

    6) Fix interrupt hangs in CPSW, from Felipe Balbi.

    7) Implement ndo_features_check in r8152 so that the stack doesn't
    feed GSO packets which are outside of the chip's capabilities.
    From Hayes Wang"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits)
    qla3xxx: don't allow never end busy loop
    xen-netback: fixing the propagation of the transmit shaper timeout
    r8152: support ndo_features_check
    batman-adv: fix potential TT client + orig-node memory leak
    batman-adv: fix multicast counter when purging originators
    batman-adv: fix counter for multicast supporting nodes
    batman-adv: fix lock class for decoding hash in network-coding.c
    batman-adv: fix delayed foreign originator recognition
    batman-adv: fix and simplify condition when bonding should be used
    Revert "mac80211: Fix accounting of the tailroom-needed counter"
    net: ethernet: cpsw: fix hangs with interrupts
    enic: free all rq buffs when allocation fails
    qmi_wwan: Set random MAC on devices with buggy fw
    openvswitch: Consistently include VLAN header in flow and port stats.
    tcp: Do not apply TSO segment limit to non-TSO packets
    Altera TSE: Add missing phydev
    net/mlx4_core: Fix error flow in mlx4_init_hca()
    net/mlx4_core: Correcly update the mtt's offset in the MR re-reg flow
    qlcnic: Fix return value in qlcnic_probe()
    net: axienet: fix error return code
    ...

    Linus Torvalds
     
  • Pull IPMI fixlet from Corey Minyard:
    "Fix a compile warning"

    * tag 'for-linus-3' of git://git.code.sf.net/p/openipmi/linux-ipmi:
    ipmi: Fix compile warning with tv_usec

    Linus Torvalds
     
  • The counter variable wasn't increased at all which may stuck under
    certain circumstances.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: David S. Miller

    Andy Shevchenko
     
  • * acpi-pm:
    ACPI / PM: Fix PM initialization for devices that are not present

    * acpi-processor:
    ACPI / processor: Rename acpi_(un)map_lsapic() to acpi_(un)map_cpu()
    ACPI / processor: Convert apic_id to phys_id to make it arch agnostic

    * acpi-video:
    ACPI / video: Add disable_native_backlight quirk for Dell XPS15 L521X

    Rafael J. Wysocki
     
  • The L521X variant of the Dell XPS15 has integrated nvidia graphics, and
    backlight control does not work properly when using the native interfaces.

    Link: https://bugzilla.redhat.com/show_bug.cgi?id=1163574
    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     
  • Since e9ce7cb6b107 ("xen-netback: Factor queue-specific data into queue struct"),
    the transimt shaper timeout is always set to 0. The value the user sets via
    xenbus is never propagated to the transmit shaper.

    This patch fixes the issue.

    Cc: Anthony Liguori
    Signed-off-by: Imre Palik
    Acked-by: Ian Campbell
    Signed-off-by: David S. Miller

    Palik, Imre
     
  • Support ndo_features_check to avoid:
    - the transport offset is more than the hw limitation when using hw checksum.
    - the skb->len of a GSO packet is more than the limitation.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     
  • This patch changes kfd_ioctl() to be very similar to drm_ioctl().

    The patch defines an array of amdkfd_ioctls, which maps IOCTL definition to the
    ioctl function.

    The kfd_ioctl() uses that mapping to call the appropriate ioctl function,
    through a function pointer.

    This patch also declares a new typedef for the ioctl function pointer.

    v2: Renamed KFD_COMMAND_(START|END) to AMDKFD_...

    Signed-off-by: Oded Gabbay
    Acked-by: Christian König

    Oded Gabbay
     
  • This patch reformats the ioctl definitions in kfd_ioctl.h to be similar to the
    drm ioctls definition style.

    v2: Renamed KFD_COMMAND_(START|END) to AMDKFD_...

    Signed-off-by: Oded Gabbay
    Acked-by: Christian König

    Oded Gabbay
     
  • This patch moves the copy_to_user() and copy_from_user() calls from the
    different ioctl functions in amdkfd to the general kfd_ioctl() function, as
    this is a common code for all ioctls.

    This was done according to example taken from drm_ioctl.c

    Signed-off-by: Oded Gabbay
    Reviewed-by: Christian König

    Oded Gabbay
     

06 Jan, 2015

13 commits

  • The reason we defer kfree until release function is because it's a
    general rule for kobjects: kfree of the reference counter itself is only
    legal in the release function.

    Previous patch didn't make this clear, document this in code.

    Cc: stable@vger.kernel.org
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • A struct device which has just been unregistered can live on past the
    point at which a driver decides to drop it's initial reference to the
    kobject gained on allocation.

    This implies that when releasing a virtio device, we can't free a struct
    virtio_device until the underlying struct device has been released,
    which might not happen immediately on device_unregister().

    Unfortunately, this is exactly what virtio pci does:
    it has an empty release callback, and frees memory immediately
    after unregistering the device.

    This causes an easy to reproduce crash if CONFIG_DEBUG_KOBJECT_RELEASE
    it enabled.

    To fix, free the memory only once we know the device is gone in the release
    callback.

    Cc: stable@vger.kernel.org
    Signed-off-by: Sasha Levin
    Signed-off-by: Michael S. Tsirkin

    Sasha Levin
     
  • It turns out we need to add device-specific code
    in release callback. Move it to virtio_pci_legacy.c.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • Our code calls del_vqs multiple times, assuming
    it's idempotent.

    commit 3ec7a77bb3089bb01032fdbd958eb5c29da58b49
    virtio_pci: free up vq->priv
    broke this assumption, by adding kfree there,
    so multiple calls cause double free.

    Fix it up.

    Fixes: 3ec7a77bb3089bb01032fdbd958eb5c29da58b49
    Reported-by: Sasha Levin
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • acpi_map_lsapic() will allocate a logical CPU number and map it to
    physical CPU id (such as APIC id) for the hot-added CPU, it will also
    do some mapping for NUMA node id and etc, acpi_unmap_lsapic() will
    do the reverse.

    We can see that the name of the function is a little bit confusing and
    arch (IA64) dependent so rename them as acpi_(un)map_cpu() to make arch
    agnostic and explicit.

    Signed-off-by: Hanjun Guo
    Signed-off-by: Rafael J. Wysocki

    Hanjun Guo
     
  • apic_id in MADT table is the CPU hardware id which identify
    it self in the system for x86 and ia64, OSPM will use it for
    SMP init to map APIC ID to logical cpu number in the early
    boot, when the DSDT/SSDT (ACPI namespace) is scanned later, the
    ACPI processor driver is probed and the driver will use acpi_id
    in DSDT to get the apic_id, then map to the logical cpu number
    which is needed by the processor driver.

    Before ACPI 5.0, only x86 and ia64 were supported in ACPI spec,
    so apic_id is used both in arch code and ACPI core which is
    pretty fine. Since ACPI 5.0, ARM is supported by ACPI and
    APIC is not available on ARM, this will confuse people when
    apic_id is both used by x86 and ARM in one function.

    So convert apic_id to phys_id (which is the original meaning)
    in ACPI processor dirver to make it arch agnostic, but leave the
    arch dependent code unchanged, no functional change.

    Signed-off-by: Hanjun Guo
    Signed-off-by: Rafael J. Wysocki

    Hanjun Guo
     
  • If an ACPI device object whose _STA returns 0 (not present and not
    functional) has _PR0 or _PS0, its power_manageable flag will be set
    and acpi_bus_init_power() will return 0 for it. Consequently, if
    such a device object is passed to the ACPI device PM functions, they
    will attempt to carry out the requested operation on the device,
    although they should not do that for devices that are not present.

    To fix that problem make acpi_bus_init_power() return an error code
    for devices that are not present which will cause power_manageable to
    be cleared for them as appropriate in acpi_bus_get_power_flags().
    However, the lists of power resources should not be freed for the
    device in that case, so modify acpi_bus_get_power_flags() to keep
    those lists even if acpi_bus_init_power() returns an error.
    Accordingly, when deciding whether or not the lists of power
    resources need to be freed, acpi_free_power_resources_lists()
    should check the power.flags.power_resources flag instead of
    flags.power_manageable, so make that change too.

    Furthermore, if acpi_bus_attach() sees that flags.initialized is
    unset for the given device, it should reset the power management
    settings of the device and re-initialize them from scratch instead
    of relying on the previous settings (the device may have appeared
    after being not present previously, for example), so make it use
    the 'valid' flag of the D0 power state as the initial value of
    flags.power_manageable for it and call acpi_bus_init_power() to
    discover its current power state.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Mika Westerberg
    Cc: 3.10+ # 3.10+

    Rafael J. Wysocki
     
  • Commit e05fe29248 (qla2xxx: Honor FCP_RSP retry delay timer field.)
    causes systems to busy-wait for about 3 minutes after boot prior to
    detecting SAN disks.

    During this wait period one kworker is running full-time
    (though /proc//stack has no useful data). Another kworker is
    waiting for IO to complete during that whole time period.

    Looking at drivers/scsi/qla2xxx/qla_os.c, fcport->retry_delay_timestamp
    has a special value of 0 though that 0 value forces system to wait when
    jiffies is very large value (e.g. 4294952605 - "negative" value when
    signed on 32bit systems).

    Signed-off-by: Bruno Prémont
    Acked-by: Chad Dupuis
    Signed-off-by: Christoph Hellwig

    Bruno Prémont
     
  • The test:

    if (size > RADEON_MAX_TEXTURE_SIZE) {

    "size" is an integer and it's controled by the user so it can be
    negative and the test can underflow. Later we use "size" in:

    dwords = size / 4;
    ...
    RADEON_COPY_MT(buffer, data, (int)(dwords * sizeof(u32)));

    It causes memory corruption to copy a negative size buffer.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Christian König
    Signed-off-by: Alex Deucher

    Dan Carpenter
     
  • Enabling bapm seems to cause clocking problems on some
    KV configurations. Disable it by default for now.

    Signed-off-by: Alex Deucher
    Cc: stable@vger.kernel.org

    Alex Deucher
     
  • The check was already in place in the dp mode_valid check, but
    radeon_dp_get_dp_link_clock() never returned the high clock
    mode_valid was checking for because that function clipped the
    clock based on the hw capabilities. Add an explicit check
    in the mode_valid function.

    bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=87172

    Signed-off-by: Alex Deucher
    Cc:stable@vge.kernel.org

    Alex Deucher
     
  • Make it consistent with the sad code for other asics to deal
    with monitors that don't report sads.

    bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=89461

    Signed-off-by: Alex Deucher
    Cc: stable@vger.kernel.org

    Alex Deucher
     
  • Enable all three in the driver. Early documentation
    indicated the 3rd one was used for something else, but
    that is not the case.

    v2: handle disable as well

    Signed-off-by: Alex Deucher
    Cc: stable@vger.kernel.org

    Alex Deucher
     

05 Jan, 2015

1 commit