29 Dec, 2015

2 commits


14 Dec, 2015

9 commits

  • This mmu_notifier_ops structure is never modified, so declare it as
    const, like the other mmu_notifier_ops structures.

    Done with the help of Coccinelle.

    Signed-off-by: Julia Lawall
    Signed-off-by: Joerg Roedel

    Julia Lawall
     
  • Get rid of the three error paths that look the same and move
    error handling to a single place.

    Reviewed-by: Jesse Barnes
    Acked-By: David Woodhouse
    Signed-off-by: Joerg Roedel

    Joerg Roedel
     
  • Instead of just checking for a write access, calculate the
    flags that are passed to handle_mm_fault() more precisly and
    use the pre-defined macros.

    Reviewed-by: Jesse Barnes
    Acked-By: David Woodhouse
    Signed-off-by: Joerg Roedel

    Joerg Roedel
     
  • Not doing so is a bug and might trigger a BUG_ON in
    handle_mm_fault(). So add the proper permission checks
    before calling into mm code.

    Reviewed-by: Jesse Barnes
    Acked-By: David Woodhouse
    Signed-off-by: Joerg Roedel

    Joerg Roedel
     
  • The handle_mm_fault function expects the caller to do the
    access checks. Not doing so and calling the function with
    wrong permissions is a bug (catched by a BUG_ON).
    So fix this bug by adding proper access checking to the io
    page-fault code in the AMD IOMMUv2 driver.

    Reviewed-by: Jesse Barnes
    Acked-By: David Woodhouse
    Signed-off-by: Joerg Roedel

    Joerg Roedel
     
  • Pull timer fix from Thomas Gleixner:
    "A single fix to unbreak a clocksource driver which has more than 32bit
    counter width"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    clocksource: Mmio: remove artificial 32bit limitation

    Linus Torvalds
     
  • Pull fpga driver fixes from Greg KH:
    "Only two small fpga driver fixes here, both have been in linux-next
    for a while, and resolve some reported issues"

    * tag 'char-misc-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    fpga manager: Fix firmware resource leak on error
    fpga manager: remove label

    Linus Torvalds
     
  • Pull staging driver fixes from Greg KH:
    "Here are a few staging and IIO driver fixes for 4.4-rc5.

    All of them resolve reported problems and have been in linux-next for
    a while. Nothing major here, just small fixes where needed"

    * tag 'staging-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: lustre: echo_copy.._lsm() dereferences userland pointers directly
    iio: adc: spmi-vadc: add missing of_node_put
    iio: fix some warning messages
    iio: light: apds9960: correct ->last_busy count
    iio: lidar: return -EINVAL on invalid signal
    staging: iio: dummy: complete IIO events delivery to userspace

    Linus Torvalds
     
  • Pull USB driver fixes from Greg KH:
    "Here are a number of small USB fixes for 4.4-rc5. All of them have
    been in linux-next. The majority are gadget and phy issues, with a
    few new quirks and device ids added as well"

    * tag 'usb-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (32 commits)
    USB: add quirk for devices with broken LPM
    xhci: fix usb2 resume timing and races.
    usb: musb: fail with error when no DMA controller set
    usb: gadget: uvc: fix permissions of configfs attributes
    usb: musb: core: Fix pm runtime for deferred probe
    usb: phy: msm: fix a possible NULL dereference
    USB: host: ohci-at91: fix a crash in ohci_hcd_at91_overcurrent_irq
    usb: Quiet down false peer failure messages
    usb: xhci: fix config fail of FS hub behind a HS hub with MTT
    xhci: Fix memory leak in xhci_pme_acpi_rtd3_enable()
    usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message
    USB: whci-hcd: add check for dma mapping error
    usb: core : hub: Fix BOS 'NULL pointer' kernel panic
    USB: quirks: Apply ALWAYS_POLL to all ELAN devices
    usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB adapter JMicron
    USB: quirks: Fix another ELAN touchscreen
    usb: dwc3: gadget: don't prestart interrupt endpoints
    USB: serial: Another Infineon flash loader USB ID
    USB: cdc_acm: Ignore Infineon Flash Loader utility
    USB: cp210x: Remove CP2110 ID from compatibility list
    ...

    Linus Torvalds
     

