09 Sep, 2014

1 commit

  • bdev_get_queue() returns the request_queue associated with the
    specified block_device. blk_get_backing_dev_info() makes use of
    bdev_get_queue() to determine the associated bdi given a block_device.

    All the callers of bdev_get_queue() including
    blk_get_backing_dev_info() assume that bdev_get_queue() may return
    NULL and implement NULL handling; however, bdev_get_queue() requires
    the passed in block_device is opened and attached to its gendisk.
    Because an active gendisk always has a valid request_queue associated
    with it, bdev_get_queue() can never return NULL and neither can
    blk_get_backing_dev_info().

    Make it clear that neither of the two functions can return NULL and
    remove NULL handling from all the callers.

    Signed-off-by: Tejun Heo
    Cc: Chris Mason
    Cc: Dave Chinner
    Signed-off-by: Jens Axboe

    Tejun Heo
     

08 Sep, 2014

1 commit

  • blkcg->id is a unique id given to each blkcg; however, the
    cgroup_subsys_state which each blkcg embeds already has ->serial_nr
    which can be used for the same purpose. Drop blkcg->id and replace
    its uses with blkcg->css.serial_nr. Rename cfq_cgroup->blkcg_id to
    ->blkcg_serial_nr and @id in check_blkcg_changed() to @serial_nr for
    consistency.

    Signed-off-by: Tejun Heo
    Acked-by: Vivek Goyal
    Signed-off-by: Jens Axboe

    Tejun Heo
     

29 Aug, 2014

2 commits

  • Dan writes:

    block/bsg.c:327 bsg_map_hdr() error: 'next_rq' dereferencing possible
    ERR_PTR().

    Fix this by setting next_rq to NULL, for the case where it can be
    != NULL but an error pointer.

    Reported-by: Dan Carpenter
    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • The blk_get_request function may fail in low-memory conditions or during
    device removal (even if __GFP_WAIT is set). To distinguish between these
    errors, modify the blk_get_request call stack to return the appropriate
    ERR_PTR. Verify that all callers check the return status and consider
    IS_ERR instead of a simple NULL pointer check.

    For consistency, make a similar change to the blk_mq_alloc_request leg
    of blk_get_request. It may fail if the queue is dead, or the caller was
    unwilling to wait.

    Signed-off-by: Joe Lawrence
    Acked-by: Jiri Kosina [for pktdvd]
    Acked-by: Boaz Harrosh [for osd]
    Reviewed-by: Jeff Moyer
    Signed-off-by: Jens Axboe

    Joe Lawrence
     

27 Aug, 2014

1 commit

  • The blk-core dead queue checks introduce an error scenario to
    blk_get_request that returns NULL if the request queue has been
    shutdown. This affects the behavior for __GFP_WAIT callers, who should
    verify the return value before dereferencing.

    Signed-off-by: Joe Lawrence
    Acked-by: Jiri Kosina [for pktdvd]
    Reviewed-by: Jeff Moyer
    Signed-off-by: Jens Axboe

    Joe Lawrence
     

26 Aug, 2014

5 commits

  • Linus Torvalds
     
  • Pull NFS client fixes from Trond Myklebust:
    "Highlights:

    - more fixes for read/write codepath regressions
    * sleeping while holding the inode lock
    * stricter enforcement of page contiguity when coalescing requests
    * fix up error handling in the page coalescing code

    - don't busy wait on SIGKILL in the file locking code"

    * tag 'nfs-for-3.17-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    nfs: Don't busy-wait on SIGKILL in __nfs_iocounter_wait
    nfs: can_coalesce_requests must enforce contiguity
    nfs: disallow duplicate pages in pgio page vectors
    nfs: don't sleep with inode lock in lock_and_join_requests
    nfs: fix error handling in lock_and_join_requests
    nfs: use blocking page_group_lock in add_request
    nfs: fix nonblocking calls to nfs_page_group_lock
    nfs: change nfs_page_group_lock argument

    Linus Torvalds
     
  • …ernel/git/horms/renesas

    Pull SH driver fix from Simon Horman:
    "Confine SH_INTC to platforms that need it"

    * tag 'renesas-sh-drivers-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
    sh: intc: Confine SH_INTC to platforms that need it

    Linus Torvalds
     
  • Pull MIPS fixes from Ralf Baechle:
    "Pretty much all across the field so with this we should be in
    reasonable shape for the upcoming -rc2"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: OCTEON: make get_system_type() thread-safe
    MIPS: CPS: Initialize EVA before bringing up VPEs from secondary cores
    MIPS: Malta: EVA: Rename 'eva_entry' to 'platform_eva_init'
    MIPS: EVA: Add new EVA header
    MIPS: scall64-o32: Fix indirect syscall detection
    MIPS: syscall: Fix AUDIT value for O32 processes on MIPS64
    MIPS: Loongson: Fix COP2 usage for preemptible kernel
    MIPS: NL: Fix nlm_xlp_defconfig build error
    MIPS: Remove race window in page fault handling
    MIPS: Malta: Improve system memory detection for '{e, }memsize' >= 2G
    MIPS: Alchemy: Fix db1200 PSC clock enablement
    MIPS: BCM47XX: Fix reboot problem on BCM4705/BCM4785
    MIPS: Remove duplicated include from numa.c
    MIPS: Add common plat_irq_dispatch declaration
    MIPS: MSP71xx: remove unused plat_irq_dispatch() argument
    MIPS: GIC: Remove useless parens from GICBIS().
    MIPS: perf: Mark pmu interupt IRQF_NO_THREAD

    Linus Torvalds
     
  • …it/rostedt/linux-trace

    Pull fix for ftrace function tracer/profiler conflict from Steven Rostedt:
    "The rewrite of the ftrace code that makes it possible to allow for
    separate trampolines had a design flaw with the interaction between
    the function and function_graph tracers.

    The main flaw was the simplification of the use of multiple tracers
    having the same filter (like function and function_graph, that use the
    set_ftrace_filter file to filter their code). The design assumed that
    the two tracers could never run simultaneously as only one tracer can
    be used at a time. The problem with this assumption was that the
    function profiler could be implemented on top of the function graph
    tracer, and the function profiler could run at the same time as the
    function tracer. This caused the assumption to be broken and when
    ftrace detected this failed assumpiton it would spit out a nasty
    warning and shut itself down.

    Instead of using a single ftrace_ops that switches between the
    function and function_graph callbacks, the two tracers can again use
    their own ftrace_ops. But instead of having a complex hierarchy of
    ftrace_ops, the filter fields are placed in its own structure and the
    ftrace_ops can carefully use the same filter. This change took a bit
    to be able to allow for this and currently only the global_ops can
    share the same filter, but this new design can easily be modified to
    allow for any ftrace_ops to share its filter with another ftrace_ops.

    The first four patches deal with the change of allowing the ftrace_ops
    to share the filter (and this needs to go to 3.16 as well).

    The fifth patch fixes a bug that was also caused by the new changes
    but only for archs other than x86, and only if those archs implement a
    direct call to the function_graph tracer which they do not do yet but
    will in the future. It does not need to go to stable, but needs to be
    fixed before the other archs update their code to allow direct calls
    to the function_graph trampoline"

    * tag 'trace-fixes-v3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    ftrace: Use current addr when converting to nop in __ftrace_replace_code()
    ftrace: Fix function_profiler and function tracer together
    ftrace: Fix up trampoline accounting with looping on hash ops
    ftrace: Update all ftrace_ops for a ftrace_hash_ops update
    ftrace: Allow ftrace_ops to use the hashes from other ops

    Linus Torvalds
     

25 Aug, 2014

10 commits

  • Pull x86 fixes from Ingo Molnar:
    "A couple of EFI fixes, plus misc fixes all around the map"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    efi/arm64: Store Runtime Services revision
    firmware: Do not use WARN_ON(!spin_is_locked())
    x86_32, entry: Clean up sysenter_badsys declaration
    x86/doc: Fix the 'tlb_single_page_flush_ceiling' sysconfig path
    x86/mm: Fix sparse 'tlb_single_page_flush_ceiling' warning and make the variable read-mostly
    x86/mm: Fix RCU splat from new TLB tracepoints

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "A kprobes and a perf compat ioctl fix"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf: Handle compat ioctl
    kprobes: Skip kretprobe hit in NMI context to avoid deadlock

    Linus Torvalds
     
  • Pull ARM SoC fixes from Olof Johansson:
    "A collection of fixes from this week, it's been pretty quiet and
    nothing really stands out as particularly noteworthy here -- mostly
    minor fixes across the field:

    - ODROID booting was fixed due to PMIC interrupts missing in DT
    - a collection of i.MX fixes
    - minor Tegra fix for regulators
    - Rockchip fix and addition of SoC-specific mailing list to make it
    easier to find posted patches"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    bus: arm-ccn: Fix warning message
    ARM: shmobile: koelsch: Remove non-existent i2c6 pinmux
    ARM: tegra: apalis/colibri t30: fix on-module 5v0 supplies
    MAINTAINERS: add new Rockchip SoC list
    ARM: dts: rockchip: readd missing mmc0 pinctrl settings
    ARM: dts: ODROID i2c improvements
    ARM: dts: Enable PMIC interrupts on ODROID
    ARM: dts: imx6sx: fix the pad setting for uart CTS_B
    ARM: dts: i.MX53: fix apparent bug in VPU clks
    ARM: imx: correct gpu2d_axi and gpu3d_axi clock setting
    ARM: dts: imx6: edmqmx6: change enet reset pin
    ARM: dts: vf610-twr: Fix pinctrl_esdhc1 pin definitions.
    ARM: imx: remove unnecessary ARCH_HAS_OPP select
    ARM: imx: fix TLB missing of IOMUXC base address during suspend
    ARM: imx6: fix SMP compilation again
    ARM: dt: sun6i: Add #address-cells and #size-cells to i2c controller nodes

    Linus Torvalds
     
  • Pull gpio fixes from Linus Walleij:

    - a largeish fix for the IRQ handling in the new Zynq driver. The
    quite verbose commit message gives the exact details.
    - move some defines for gpiod flags outside an ifdef to make stub
    functions work again.
    - various minor fixes that we can accept for -rc1.

    * tag 'gpio-v3.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpio-lynxpoint: enable input sensing in resume
    gpio: move GPIOD flags outside #ifdef
    gpio: delete unneeded test before of_node_put
    gpio: zynq: Fix IRQ handlers
    gpiolib: devres: use correct structure type name in sizeof
    MAINTAINERS: Change maintainer for gpio-bcm-kona.c

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Intel and radeon fixes.

    Post KS/LC git requests from i915 and radeon stacked up. They are all
    fixes along with some new pci ids for radeon, and one maintainers file
    entry.

    - i915: display fixes and irq fixes
    - radeon: pci ids, and misc gpuvm, dpm and hdp cache"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (29 commits)
    MAINTAINERS: Add entry for Renesas DRM drivers
    drm/radeon: add additional SI pci ids
    drm/radeon: add new bonaire pci ids
    drm/radeon: add new KV pci id
    Revert "drm/radeon: Use write-combined CPU mappings of ring buffers with PCIe"
    drm/radeon: fix active_cu mask on SI and CIK after re-init (v3)
    drm/radeon: fix active cu count for SI and CIK
    drm/radeon: re-enable selective GPUVM flushing
    drm/radeon: Sync ME and PFP after CP semaphore waits v4
    drm/radeon: fix display handling in radeon_gpu_reset
    drm/radeon: fix pm handling in radeon_gpu_reset
    drm/radeon: Only flush HDP cache for indirect buffers from userspace
    drm/radeon: properly document reloc priority mask
    drm/i915: don't try to retrain a DP link on an inactive CRTC
    drm/i915: make sure VDD is turned off during system suspend
    drm/i915: cancel hotplug and dig_port work during suspend and unload
    drm/i915: fix HPD IRQ reenable work cancelation
    drm/i915: take display port power domain in DP HPD handler
    drm/i915: Don't try to enable cursor from setplane when crtc is disabled
    drm/i915: Skip load detect when intel_crtc->new_enable==true
    ...

    Linus Torvalds
     
  • As reported by Dan Aloni, commit f8567a3845ac ("aio: fix aio request
    leak when events are reaped by userspace") introduces a regression when
    user code attempts to perform io_submit() with more events than are
    available in the ring buffer. Reverting that commit would reintroduce a
    regression when user space event reaping is used.

    Fixing this bug is a bit more involved than the previous attempts to fix
    this regression. Since we do not have a single point at which we can
    count events as being reaped by user space and io_getevents(), we have
    to track event completion by looking at the number of events left in the
    event ring. So long as there are as many events in the ring buffer as
    there have been completion events generate, we cannot call
    put_reqs_available(). The code to check for this is now placed in
    refill_reqs_available().

    A test program from Dan and modified by me for verifying this bug is available
    at http://www.kvack.org/~bcrl/20140824-aio_bug.c .

    Reported-by: Dan Aloni
    Signed-off-by: Benjamin LaHaise
    Acked-by: Dan Aloni
    Cc: Kent Overstreet
    Cc: Mateusz Guzik
    Cc: Petr Matousek
    Cc: stable@vger.kernel.org # v3.16 and anything that f8567a3845ac was backported to
    Signed-off-by: Linus Torvalds

    Benjamin LaHaise
     
  • A message warning a user about wrong vc value was printing
    out port instead.

    Reported-by: Drew Richardson
    Signed-off-by: Pawel Moll
    Signed-off-by: Olof Johansson

    Pawel Moll
     
  • On r8a7791, i2c6 (aka iic3) doesn't need pinmux, but the koelsch dts
    refers to non-existent pinmux configuration data:

    pinmux core: sh-pfc does not support function i2c6
    sh-pfc e6060000.pfc: invalid function i2c6 in map table

    Remove it to fix this.

    Fixes: commit 1d41f36a68c0f4e9b01d563ce33bab5201858b54 ("ARM: shmobile:
    koelsch dts: Add VDD MPU regulator for DVFS")

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Simon Horman
    Signed-off-by: Olof Johansson

    Geert Uytterhoeven
     
  • Working on Gigabit/PCIe support in U-Boot for Apalis T30 I realised
    that the current device tree source includes for our modules only
    happen to work due to referencing the on-carrier 5v0 supply from USB
    which is not at all available on-module. The modules actually contain
    TPS60150 charge pumps to generate the PMIC required 5 volts from the
    one and only 3.3 volt module supply. This patch fixes this.

    (Note: When back-porting this to v3.16 stable releases, simply drop the
    change to tegra30-apalis.dtsi; that file was added in v3.17)

    Cc: #v3.16+
    Signed-off-by: Marcel Ziswiler
    Signed-off-by: Stephen Warren
    Signed-off-by: Olof Johansson

    Marcel Ziswiler
     
  • …it/mmind/linux-rockchip into fixes

    Merge "ARM: rockchip: fix for 3.17" from Heiko Stubner:

    Pinctrl that got accidentially dropped when reorganizing the
    dts files and addition of the new Rockchip list to MAINTAINERS.

    * tag 'v3.17-rockchip-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
    MAINTAINERS: add new Rockchip SoC list
    ARM: dts: rockchip: readd missing mmc0 pinctrl settings

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     

24 Aug, 2014

2 commits


23 Aug, 2014

18 commits

  • Add the new list that Rockchip-specific patches should also be directed to.

    Signed-off-by: Heiko Stuebner

    Heiko Stuebner
     
  • During the restructuring of the Rockchip Cortex-A9 dtsi files it seems
    like the pinctrl settings vanished at some point from the mmc0 support.

    This of course renders them unusable, so readd the necessary pinctrl
    properties.

    Signed-off-by: Heiko Stuebner

    Heiko Stuebner
     
  • …/mripard/linux into fixes

    Merge "Allwinner DT changes, take 2" from Maxime Ripard:

    Only a single patch in here that fixes a DTC warning.

    * tag 'sunxi-dt-for-3.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
    ARM: dt: sun6i: Add #address-cells and #size-cells to i2c controller nodes

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     
  • In __ftrace_replace_code(), when converting the call to a nop in a function
    it needs to compare against the "curr" (current) value of the ftrace ops, and
    not the "new" one. It currently does not affect x86 which is the only arch
    to do the trampolines with function graph tracer, but when other archs that do
    depend on this code implement the function graph trampoline, it can crash.

    Here's an example when ARM uses the trampolines (in the future):

    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 9 at kernel/trace/ftrace.c:1716 ftrace_bug+0x17c/0x1f4()
    Modules linked in: omap_rng rng_core ipv6
    CPU: 0 PID: 9 Comm: migration/0 Not tainted 3.16.0-test-10959-gf0094b28f303-dirty #52
    [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
    [] (show_stack) from [] (dump_stack+0x78/0x94)
    [] (dump_stack) from [] (warn_slowpath_common+0x7c/0x9c)
    [] (warn_slowpath_common) from [] (warn_slowpath_null+0x2c/0x34)
    [] (warn_slowpath_null) from [] (ftrace_bug+0x17c/0x1f4)
    [] (ftrace_bug) from [] (ftrace_replace_code+0x80/0x9c)
    [] (ftrace_replace_code) from [] (ftrace_modify_all_code+0xb8/0x164)
    [] (ftrace_modify_all_code) from [] (__ftrace_modify_code+0x14/0x1c)
    [] (__ftrace_modify_code) from [] (multi_cpu_stop+0xf4/0x134)
    [] (multi_cpu_stop) from [] (cpu_stopper_thread+0x54/0x130)
    [] (cpu_stopper_thread) from [] (smpboot_thread_fn+0x1ac/0x1bc)
    [] (smpboot_thread_fn) from [] (kthread+0xe0/0xfc)
    [] (kthread) from [] (ret_from_fork+0x14/0x20)
    ---[ end trace dc9ce72c5b617d8f ]---
    [ 65.047264] ftrace failed to modify [] asm_do_IRQ+0x10/0x1c
    [ 65.054070] actual: 85:1b:00:eb

    Fixes: 7413af1fb70e7 "ftrace: Make get_ftrace_addr() and get_ftrace_addr_old() global"
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • The latest rewrite of ftrace removed the separate ftrace_ops of
    the function tracer and the function graph tracer and had them
    share the same ftrace_ops. This simplified the accounting by removing
    the multiple layers of functions called, where the global_ops func
    would call a special list that would iterate over the other ops that
    were registered within it (like function and function graph), which
    itself was registered to the ftrace ops list of all functions
    currently active. If that sounds confusing, the code that implemented
    it was also confusing and its removal is a good thing.

    The problem with this change was that it assumed that the function
    and function graph tracer can never be used at the same time.
    This is mostly true, but there is an exception. That is when the
    function profiler uses the function graph tracer to profile.
    The function profiler can be activated the same time as the function
    tracer, and this breaks the assumption and the result is that ftrace
    will crash (it detects the error and shuts itself down, it does not
    cause a kernel oops).

    To solve this issue, a previous change allowed the hash tables
    for the functions traced by a ftrace_ops to be a pointer and let
    multiple ftrace_ops share the same hash. This allows the function
    and function_graph tracer to have separate ftrace_ops, but still
    share the hash, which is what is done.

    Now the function and function graph tracers have separate ftrace_ops
    again, and the function tracer can be run while the function_profile
    is active.

    Cc: stable@vger.kernel.org # 3.16 (apply after 3.17-rc4 is out)
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • If a SIGKILL is sent to a task waiting in __nfs_iocounter_wait,
    it will busy-wait or soft lockup in its while loop.
    nfs_wait_bit_killable won't sleep, and the loop won't exit on
    the error return.

    Stop the busy-wait by breaking out of the loop when
    nfs_wait_bit_killable returns an error.

    Signed-off-by: David Jeffery
    Signed-off-by: Trond Myklebust

    David Jeffery
     
  • Commit 6094f83864c1d1296566a282cba05ba613f151ee
    "nfs: allow coalescing of subpage requests" got rid of the requirement
    that requests cover whole pages, but it made some incorrect assumptions.

    It turns out that callers of this interface can map adjacent requests
    (by file position as seen by req_offset + req->wb_bytes) to different pages,
    even when they could share a page. An example is the direct I/O interface -
    iov_iter_get_pages_alloc may return one segment with a partial page filled
    and the next segment (which is adjacent in the file position) starts with a
    new page.

    Reported-by: Toralf Förster
    Signed-off-by: Weston Andros Adamson
    Signed-off-by: Trond Myklebust

    Weston Andros Adamson
     
  • Adjacent requests that share the same page are allowed, but should only
    use one entry in the page vector. This avoids overruning the page
    vector - it is sized based on how many bytes there are, not by
    request count.

    This fixes issues that manifest as "Redzone overwritten" bugs (the
    vector overrun) and hangs waiting on page read / write, as it waits on
    the same page more than once.

    This also adds bounds checking to the page vector with a graceful failure
    (WARN_ON_ONCE and pgio error returned to application).

    Reported-by: Toralf Förster
    Signed-off-by: Weston Andros Adamson
    Signed-off-by: Trond Myklebust

    Weston Andros Adamson
     
  • This handles the 'nonblock=false' case in nfs_lock_and_join_requests.
    If the group is already locked and blocking is allowed, drop the inode lock
    and wait for the group lock to be cleared before trying it all again.
    This should fix warnings found in peterz's tree (sched/wait branch), where
    might_sleep() checks are added to wait.[ch].

    Reported-by: Fengguang Wu
    Signed-off-by: Weston Andros Adamson
    Reviewed-by: Peng Tao
    Signed-off-by: Trond Myklebust

    Weston Andros Adamson
     
  • This fixes handling of errors from nfs_page_group_lock in
    nfs_lock_and_join_requests. It now releases the inode lock and the
    reference to the head request.

    Reported-by: Peng Tao
    Signed-off-by: Weston Andros Adamson
    Reviewed-by: Peng Tao
    Signed-off-by: Trond Myklebust

    Weston Andros Adamson
     
  • __nfs_pageio_add_request was calling nfs_page_group_lock nonblocking, but
    this can return -EAGAIN which would end up passing -EIO to the application.

    There is no reason not to block in this path, so change the two calls to
    do so. Also, there is no need to check the return value of
    nfs_page_group_lock when nonblock=false, so remove the error handling code.

    Signed-off-by: Weston Andros Adamson
    Reviewed-by: Peng Tao
    Signed-off-by: Trond Myklebust

    Weston Andros Adamson
     
  • nfs_page_group_lock was calling wait_on_bit_lock even when told not to
    block. Fix by first trying test_and_set_bit, followed by wait_on_bit_lock
    if and only if blocking is allowed. Return -EAGAIN if nonblocking and the
    test_and_set of the bit was already locked.

    Signed-off-by: Weston Andros Adamson
    Reviewed-by: Peng Tao
    Signed-off-by: Trond Myklebust

    Weston Andros Adamson
     
  • Flip the meaning of the second argument from 'wait' to 'nonblock' to
    match related functions. Update all five calls to reflect this change.

    Signed-off-by: Weston Andros Adamson
    Reviewed-by: Peng Tao
    Signed-off-by: Trond Myklebust

    Weston Andros Adamson
     
  • …ierry.reding/linux-pwm

    Pull pwm fix from Thierry Reding:
    "Just one bugfix for the PWM lookup table code that would cause a PWM
    channel to be set to the wrong period and polarity for non-perfect
    matches"

    * tag 'pwm/for-3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
    pwm: Fix period and polarity in pwm_get() for non-perfect matches

    Linus Torvalds
     
  • The new_ctx pointer is set only for non-chanctx drivers. This yielded a
    crash for chanctx-based drivers during channel switch finalization:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
    IP: ieee80211_vif_use_reserved_switch+0x71c/0xb00 [mac80211]

    Use an adequate chanctx pointer to fix this.

    Reported-by: Linus Torvalds
    Signed-off-by: Michal Kazior
    Signed-off-by: Linus Torvalds

    Michal Kazior
     
  • Pull networking fixes from David Miller:
    "Here are some bug fixes that have piled up during ksummit/linuxcon.

    1) Fix endian problems in ibmveth, from Anton Blanchard.

    2) IPV6 routing code does GFP_KERNEL allocation in atomic, fix from
    Benjamin Block.

    3) SCTP association fixes from Daniel Borkmann.

    4) When multiple VLAN headers are present we have to make sure the
    second and subsequent ones are pullable in the SKB otherwise we
    blindly dereference garbage. From Jiri Benc.

    5) The argument adjustment of the signature of hlist_add_after*()
    introduced a regression in the batman-adv code, fix from Sven
    Eckelmann.

    6) Fix TX hang handling to avoid a panic in i40e, from Anjali Singhai
    Jain.

    7) PTP flag test is inverted in i40e driver, from Jesse Brandeburg.

    8) ATM LEC driver needs to hold RTNL mutex over MTU changes, from
    Chas Williams.

    9) Truncate packets larger then the TPACKET_V3 format configured
    buffers, otherwise we overwrite past the end of said buffers.
    From Eric Dumazet.

    10) Fix endianness bugs in qlcnic firmware handling, from Rajesh
    Borundia and Shahed Shaikh.

    11) CXGB4 sometimes doesn't get all of the TX completion events it
    should resulting in SKBs getting stuck in the TX queue, from
    Hariprasad Shenai.

    12) When the FEC chip's PTP clock is disabled, you can't access the
    register. Add necessary checks to avoid the resulting hang, from
    Fugang Duan"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (37 commits)
    drivers: isdn: eicon: xdi_msg.h: Fix typo in #ifndef
    net: sctp: fix suboptimal edge-case on non-active active/retrans path selection
    net: sctp: spare unnecessary comparison in sctp_trans_elect_best
    net: ethernet: broadcom: bnx2x: Remove redundant #ifdef
    ibmveth: Fix endian issues with rx_no_buffer statistic
    net: xgene: fix possible NULL dereference in xgene_enet_free_desc_rings()
    openvswitch: fix panic with multiple vlan headers
    net: ipv6: fib: don't sleep inside atomic lock
    net: fec: ptp: avoid register access when ipg clock is disabled
    cxgb4: Free completed tx skbs promptly
    cxgb4: Fix race condition in cleanup
    sctp: not send SCTP_PEER_ADDR_CHANGE notifications with failed probe
    bnx2x: Revert UNDI flushing mechanism
    qlcnic: Fix endianess issue in firmware load from file operation
    qlcnic: Fix endianess issue in FW dump template header
    qlcnic: Fix flash access interface to application
    MAINTAINERS: Add section for MRF24J40 IEEE 802.15.4 radio driver
    macvlan: Allow setting multicast filter on all macvlan types
    packet: handle too big packets for PACKET_V3
    MAINTAINERS: add entry for ec_bhf driver
    ...

    Linus Torvalds
     
  • Now that a ftrace_hash can be shared by multiple ftrace_ops, they can dec
    the rec->flags by more than once (one per those that share the ftrace_hash).
    This means that the tramp_hash may not have a hash item when it was added.

    For example, if two ftrace_ops share a hash for a ftrace record, and the
    first ops has a trampoline, when it adds itself it will set the rec->flags
    TRAMP flag and increments its nr_trampolines counter. When the second ops
    is added, it must clear that tramp flag but also decrement the other ops
    that shares its hash. As the update to the function callbacks has not yet
    been performed, the other ops will not have the tramp hash set yet and it
    can not be used to know to decrement its nr_trampolines.

    Luckily, the tramp_hash does not need to be used. As the ftrace_mutex is
    held, a ops with a trampoline to a record during an update of another ops
    that shares the record will have its func_hash pointing to it. Since a
    trampoline can only be set for a record if only one ops is attached to it,
    we can just check if the record has a trampoline (the FTRACE_FL_TRAMP flag
    is set) and then find the ops that has this record in its hashes.

    Also added some output to help debug when things go wrong.

    Cc: stable@vger.kernel.org # 3.16+ (apply after 3.17-rc4 is out)
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • Test for definedness of the macro which is actually defined (the
    change is hard to see: it is s/SSS/SSA/).

    Signed-off-by: Rasmus Villemoes
    Signed-off-by: David S. Miller

    Rasmus Villemoes