28 Aug, 2017

13 commits

  • Replace the writel_relaxed with __raw_writel to avoid byte swapping
    in pmic_arb_write_data() function. That way the code is independent
    of the CPU endianness.

    Fixes: 111a10bf3e53 ("spmi: pmic-arb: rename spmi_pmic_arb_dev to
    spmi_pmic_arb")
    Signed-off-by: Kiran Gunda
    Reviewed-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Kiran Gunda
     
  • Allocate the correct memory size (max_pmic_peripherals) for the
    mapping_table that holds the apid to ppid mapping. Also use a local
    variable for mapping_table for better alignment of the code.

    Fixes: 987a9f128b8a ("spmi: pmic-arb: Support more than 128 peripherals")
    Signed-off-by: Kiran Gunda
    Reviewed-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Kiran Gunda
     
  • Optimize the qpnpint_irq_set_type() by using a local variable
    to hold the handler type. Also clean up other variable usage.

    Signed-off-by: Kiran Gunda
    Reviewed-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Kiran Gunda
     
  • Clean up the pmic_arb_find_apid() by using the local
    variables to improve the code readability.

    Signed-off-by: Kiran Gunda
    Reviewed-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Kiran Gunda
     
  • This patch cleans up the following.

    - Rename the "pa" to "pmic_arb".
    - Rename the spmi_pmic_arb *dev to spmi_pmic_arb *pmic_arb.
    - Rename the pa_{read,write}_data() functions to
    pmic_arb_{read,write}_data().
    - Rename channel to APID.
    - Rename the HWIRQ_*() macros to hwirq_to_*().

    Signed-off-by: Kiran Gunda
    Reviewed-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Kiran Gunda
     
  • The access mode checks for peripheral ownership for read/write
    permissions should not be required. Every peripheral enabled for
    this master is expected to have a read/write permissions. If there
    is any such invalid access due to wrong configuration in boot loader
    or device tree files, then it should be fixed in those locations.
    Hence, remove the access mode checks from the driver.

    Signed-off-by: Kiran Gunda
    Reviewed-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Kiran Gunda
     
  • Make this const as it is only stored in the type field of a device
    structure, which is const.
    Done using Coccinelle.

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Greg Kroah-Hartman

    Bhumika Goyal
     
  • This reverts commit d0bdff0db809 ("staging: Fix build issues with new
    binder API"), because commit e38361d032f1 ("ARM: 8091/2: add get_user()
    support for 8 byte types") has added the 64bit __get_user_asm_*
    implementation.

    Signed-off-by: Jisheng Zhang
    Signed-off-by: Greg Kroah-Hartman

    Jisheng Zhang
     
  • We want the binder fix in here as well for testing and merge issues.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Pull IOMMU fix from Joerg Roedel:
    "Another fix, this time in common IOMMU sysfs code.

    In the conversion from the old iommu sysfs-code to the
    iommu_device_register interface, I missed to update the release path
    for the struct device associated with an IOMMU. It freed the 'struct
    device', which was a pointer before, but is now embedded in another
    struct.

    Freeing from the middle of allocated memory had all kinds of nasty
    side effects when an IOMMU was unplugged. Unfortunatly nobody
    unplugged and IOMMU until now, so this was not discovered earlier. The
    fix is to make the 'struct device' a pointer again"

    * tag 'iommu-fixes-v4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    iommu: Fix wrong freeing of iommu_device->dev

    Linus Torvalds
     
  • Pull char/misc fix from Greg KH:
    "Here is a single misc driver fix for 4.13-rc7. It resolves a reported
    problem in the Android binder driver due to previous patches in
    4.13-rc.

    It's been in linux-next with no reported issues"

    * tag 'char-misc-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    ANDROID: binder: fix proc->tsk check.

    Linus Torvalds
     
  • Pull staging/iio fixes from Greg KH:
    "Here are few small staging driver fixes, and some more IIO driver
    fixes for 4.13-rc7. Nothing major, just resolutions for some reported
    problems.

    All of these have been in linux-next with no reported problems"

    * tag 'staging-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    iio: magnetometer: st_magn: remove ihl property for LSM303AGR
    iio: magnetometer: st_magn: fix status register address for LSM303AGR
    iio: hid-sensor-trigger: Fix the race with user space powering up sensors
    iio: trigger: stm32-timer: fix get trigger mode
    iio: imu: adis16480: Fix acceleration scale factor for adis16480
    PATCH] iio: Fix some documentation warnings
    staging: rtl8188eu: add RNX-N150NUB support
    Revert "staging: fsl-mc: be consistent when checking strcmp() return"
    iio: adc: stm32: fix common clock rate
    iio: adc: ina219: Avoid underflow for sleeping time
    iio: trigger: stm32-timer: add enable attribute
    iio: trigger: stm32-timer: fix get/set down count direction
    iio: trigger: stm32-timer: fix write_raw return value
    iio: trigger: stm32-timer: fix quadrature mode get routine
    iio: bmp280: properly initialize device for humidity reading

    Linus Torvalds
     
  • Pull NTB fixes from Jon Mason:
    "NTB bug fixes to address an incorrect ntb_mw_count reference in the
    NTB transport, improperly bringing down the link if SPADs are
    corrupted, and an out-of-order issue regarding link negotiation and
    data passing"

    * tag 'ntb-4.13-bugfixes' of git://github.com/jonmason/ntb:
    ntb: ntb_test: ensure the link is up before trying to configure the mws
    ntb: transport shouldn't disable link due to bogus values in SPADs
    ntb: use correct mw_count function in ntb_tool and ntb_transport

    Linus Torvalds
     

27 Aug, 2017

2 commits

  • Pull input fixes from Dmitry Torokhov:

    - a tweak to the IBM Trackpoint driver that helps recognizing
    trackpoints on never Lenovo Carbons

    - a fix to the ALPS driver solving scroll issues on some Dells

    - yet another ACPI ID has been added to Elan I2C toucpad driver

    - quieted diagnostic message in soc_button_array driver

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: ALPS - fix two-finger scroll breakage in right side on ALPS touchpad
    Input: soc_button_array - silence -ENOENT error on Dell XPS13 9365
    Input: trackpoint - add new trackpoint firmware ID
    Input: elan_i2c - add ELAN0602 ACPI ID to support Lenovo Yoga310

    Linus Torvalds
     
  • Pull PCI fix from Bjorn Helgaas:
    "Remove needlessly alarming MSI affinity warning (this is not actually
    a bug fix, but the warning prompts unnecessary bug reports)"

    * tag 'pci-v4.13-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    PCI/MSI: Don't warn when irq_create_affinity_masks() returns NULL

    Linus Torvalds
     