13 Dec, 2015

6 commits

  • Pull ARM SoC fixes from Arnd Bergmann:
    "Here are a bunch of small bug fixes for various ARM platforms, nothing
    really sticks out this week, most of either fixes bugs in code that
    was just added in 4.4, or that has been broken for many years without
    anyone noticing.

    at91/sama5d2:
    - fix sama5de hardware setup of sd/mmc interface
    - proper selection of pinctrl drivers. PIO4 is necessary for sama5d2

    berlin:
    - fix incorrect clock input for SDIO

    exynos:
    - Fix potential NULL pointer dereference in Exynos PMU driver.

    imx:
    - Fix vf610 SAI clock configuration bug which is discovered by the
    newly added master mode support in SAI audio driver.
    - Fix buggy L2 cache latency values in vf610 device trees, which may
    cause system hang when cpu runs at a higher frequency.

    ixp4xx:
    - fix prototypes for readl/writel functions

    ls2080a:
    - use little-endian register access for GPIO and SDHCI

    omap:
    - Fix clock source for ARM TWD and global timers on am437x
    - Always select REGULATOR_FIXED_VOLTAGE for omap2+ instead of when
    MACH_OMAP3_PANDORA is selected
    - Fix SPI DMA handles for dm816x as only some were mapped
    - Fix up mbox cells for dm816x to make mailbox usable

    pxa:
    - use PWM lookup table for all ezx machines

    s3c24xx:
    - Remove incorrect __init annotation from s3c24xx cpufreq driver
    structures.

    versatile:
    - fix PCI IRQ mapping on Versatile PB"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ls2080a/dts: Add little endian property for GPIO IP block
    dt-bindings: define little-endian property for QorIQ GPIO
    ARM64: dts: ls2080a: fix eSDHC endianness
    ARM: dts: vf610: use reset values for L2 cache latencies
    ARM: pxa: use PWM lookup table for all machines
    ARM: dts: berlin: add 2nd clock for BG2Q sdhci0 and sdhci1
    ARM: dts: berlin: correct BG2Q's sdhci2 2nd clock
    ARM: dts: am4372: fix clock source for arm twd and global timers
    ARM: at91: fix pinctrl driver selection
    ARM: at91/dt: add always-on to 1.8V regulator
    ARM: dts: vf610: fix clock definition for SAI2
    ARM: imx: clk-vf610: fix SAI clock tree
    ARM: ixp4xx: fix read{b,w,l} return types
    irqchip/versatile-fpga: Fix PCI IRQ mapping on Versatile PB
    ARM: OMAP2+: enable REGULATOR_FIXED_VOLTAGE
    ARM: dts: add dm816x missing spi DT dma handles
    ARM: dts: add dm816x missing #mbox-cells
    cpufreq: s3c24xx: Do not mark s3c2410_plls_add as __init
    ARM: EXYNOS: Fix potential NULL pointer access in exynos_sys_powerdown_conf

    Linus Torvalds
     
  • Pull powerpc fixes from Michael Ellerman:
    - opal-irqchip: Fix double endian conversion from Alistair Popple
    - cxl: Set endianess of kernel contexts from Frederic Barrat
    - sbc8641: drop bogus PHY IRQ entries from DTS file from Paul Gortmaker
    - Revert "powerpc/eeh: Don't unfreeze PHB PE after reset" from Andrew
    Donnellan

    * tag 'powerpc-4.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    Revert "powerpc/eeh: Don't unfreeze PHB PE after reset"
    powerpc/sbc8641: drop bogus PHY IRQ entries from DTS file
    cxl: Set endianess of kernel contexts
    powerpc/opal-irqchip: Fix double endian conversion

    Linus Torvalds
     
  • Merge misc fixes from Andrew Morton:
    "17 fixes"

    * emailed patches from Andrew Morton :
    MIPS: fix DMA contiguous allocation
    sh64: fix __NR_fgetxattr
    ocfs2: fix SGID not inherited issue
    mm/oom_kill.c: avoid attempting to kill init sharing same memory
    drivers/base/memory.c: prohibit offlining of memory blocks with missing sections
    tmpfs: fix shmem_evict_inode() warnings on i_blocks
    mm/hugetlb.c: fix resv map memory leak for placeholder entries
    mm: hugetlb: call huge_pte_alloc() only if ptep is null
    kernel: remove stop_machine() Kconfig dependency
    mm: kmemleak: mark kmemleak_init prototype as __init
    mm: fix kerneldoc on mem_cgroup_replace_page
    osd fs: __r4w_get_page rely on PageUptodate for uptodate
    MAINTAINERS: make Vladimir co-maintainer of the memory controller
    mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress
    mm: fix swapped Movable and Reclaimable in /proc/pagetypeinfo
    memcg: fix memory.high target
    mm: hugetlb: fix hugepage memory leak caused by wrong reserve count

    Linus Torvalds
     
  • Pull parisc fixes from Helge Deller:
    "Fix the boot crash on Mako machines with Huge Pages, prevent a panic
    with SATA controllers (and others) by correctly calculating the IOMMU
    space, hook up the mlock2 syscall and drop unneeded code in the parisc
    pci code"

    * 'parisc-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Disable huge pages on Mako machines
    parisc: Wire up mlock2 syscall
    parisc: Remove unused pcibios_init_bus()
    parisc iommu: fix panic due to trying to allocate too large region

    Linus Torvalds
     
  • Pull block layer fixes from Jens Axboe:
    "A set of fixes for the current series. This contains:

    - A bunch of fixes for lightnvm, should be the last round for this
    series. From Matias and Wenwei.

    - A writeback detach inode fix from Ilya, also marked for stable.

    - A block (though it says SCSI) fix for an OOPS in SCSI runtime power
    management.

    - Module init error path fixes for null_blk from Minfei"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    null_blk: Fix error path in module initialization
    lightnvm: do not compile in debugging by default
    lightnvm: prevent gennvm module unload on use
    lightnvm: fix media mgr registration
    lightnvm: replace req queue with nvmdev for lld
    lightnvm: comments on constants
    lightnvm: check mm before use
    lightnvm: refactor spin_unlock in gennvm_get_blk
    lightnvm: put blks when luns configure failed
    lightnvm: use flags in rrpc_get_blk
    block: detach bdev inode from its wb in __blkdev_put()
    SCSI: Fix NULL pointer dereference in runtime PM

    Linus Torvalds
     
  • Commit bdee237c0343 ("x86: mm: Use 2GB memory block size on large-memory
    x86-64 systems") and 982792c782ef ("x86, mm: probe memory block size for
    generic x86 64bit") introduced large block sizes for x86. This made it
    possible to have multiple sections per memory block where previously,
    there was a only every one section per block.

    Since blocks consist of contiguous ranges of section, there can be holes
    in the blocks where sections are not present. If one attempts to
    offline such a block, a crash occurs since the code is not designed to
    deal with this.

    This patch is a quick fix to gaurd against the crash by not allowing
    blocks with non-present sections to be offlined.

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=107781

    Signed-off-by: Seth Jennings
    Reported-by: Andrew Banman
    Cc: Daniel J Blueman
    Cc: Yinghai Lu
    Cc: Greg KH
    Cc: Russ Anderson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Seth Jennings
     

12 Dec, 2015

6 commits

  • When using the Promise TX2+ SATA controller on PA-RISC, the system often
    crashes with kernel panic, for example just writing data with the dd
    utility will make it crash.

    Kernel panic - not syncing: drivers/parisc/sba_iommu.c: I/O MMU @ 000000000000a000 is out of mapping resources

    CPU: 0 PID: 18442 Comm: mkspadfs Not tainted 4.4.0-rc2 #2
    Backtrace:
    [] show_stack+0x14/0x20
    [] dump_stack+0x88/0x100
    [] panic+0x124/0x360
    [] sba_alloc_range+0x698/0x6a0
    [] sba_map_sg+0x260/0x5b8
    [] ata_qc_issue+0x264/0x4a8 [libata]
    [] ata_scsi_translate+0xe4/0x220 [libata]
    [] ata_scsi_queuecmd+0xbc/0x320 [libata]
    [] scsi_dispatch_cmd+0xfc/0x130
    [] scsi_request_fn+0x6e4/0x970
    [] __blk_run_queue+0x40/0x60
    [] blk_run_queue+0x3c/0x68
    [] scsi_run_queue+0x2a4/0x360
    [] scsi_end_request+0x1a8/0x238
    [] scsi_io_completion+0xfc/0x688
    [] scsi_finish_command+0x17c/0x1d0

    The cause of the crash is not exhaustion of the IOMMU space, there is
    plenty of free pages. The function sba_alloc_range is called with size
    0x11000, thus the pages_needed variable is 0x11. The function
    sba_search_bitmap is called with bits_wanted 0x11 and boundary size is
    0x10 (because dma_get_seg_boundary(dev) returns 0xffff).

    The function sba_search_bitmap attempts to allocate 17 pages that must not
    cross 16-page boundary - it can't satisfy this requirement
    (iommu_is_span_boundary always returns true) and fails even if there are
    many free entries in the IOMMU space.

    How did it happen that we try to allocate 17 pages that don't cross
    16-page boundary? The cause is in the function iommu_coalesce_chunks. This
    function tries to coalesce adjacent entries in the scatterlist. The
    function does several checks if it may coalesce one entry with the next,
    one of those checks is this:

    if (startsg->length + dma_len > max_seg_size)
    break;

    When it finishes coalescing adjacent entries, it allocates the mapping:

    sg_dma_len(contig_sg) = dma_len;
    dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE);
    sg_dma_address(contig_sg) =
    PIDE_FLAG
    | (iommu_alloc_range(ioc, dev, dma_len) << IOVP_SHIFT)
    | dma_offset;

    It is possible that (startsg->length + dma_len > max_seg_size) is false
    (we are just near the 0x10000 max_seg_size boundary), so the funcion
    decides to coalesce this entry with the next entry. When the coalescing
    succeeds, the function performs
    dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE);
    And now, because of non-zero dma_offset, dma_len is greater than 0x10000.
    iommu_alloc_range (a pointer to sba_alloc_range) is called and it attempts
    to allocate 17 pages for a device that must not cross 16-page boundary.

    To fix the bug, we must make sure that dma_len after addition of
    dma_offset and alignment doesn't cross the segment boundary. I.e. change
    if (startsg->length + dma_len > max_seg_size)
    break;
    to
    if (ALIGN(dma_len + dma_offset + startsg->length, IOVP_SIZE) > max_seg_size)
    break;

    This patch makes this change (it precalculates max_seg_boundary at the
    beginning of the function iommu_coalesce_chunks). I also added a check
    that the mapping length doesn't exceed dma_get_seg_boundary(dev) (it is
    not needed for Promise TX2+ SATA, but it may be needed for other devices
    that have dma_get_seg_boundary lower than dma_get_max_seg_size).

    Signed-off-by: Mikulas Patocka
    Cc: stable@vger.kernel.org
    Signed-off-by: Helge Deller

    Mikulas Patocka
     
  • …wnguo/linux into fixes

    Merge "ARM: imx: fixes for 4.4, 2nd round" from Shawn Guo:

    The i.MX fixes for 4.4, 2nd round:
    - Fix vf610 SAI clock configuration bug which is discovered by the newly
    added master mode support in SAI audio driver.
    - Fix buggy L2 cache latency values in vf610 device trees, which may
    cause system hang when cpu runs at a higher frequency.

    * tag 'imx-fixes-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
    ARM: dts: vf610: use reset values for L2 cache latencies
    ARM: dts: vf610: fix clock definition for SAI2
    ARM: imx: clk-vf610: fix SAI clock tree

    Kevin Hilman
     
  • Some USB device / host controller combinations seem to have problems
    with Link Power Management. For example, Steinar found that his xHCI
    controller wouldn't handle bandwidth calculations correctly for two
    video cards simultaneously when LPM was enabled, even though the bus
    had plenty of bandwidth available.

    This patch introduces a new quirk flag for devices that should remain
    disabled for LPM, and creates quirk entries for Steinar's devices.

    Signed-off-by: Alan Stern
    Reported-by: Steinar H. Gunderson
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • According to USB 2 specs ports need to signal resume for at least 20ms,
    in practice even longer, before moving to U0 state.
    Both host and devices can initiate resume.

    On device initiated resume, a port status interrupt with the port in resume
    state in issued. The interrupt handler tags a resume_done[port]
    timestamp with current time + USB_RESUME_TIMEOUT, and kick roothub timer.
    Root hub timer requests for port status, finds the port in resume state,
    checks if resume_done[port] timestamp passed, and set port to U0 state.

    On host initiated resume, current code sets the port to resume state,
    sleep 20ms, and finally sets the port to U0 state. This should also
    be changed to work in a similar way as the device initiated resume, with
    timestamp tagging, but that is not yet tested and will be a separate
    fix later.

    There are a few issues with this approach

    1. A host initiated resume will also generate a resume event. The event
    handler will find the port in resume state, believe it's a device
    initiated resume, and act accordingly.

    2. A port status request might cut the resume signalling short if a
    get_port_status request is handled during the host resume signalling.
    The port will be found in resume state. The timestamp is not set leading
    to time_after_eq(jiffies, timestamp) returning true, as timestamp = 0.
    get_port_status will proceed with moving the port to U0.

    3. If an error, or anything else happens to the port during device
    initiated resume signalling it will leave all the device resume
    parameters hanging uncleared, preventing further suspend, returning
    -EBUSY, and cause the pm thread to busyloop trying to enter suspend.

    Fix this by using the existing resuming_ports bitfield to indicate that
    resume signalling timing is taken care of.
    Check if the resume_done[port] is set before using it for timestamp
    comparison, and also clear out any resume signalling related variables
    if port is not in U0 or Resume state

    This issue was discovered when a PM thread busylooped, trying to runtime
    suspend the xhci USB 2 roothub on a Dell XPS

    Cc: stable
    Reported-by: Daniel J Blueman
    Tested-by: Daniel J Blueman
    Signed-off-by: Mathias Nyman
    Signed-off-by: Greg Kroah-Hartman

    Mathias Nyman
     
  • Pull device mapper fixes from Mike Snitzer:
    "Five stable fixes:

    - Two DM btree bufio buffer leak fixes that resolve reported BUG_ONs
    during DM thinp metadata close's dm_bufio_client_destroy().

    - A DM thinp range discard fix to handle discarding a partially
    mapped range.

    - A DM thinp metadata snapshot fix to make sure the btree roots saved
    in the metadata snapshot are the most current.

    - A DM space map metadata refcounting fix that improves both DM thinp
    and DM cache metadata"

    * tag 'dm-4.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm btree: fix bufio buffer leaks in dm_btree_del() error path
    dm space map metadata: fix ref counting bug when bootstrapping a new space map
    dm thin metadata: fix bug when taking a metadata snapshot
    dm thin metadata: fix bug in dm_thin_remove_range()
    dm btree: fix leak of bufio-backed block in btree_split_sibling error path

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Not too much this time.

    - One nouveau workaround extended to a few more GPUs
    - Some amdgpu big endian fixes, and a regression fixer
    - Some vmwgfx fixes
    - One ttm locking fix
    - One vgaarb fix"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    vgaarb: fix signal handling in vga_get()
    radeon: Fix VCE IB test on Big-Endian systems
    radeon: Fix VCE ring test for Big-Endian systems
    radeon/cik: Fix GFX IB test on Big-Endian
    drm/amdgpu: fix the lost duplicates checking
    drm/nouveau/pmu: remove whitelist for PGOB-exit WAR, enable by default
    drm/vmwgfx: Implement the cursor_set2 callback v2
    drm/vmwgfx: fix a warning message
    drm/ttm: Fixed a read/write lock imbalance

    Linus Torvalds
     

11 Dec, 2015

5 commits

  • There are few defects in vga_get() related to signal hadning:

    - we shouldn't check for pending signals for TASK_UNINTERRUPTIBLE
    case;

    - if we found pending signal we must remove ourself from wait queue
    and change task state back to running;

    - -ERESTARTSYS is more appropriate, I guess.

    Signed-off-by: Kirill A. Shutemov
    Cc: stable@vger.kernel.org
    Reviewed-by: David Herrmann
    Signed-off-by: Dave Airlie

    Kirill A. Shutemov
     
  • some big endian fixes and one regression fix.

    * 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux:
    radeon: Fix VCE IB test on Big-Endian systems
    radeon: Fix VCE ring test for Big-Endian systems
    radeon/cik: Fix GFX IB test on Big-Endian
    drm/amdgpu: fix the lost duplicates checking

    Dave Airlie
     
  • …/krzk/linux into fixes

    Merge "Fixes for Exynos" from Krzysztof Kozlowski:

    1. Fix potential NULL pointer dereference in Exynos PMU driver.
    2. Remove incorrect __init annotation from s3c24xx cpufreq driver
    structures.

    * tag 'samsung-fixes-4.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
    cpufreq: s3c24xx: Do not mark s3c2410_plls_add as __init
    ARM: EXYNOS: Fix potential NULL pointer access in exynos_sys_powerdown_conf

    Arnd Bergmann
     
  • Pull rdma fixes from Doug Ledford:
    "Most are minor to important fixes.

    There is one performance enhancement that I took on the grounds that
    failing to check if other processes can run before running what's
    intended to be a background, idle-time task is a bug, even though the
    primary effect of the fix is to improve performance (and it was a very
    simple patch)"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
    IB/mlx5: Postpone remove_keys under knowledge of coming preemption
    IB/mlx4: Use vmalloc for WR buffers when needed
    IB/mlx4: Use correct order of variables in log message
    iser-target: Remove explicit mlx4 work-around
    mlx4: Expose correct max_sge_rd limit
    IB/mad: Require CM send method for everything except ClassPortInfo
    IB/cma: Add a missing rcu_read_unlock()
    IB core: Fix ib_sg_to_pages()
    IB/srp: Fix srp_map_sg_fr()
    IB/srp: Fix indirect data buffer rkey endianness
    IB/srp: Initialize dma_length in srp_map_idb
    IB/srp: Fix possible send queue overflow
    IB/srp: Fix a memory leak
    IB/sa: Put netlink request into the request list before sending
    IB/iser: use sector_div instead of do_div
    IB/core: use RCU for uverbs id lookup
    IB/qib: Minor fixes to qib per SFF 8636
    IB/core: Fix user mode post wr corruption
    IB/qib: Fix qib_mr structure

    Linus Torvalds
     
  • The EP93xx is registering a clocksource of 40 bits with
    clocksource_mmio_init() but this is not working because of this
    artificial limitation. It works fine to lift the uppe limit to
    64 bits, and since cycle_t is u64, it should intuitively have been
    like that from the beginning.

    Fixes: 000bc17817bf "ARM: ep93xx: switch to GENERIC_CLOCKEVENTS"
    Reported-by: Alexander Sverdlin
    Signed-off-by: Linus Walleij
    Cc: Daniel Lezcano
    Link: http://lkml.kernel.org/r/1449768101-6879-1-git-send-email-linus.walleij@linaro.org
    Signed-off-by: Thomas Gleixner

    Linus Walleij
     

10 Dec, 2015

10 commits

  • If dm_btree_del()'s call to push_frame() fails, e.g. due to
    btree_node_validator finding invalid metadata, the dm_btree_del() error
    path must unlock all frames (which have active dm-bufio buffers) that
    were pushed onto the del_stack.

    Otherwise, dm_bufio_client_destroy() will BUG_ON() because dm-bufio
    buffers have leaked, e.g.:
    device-mapper: bufio: leaked buffer 3, hold count 1, list 0

    Signed-off-by: Joe Thornber
    Signed-off-by: Mike Snitzer
    Cc: stable@vger.kernel.org

    Joe Thornber
     
  • Pull VFIO fixes from Alex Williamson:

    - Various fixes for removing redundancy, const'ifying structs, avoiding
    stack usage, fixing WARN usage (Krzysztof Kozlowski, Julia Lawall,
    Kees Cook, Dan Carpenter)

    - Revert No-IOMMU mode as the intended user has not emerged (Alex
    Williamson)

    * tag 'vfio-v4.4-rc5' of git://github.com/awilliam/linux-vfio:
    Revert: "vfio: Include No-IOMMU mode"
    vfio: fix a warning message
    vfio: platform: remove needless stack usage
    vfio-pci: constify pci_error_handlers structures
    vfio: Drop owner assignment from platform_driver

    Linus Torvalds
     
  • Pull DT fixes from Rob Herring:
    "I think this should be all for 4.4:

    - Fix incorrect warning about overlapping memory regions

    - Export of_irq_find_parent again which was made static in 4.4, but
    has users pending for 4.5.

    - Fix of_msi_map_rid declaration location

    - Fix re-entrancy for of_fdt_unflatten_tree

    - Clean-up of phys_addr_t printks"

    * tag 'devicetree-fixes-for-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    of/irq: move of_msi_map_rid declaration to the correct ifdef section
    of/irq: Export of_irq_find_parent again
    of/fdt: Add mutex protection for calls to __unflatten_device_tree()
    of/address: fix typo in comment block of of_translate_one()
    of: do not use 0x in front of %pa
    of: Fix comparison of reserved memory regions

    Linus Torvalds
     
  • Pull clk fixes from Stephen Boyd:
    "One small build fix, a couple do_div() fixes, and a fix for the gpio
    basic clock type are the major changes here. There's also a couple
    fixes for the TI, sunxi, and scpi clock drivers"

    * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
    clk: sunxi: pll2: Fix clock running too fast
    clk: scpi: add missing of_node_put
    clk: qoriq: fix memory leak
    imx/clk-pllv2: fix wrong do_div() usage
    imx/clk-pllv1: fix wrong do_div() usage
    clk: mmp: add linux/clk.h includes
    clk: ti: drop locking code from mux/divider drivers
    clk: ti816x: Add missing dmtimer clkdev entries
    clk: ti: fapll: fix wrong do_div() usage
    clk: ti: clkt_dpll: fix wrong do_div() usage
    clk: gpio: Get parent clk names in of_gpio_clk_setup()

    Linus Torvalds
     
  • Pull IPMI fix from Corey Minyard:
    "Fix an Oops if an interrupt occurs at startup. This can happen on
    some hardware"

    * tag 'for-linus-4.4-1' of git://git.code.sf.net/p/openipmi/linux-ipmi:
    ipmi: move timer init to before irq is setup

    Linus Torvalds
     
  • We encountered a panic on boot in ipmi_si on a dell per320 due to an
    uninitialized timer as follows.

    static int smi_start_processing(void *send_info,
    ipmi_smi_t intf)
    {
    /* Try to claim any interrupts. */
    if (new_smi->irq_setup)
    new_smi->irq_setup(new_smi);

    --> IRQ arrives here and irq handler tries to modify uninitialized timer

    which triggers BUG_ON(!timer->function) in __mod_timer().

    Call Trace:

    [] start_new_msg+0x47/0x80 [ipmi_si]
    [] start_check_enables+0x4e/0x60 [ipmi_si]
    [] smi_event_handler+0x1e8/0x640 [ipmi_si]
    [] ? __rcu_process_callbacks+0x54/0x350
    [] si_irq_handler+0x3c/0x60 [ipmi_si]
    [] handle_IRQ_event+0x60/0x170
    [] handle_edge_irq+0xde/0x180
    [] handle_irq+0x49/0xa0
    [] do_IRQ+0x6c/0xf0
    [] ret_from_intr+0x0/0x11

    /* Set up the timer that drives the interface. */
    setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi);

    The following patch fixes the problem.

    To: Openipmi-developer@lists.sourceforge.net
    To: Corey Minyard
    CC: linux-kernel@vger.kernel.org

    Signed-off-by: Jan Stancek
    Signed-off-by: Tony Camuso
    Signed-off-by: Corey Minyard
    Cc: stable@vger.kernel.org # Applies cleanly to 3.10-, needs small rework before

    Jan Stancek
     
  • When applying block operations (BOPs) do not remove them from the
    uncommitted BOP ring-buffer until after they've been applied -- in case
    we recurse.

    Also, perform BOP_INC operation, in dm_sm_metadata_create() and
    sm_metadata_extend(), in terms of the uncommitted BOP ring-buffer rather
    than using direct calls to sm_ll_inc().

    Signed-off-by: Joe Thornber
    Signed-off-by: Mike Snitzer
    Cc: stable@vger.kernel.org

    Joe Thornber
     
  • When you take a metadata snapshot the btree roots for the mapping and
    details tree need to have their reference counts incremented so they
    persist for the lifetime of the metadata snap.

    The roots being incremented were those currently written in the
    superblock, which could possibly be out of date if concurrent IO is
    triggering new mappings, breaking of sharing, etc.

    Fix this by performing a commit with the metadata lock held while taking
    a metadata snapshot.

    Signed-off-by: Joe Thornber
    Signed-off-by: Mike Snitzer
    Cc: stable@vger.kernel.org

    Joe Thornber
     
  • …balbi/usb into usb-linus

    Felipe writes:

    usb: fixes for-v4.4-rc5

    Hopefully final set of fixes for v4.4 release cycle.

    There's a fix for a regression on dwc3 caused by recent changes to how
    transfers are started. We're not pre-starting interrupt endpoints
    anymore.

    A NULL pointer dereference fix for the MSM phy driver.

    The UVC gadget got a minor fix for permissions to its configfs
    attributes and, finally, two fixes for MUSB. A fix for PM runtime when
    MUSB returns EPROBE_DEFER and a fix to actually return an error in case
    we can't initialize a DMA engine.

    Signed-off-by: Felipe Balbi <balbi@ti.com>

    Greg Kroah-Hartman
     
  • Pull PCI fixes from Bjorn Helgaas:
    "These are more fixes I'd like to have in v4.4. Several for the Altera
    driver added for v4.4, and one for an MSI domain problem that affects
    several arm64 platforms:

    MSI:
    - Only use the generic MSI layer when domain is hierarchical (Marc
    Zyngier)

    Altera host bridge driver:
    - Fix loop in tlp_read_packet() (Dan Carpenter)
    - Fix Requester ID for config accesses (Ley Foon Tan)
    - Check TLP completion status (Ley Foon Tan)
    - Fix error when INTx is 4 (Ley Foon Tan)"

    * tag 'pci-v4.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    PCI: altera: Fix error when INTx is 4
    PCI: altera: Check TLP completion status
    PCI: altera: Fix Requester ID for config accesses
    PCI: altera: Fix loop in tlp_read_packet()
    PCI/MSI: Only use the generic MSI layer when domain is hierarchical

    Linus Torvalds
     

09 Dec, 2015

2 commits