26 Aug, 2017

10 commits

  • Pull virtio fixes from Michael Tsirkin:
    "Fixes two obvious bugs in virtio pci"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    virtio_pci: fix cpu affinity support
    virtio_blk: fix incorrect message when disk is resized

    Linus Torvalds
     
  • Pull MTD fixes from Brian Norris:
    "Two fixes - one for a 4.13 regression, and the other for an older one:

    - Atmel NAND: since we started utilizing ONFI timings, we found that
    we were being too restrict at rejecting them, partly due to
    discrepancies in ONFI 4.0 and earlier versions. Relax the
    restriction to keep these platforms booting. This is a 4.13-rc1
    regression.

    - nandsim: repeated probe/removal may not work after a failed init,
    because we didn't free up our debugfs files properly on the failure
    path. This has been around since 3.8, but it's nice to get this
    fixed now in a nice easy patch that can target -stable, since
    there's already refactoring work (that also fixes the issue)
    targeted for the next merge window"

    * tag 'for-linus-20170825' of git://git.infradead.org/linux-mtd:
    mtd: nand: atmel: Relax tADL_min constraint
    mtd: nandsim: remove debugfs entries in error path

    Linus Torvalds
     
  • Pull block fixes from Jens Axboe:
    "A small batch of fixes that should be included for the 4.13 release.
    This contains:

    - Revert of the 4k loop blocksize support. Even with a recent batch
    of 4 fixes, we're still not really happy with it. Rather than be
    stuck with an API issue, let's revert it and get it right for 4.14.

    - Trivial patch from Bart, adding a few flags to the blk-mq debugfs
    exports that were added in this release, but not to the debugfs
    parts.

    - Regression fix for bsg, fixing a potential kernel panic. From
    Benjamin.

    - Tweak for the blk throttling, improving how we account discards.
    From Shaohua"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    blk-mq-debugfs: Add names for recently added flags
    bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer
    Revert "loop: support 4k physical blocksize"
    blk-throttle: cap discard request size

    Linus Torvalds
     
  • Pull i2c fixes from Wolfram Sang:
    "I2C has some bugfixes for you: mainly Jarkko fixed up a few things in
    the designware driver regarding the new slave mode. But Ulf also fixed
    a long-standing and now agreed suspend problem. Plus, some simple
    stuff which nonetheless needs fixing"

    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    i2c: designware: Fix runtime PM for I2C slave mode
    i2c: designware: Remove needless pm_runtime_put_noidle() call
    i2c: aspeed: fixed potential null pointer dereference
    i2c: simtec: use release_mem_region instead of release_resource
    i2c: core: Make comment about I2C table requirement to reflect the code
    i2c: designware: Fix standard mode speed when configuring the slave mode
    i2c: designware: Fix oops from i2c_dw_irq_handler_slave
    i2c: designware: Fix system suspend

    Linus Torvalds
     
  • irq_create_affinity_masks() can return NULL on non-SMP systems, when there
    are not enough "free" vectors available to spread, or if memory allocation
    for the CPU masks fails. Only the allocation failure is of interest, and
    even then the system will work just fine except for non-optimally spread
    vectors. Thus remove the warnings.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Bjorn Helgaas
    Acked-by: David S. Miller

    Christoph Hellwig
     
  • Pull MMC fix from Ulf Hansson:
    "MMC core: don't return error code R1_OUT_OF_RANGE for open-ending mode"

    * tag 'mmc-v4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
    mmc: block: prevent propagating R1_OUT_OF_RANGE for open-ending mode

    Linus Torvalds
     
  • Pull dmaengine fix from Vinod Koul:
    "A single fix for tegra210-adma driver to check of_irq_get() error"

    * tag 'dmaengine-fix-4.13-rc7' of git://git.infradead.org/users/vkoul/slave-dma:
    dmaengine: tegra210-adma: fix of_irq_get() error check

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Fixes for rc7, nothing too crazy, some core, i915, and sunxi fixes,
    Intel CI has been responsible for some of these fixes being required"

    * tag 'drm-fixes-for-v4.13-rc7' of git://people.freedesktop.org/~airlied/linux:
    drm/i915/gvt: Fix the kernel null pointer error
    drm: Release driver tracking before making the object available again
    drm/i915: Clear lost context-switch interrupts across reset
    drm/i915/bxt: use NULL for GPIO connection ID
    drm/i915/cnl: Fix LSPCON support.
    drm/i915/vbt: ignore extraneous child devices for a port
    drm/i915: Initialize 'data' in intel_dsi_dcs_backlight.c
    drm/atomic: If the atomic check fails, return its value first
    drm/atomic: Handle -EDEADLK with out-fences correctly
    drm: Fix framebuffer leak
    drm/imx: ipuv3-plane: fix YUV framebuffer scanout on the base plane
    gpu: ipu-v3: add DRM dependency
    drm/rockchip: Fix suspend crash when drm is not bound
    drm/sun4i: Implement drm_driver lastclose to restore fbdev console

    Linus Torvalds
     
  • Commit 0b0f9dc5 ("Revert "virtio_pci: use shared interrupts for
    virtqueues"") removed the adjustment of the pre_vectors for the virtio
    MSI-X vector allocation which was added in commit fb5e31d9 ("virtio:
    allow drivers to request IRQ affinity when creating VQs"). This will
    lead to an incorrect assignment of MSI-X vectors, and potential
    deadlocks when offlining cpus.

    Signed-off-by: Christoph Hellwig
    Fixes: 0b0f9dc5 ("Revert "virtio_pci: use shared interrupts for virtqueues")
    Reported-by: YASUAKI ISHIMATSU
    Cc: stable@vger.kernel.org
    Signed-off-by: Michael S. Tsirkin

    Christoph Hellwig
     
  • The message printed on disk resize is incorrect. The following is
    printed when resizing to 2 GiB:

    $ truncate -s 1G test.img
    $ qemu -device virtio-blk-pci,logical_block_size=4096,...
    (qemu) block_resize drive1 2G

    virtio_blk virtio0: new size: 4194304 4096-byte logical blocks (17.2 GB/16.0 GiB)

    The virtio_blk capacity config field is in 512-byte sector units
    regardless of logical_block_size as per the VIRTIO specification.
    Therefore the message should read:

    virtio_blk virtio0: new size: 524288 4096-byte logical blocks (2.15 GB/2.0 GiB)

    Note that this only affects the printed message. Thankfully the actual
    block device has the correct size because the block layer expects
    capacity in sectors.

    Signed-off-by: Stefan Hajnoczi
    Signed-off-by: Michael S. Tsirkin

    Stefan Hajnoczi
     

25 Aug, 2017

14 commits

  • Version 4 of the ONFI spec mandates that tADL be at least 400 nanoseconds,
    but, depending on the master clock rate, 400 ns may not fit in the tADL
    field of the SMC reg. We need to relax the check and accept the -ERANGE
    return code.

    Note that previous versions of the ONFI spec had a lower tADL_min (100 or
    200 ns). It's not clear why this timing constraint got increased but it
    seems most NANDs are fine with values lower than 400ns, so we should be
    safe.

    Fixes: f9ce2eddf176 ("mtd: nand: atmel: Add ->setup_data_interface() hooks")
    Signed-off-by: Boris Brezillon
    Tested-by: Quentin Schulz
    Signed-off-by: Brian Norris

    Boris Brezillon
     
  • The debugfs entries must be removed before an error is returned in the
    probe function. Otherwise another try to load the module fails and when
    the debugfs files are accessed without the module loaded, the kernel
    still tries to call a function in that module.

    Fixes: 5346c27c5fed ("mtd: nandsim: Introduce debugfs infrastructure")
    Signed-off-by: Uwe Kleine-König
    Reviewed-by: Richard Weinberger
    Acked-by: Boris Brezillon
    Signed-off-by: Brian Norris

    Uwe Kleine-König
     
  • Core Changes:
    - Release driver tracking before making the object available again (Chris)

    Cc: Chris Wilson

    * tag 'drm-misc-fixes-2017-08-24' of git://anongit.freedesktop.org/git/drm-misc:
    drm: Release driver tracking before making the object available again

    Dave Airlie
     
  • drm/i915 fixes for v4.13-rc7

    * tag 'drm-intel-fixes-2017-08-24' of git://anongit.freedesktop.org/git/drm-intel:
    drm/i915/gvt: Fix the kernel null pointer error
    drm/i915: Clear lost context-switch interrupts across reset
    drm/i915/bxt: use NULL for GPIO connection ID
    drm/i915/cnl: Fix LSPCON support.
    drm/i915/vbt: ignore extraneous child devices for a port
    drm/i915: Initialize 'data' in intel_dsi_dcs_backlight.c

    Dave Airlie
     
  • Fixed the issue that two finger scroll does not work correctly
    on V8 protocol. The cause is that V8 protocol X-coordinate decode
    is wrong at SS4 PLUS device. I added SS4 PLUS X decode definition.

    Mote notes:
    the problem manifests itself by the commit e7348396c6d5 ("Input: ALPS
    - fix V8+ protocol handling (73 03 28)"), where a fix for the V8+
    protocol was applied. Although the culprit must have been present
    beforehand, the two-finger scroll worked casually even with the
    wrongly reported values by some reason. It got broken by the commit
    above just because it changed x_max value, and this made libinput
    correctly figuring the MT events. Since the X coord is reported as
    falsely doubled, the events on the right-half side go outside the
    boundary, thus they are no longer handled. This resulted as a broken
    two-finger scroll.

    One finger event is decoded differently, and it didn't suffer from
    this problem. The problem was only about MT events. --tiwai

    Fixes: e7348396c6d5 ("Input: ALPS - fix V8+ protocol handling (73 03 28)")
    Signed-off-by: Masaki Ota
    Tested-by: Takashi Iwai
    Tested-by: Paul Donohue
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Dmitry Torokhov

    Masaki Ota
     
  • Pull more rdma fixes from Doug Ledford:
    "Well, I thought we were going to be done for this -rc cycle. I should
    have known better than to say so though.

    We have four additional items that trickled in.

    One was a simple mistake on my part. I took a patch into my for-next
    thinking that the issue was less severe than it was. I was then
    notified that it needed to be in my -rc area instead.

    The other three were just found late in testing.

    Summary:

    - One core fix accidentally applied first to for-next and then cherry
    picked back because it needed to be in the -rc cycles instead

    - Another core fix

    - Two mlx5 fixes"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
    IB/mlx5: Always return success for RoCE modify port
    IB/mlx5: Fix Raw Packet QP event handler assignment
    IB/core: Avoid accessing non-allocated memory when inferring port type
    RDMA/uverbs: Initialize cq_context appropriately

    Linus Torvalds
     
  • Pull ACPI fixes from Rafael Wysocki:
    "These fix two recent regressions (in ACPICA and in the ACPI EC driver)
    and one bug in code introduced during the 4.12 cycle (ACPI device
    properties library routine).

    Specifics:

    - Fix a regression in the ACPI EC driver causing a kernel to crash
    during initialization on some systems due to a code ordering issue
    exposed by a recent change (Lv Zheng).

    - Fix a recent regression in ACPICA due to a change of the behavior
    of a library function in a way that is not backwards compatible
    with some existing callers of it (Rafael Wysocki).

    - Fix a coding mistake in a library function related to the handling
    of ACPI device properties introduced during the 4.12 cycle (Sakari
    Ailus)"

    * tag 'acpi-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI: device property: Fix node lookup in acpi_graph_get_child_prop_value()
    ACPICA: Fix acpi_evaluate_object_typed()
    ACPI: EC: Fix regression related to wrong ECDT initialization order

    Linus Torvalds
     
  • …masahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - fix linker script regression caused by dead code elimination support

    - fix typos and outdated comments

    - specify kselftest-clean as a PHONY target

    - fix "make dtbs_install" when $(srctree) includes shell special
    characters like '~'

    - Move -fshort-wchar to the global option list because defining it
    partially emits warnings

    * tag 'kbuild-fixes-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: update comments of Makefile.asm-generic
    kbuild: Do not use hyphen in exported variable name
    Makefile: add kselftest-clean to PHONY target list
    Kbuild: use -fshort-wchar globally
    fixdep: trivial: typo fix and correction
    kbuild: trivial cleanups on the comments
    kbuild: linker script do not match C names unless LD_DEAD_CODE_DATA_ELIMINATION is configured

    Linus Torvalds
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "A small number of bugfixes, again nothing serious.

    - Alexander Dahl found multiple bugs in the Atmel memory interface
    driver

    - A randconfig build fix for at91 was incomplete, the second attempt
    fixes the remaining corner case

    - One fix for the TI Keystone queue handler

    - The Odroid XU4 HDMI port (added in 4.13) needs a small DT fix"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: dts: exynos: add needs-hpd for Odroid-XU3/4
    ARM: at91: don't select CONFIG_ARM_CPU_SUSPEND for old platforms
    soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
    memory: atmel-ebi: Fix smc cycle xlate converter
    memory: atmel-ebi: Allow t_DF timings of zero ns
    memory: atmel-ebi: Fix smc timing return value evaluation

    Linus Torvalds
     
  • The implementation of TIOCGPTPEER has two issues.

    When /dev/ptmx (as opposed to /dev/pts/ptmx) is opened the wrong
    vfsmount is passed to dentry_open. Which results in the kernel displaying
    the wrong pathname for the peer.

    The second is simply by caching the vfsmount and dentry of the peer it leaves
    them open, in a way they were not previously Which because of the inreased
    reference counts can cause unnecessary behaviour differences resulting in
    regressions.

    To fix these move the ioctl into tty_io.c at a generic level allowing
    the ioctl to have access to the struct file on which the ioctl is
    being called. This allows the path of the slave to be derived when
    opening the slave through TIOCGPTPEER instead of requiring the path to
    the slave be cached. Thus removing the need for caching the path.

    A new function devpts_ptmx_path is factored out of devpts_acquire and
    used to implement a function devpts_mntget. The new function devpts_mntget
    takes a filp to perform the lookup on and fsi so that it can confirm
    that the superblock that is found by devpts_ptmx_path is the proper superblock.

    v2: Lots of fixes to make the code actually work
    v3: Suggestions by Linus
    - Removed the unnecessary initialization of filp in ptm_open_peer
    - Simplified devpts_ptmx_path as gotos are no longer required

    [ This is the fix for the issue that was reverted in commit
    143c97cc6529, but this time without breaking 'pbuilder' due to
    increased reference counts - Linus ]

    Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl")
    Reported-by: Christian Brauner
    Reported-and-tested-by: Stefan Lippers-Hollmann
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • * acpica-fix:
    ACPICA: Fix acpi_evaluate_object_typed()

    * acpi-ec-fix:
    ACPI: EC: Fix regression related to wrong ECDT initialization order

    * acpi-properties-fix:
    ACPI: device property: Fix node lookup in acpi_graph_get_child_prop_value()

    Rafael J. Wysocki
     
  • CM layer calls ib_modify_port() regardless of the link layer.

    For the Ethernet ports, qkey violation and Port capabilities
    are meaningless. Therefore, always return success for ib_modify_port
    calls on the Ethernet ports.

    Cc: Selvin Xavier
    Signed-off-by: Majd Dibbiny
    Reviewed-by: Moni Shoua
    Signed-off-by: Leon Romanovsky
    Signed-off-by: Doug Ledford

    Majd Dibbiny
     
  • In case we have SQ and RQ for Raw Packet QP, the SQ's event handler
    wasn't assigned.

    Fixing this by assigning event handler for each WQ after creation.

    [ 1877.145243] Call Trace:
    [ 1877.148644]
    [ 1877.150580] [] ? mlx5_rsc_event+0x105/0x210 [mlx5_core]
    [ 1877.159581] [] ? mlx5_cq_event+0x57/0xd0 [mlx5_core]
    [ 1877.167137] [] mlx5_eq_int+0x53e/0x6c0 [mlx5_core]
    [ 1877.174526] [] ? sched_clock+0x9/0x10
    [ 1877.180753] [] handle_irq_event_percpu+0x3e/0x1e0
    [ 1877.188014] [] handle_irq_event+0x3d/0x60
    [ 1877.194567] [] handle_edge_irq+0x77/0x130
    [ 1877.201129] [] handle_irq+0xbf/0x150
    [ 1877.207244] [] ? atomic_notifier_call_chain+0x1a/0x20
    [ 1877.214829] [] do_IRQ+0x4f/0xf0
    [ 1877.220498] [] common_interrupt+0x6d/0x6d
    [ 1877.227025]
    [ 1877.228967] [] ? cpuidle_enter_state+0x52/0xc0
    [ 1877.236990] [] cpuidle_idle_call+0xc5/0x200
    [ 1877.243676] [] arch_cpu_idle+0xe/0x30
    [ 1877.249831] [] cpu_startup_entry+0xf5/0x290
    [ 1877.256513] [] start_secondary+0x265/0x27b
    [ 1877.263111] Code: Bad RIP value.
    [ 1877.267296] RIP [< (null)>] (null)
    [ 1877.273264] RSP
    [ 1877.277531] CR2: 0000000000000000

    Fixes: 19098df2da78 ("IB/mlx5: Refactor mlx5_ib_qp to accommodate other QP types")
    Signed-off-by: Majd Dibbiny
    Reviewed-by: Yishai Hadas
    Signed-off-by: Leon Romanovsky
    Signed-off-by: Doug Ledford

    Majd Dibbiny
     
  • Commit 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types")
    introduced the concept of type in ah_attr:
    * During ib_register_device, each port is checked for its type which
    is stored in ib_device's port_immutable array.
    * During uverbs' modify_qp, the type is inferred using the port number
    in ib_uverbs_qp_dest struct (address vector) by accessing the
    relevant port_immutable array and the type is passed on to
    providers.

    IB spec (version 1.3) enforces a valid port value only in Reset to
    Init. During Init to RTR, the address vector must be valid but port
    number is not mentioned as a field in the address vector, so its
    value is not validated, which leads to accesses to a non-allocated
    memory when inferring the port type.

    Save the real port number in ib_qp during modify to Init (when the
    comp_mask indicates that the port number is valid) and use this value
    to infer the port type.

    Avoid copying the address vector fields if the matching bit is not set
    in the attr_mask. Address vector can't be modified before the port, so
    no valid flow is affected.

    Fixes: 44c58487d51a ('IB/core: Define 'ib' and 'roce' rdma_ah_attr types')
    Signed-off-by: Noa Osherovich
    Reviewed-by: Yishai Hadas
    Signed-off-by: Leon Romanovsky
    Signed-off-by: Doug Ledford

    Noa Osherovich
     

24 Aug, 2017

1 commit

  • This reverts commit c8c03f1858331e85d397bacccd34ef409aae993c.

    It turns out that while fixing the ptmx file descriptor to have the
    correct 'struct path' to the associated slave pty is a really good
    thing, it breaks some user space tools for a very annoying reason.

    The problem is that /dev/ptmx and its associated slave pty (/dev/pts/X)
    are on different mounts. That was what caused us to have the wrong path
    in the first place (we would mix up the vfsmount of the 'ptmx' node,
    with the dentry of the pty slave node), but it also means that now while
    we use the right vfsmount, having the pty master open also keeps the pts
    mount busy.

    And it turn sout that that makes 'pbuilder' very unhappy, as noted by
    Stefan Lippers-Hollmann:

    "This patch introduces a regression for me when using pbuilder
    0.228.7[2] (a helper to build Debian packages in a chroot and to
    create and update its chroots) when trying to umount /dev/ptmx (inside
    the chroot) on Debian/ unstable (full log and pbuilder configuration
    file[3] attached).

    [...]
    Setting up build-essential (12.3) ...
    Processing triggers for libc-bin (2.24-15) ...
    I: unmounting dev/ptmx filesystem
    W: Could not unmount dev/ptmx: umount: /var/cache/pbuilder/build/1340/dev/ptmx: target is busy
    (In some cases useful info about processes that
    use the device is found by lsof(8) or fuser(1).)"

    apparently pbuilder tries to unmount the /dev/pts filesystem while still
    holding at least one master node open, which is arguably not very nice,
    but we don't break user space even when fixing other bugs.

    So this commit has to be reverted.

    I'll try to figure out a way to avoid caching the path to the slave pty
    in the master pty. The only thing that actually wants that slave pty
    path is the "TIOCGPTPEER" ioctl, and I think we could just recreate the
    path at that time.

    Reported-by: Stefan Lippers-Hollmann
    Cc: Eric W Biederman
    Cc: Christian Brauner
    Cc: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds