30 Aug, 2018

16 commits

  • The rcu_torture_writer() function invokes stutter_wait() at the end of
    each writer pass, which occasionally blocks for an extended time period
    in order to ensure that RCU can handle intermittent loads. But part of
    handling a busy period is invoking all the callbacks before the end of
    the idle period induced by stutter_wait().

    This commit therefore adds a return value to stutter_wait() indicating
    whether stutter_wait() actually waited. In addition, this commit causes
    rcu_torture_writer() to test this value and if set, checks that all the
    elements of the rcu_tortures[] array have been freed up.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • This commit prints the duration of the forward-progress test interval in
    the case that no forward progress was observed as an aid to debugging.
    When forward progress does happen, it prints out the number of
    rcu_torture_writer() versions and grace periods that elapsed during the
    forward-progress test. At the end of the run, it also prints the number
    of attempted and actual forward-progress tests.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Currently, rcutorture provisions rcu_torture_reader() kthreads based
    on the initial number of CPUs. This can be problematic when CPU hotplug
    is enabled, as a system with a very large number of CPUs will provision
    a very large number of rcu_torture_reader() kthreads. All of these
    kthreads will continue running even if the CPU-hotplug operations result
    in only one remaining online CPU. This can result in all sorts of strange
    artifacts due simply to massive overload.

    This commit therefore causes the rcu_torture_reader() kthreads to start
    blocking as the number of online CPUs decreases. This is accomplished
    by numbering these kthreads, and having each check to make sure that the
    number of online CPUs is at least as large as its assigned number.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • On !SMP tests, the forward-progress kthread might prevent RCU's
    grace-period kthread from running, which would defeat RCU's
    forward-progress measures. On PREEMPT tests without RCU priority
    boosting, the forward-progress kthread might preempt a reader for an
    extended time period, which would also defeat RCU's forward-progress
    measures. This commit therefore reduced rcutorture's forward-progress
    kthread's priority in those cases.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • There are debug checks in some environments that will complain if the
    duration of a bh-disabled region of code exceeds about 50 milliseconds.
    Because rcu_read_delay() can produce a 50-millisecond delay and because
    there could be up to eight reader segments with such delays, this commit
    limits the maximum delay to 10 milliseconds if either interrupts or
    softirqs are disabled.

    Reported-by: Thomas Gleixner
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • RCU now takes certain actions 100 and 200 milliseconds into a grace period
    by default, but rcutorture only runs RCU read-side critical sections
    with durations up to 50 milliseconds. This commit therefore increases
    test coverage by increasing the maximum critical-section duration to
    300 milliseconds. Note that the existing code automatically dials down
    the probability of long delays based on the maximum duration, which means
    that this change should not significantly change the rate of execution
    of RCU read-side critical sections.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • If rcutorture is run on a quiet system with the rcutorture.stutter module
    parameter set high, then there can legitimately be an extended period
    during which no RCU forward progress takes place. This can result
    in false-positive no-forward-progress splats. This commit therefore
    makes rcu_torture_fwd_prog() create a self-propagating RCU callback
    to ensure that grace periods are in progress for the duration of the
    forward-progress test.

    Note that the RCU flavor under test must define ->call(), ->sync(),
    and ->cb_barrier() for this self-propagating callback to be created.
    If one or more of those rcu_torture_ops fields are NULL, then the
    rcu_torture_fwd_prog() function will silently proceed without creating
    the self-propagating callback.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Some of the Linux kernel's RCU implementations provide several mechanisms
    to promote forward progress that operate over different timeframes.
    This commit therefore causes rcu_torture_fwd_prog() to vary the duration
    of its forward-progress testing in order to test each such mechanism.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • In a too-short test, random delays can cause each attempt to do
    forward-progress testing to fail to complete, thus resulting in
    spurious splats. This commit therefore requires at least five tries
    before complaining about rcutorture runs that failed to produce at
    least one valid forward-progress testing attempt. Note that actual
    forward-progress failures will splat regardless of the number of tries.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Currently, rcutorture relies solely on the progress of
    rcu_torture_writer() to judge grace-period forward progress. In theory,
    this is the gold standard of forward progress, but in practice rcutorture
    separately detects and reports rcu_torture_writer() stalls. This commit
    therefore adds the grace-period sequence number (when provided) to the
    judgment of grace-period forward progress, which makes it easier to
    distinguish between failure of actual grace periods to progress on the
    one hand and downstream forward-progress failures on the other.

    For example, given this change, if rcu_torture_writer() stalls,
    but rcu_torture_fwd_prog() does not complain, then the grace-period
    computation is working, which is a hint that the failure lies in callback
    processing, wakeup of the rcu_torture_writer() kthread, or similar.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • This commit adds a kthread that loops going into and out of RCU
    read-side critical sections, but also including a cond_resched(),
    optionally guarded by a check of need_resched(), in that same loop.
    This commit relies solely on rcu_torture_writer() progress to judge
    the forward progress of grace periods.

    Note that Tasks RCU and SRCU are exempted from forward-progress testing
    due their (intentionally) less-robust forward-progress guarantees.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Now that there is only one RCU flavor to rule them all, the TREE06
    and TREE08 test scenarios are redundant. This commit therefore removes
    them. Later changes will rebalance and renumber the tests.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • When running a built-in rcuperf test, specifying an invalid perf type
    results in what looks like a hard hang, with the error messages hidden
    by other boot-time output. This commit therefore executes a WARN_ON()
    in this case so that the splat appears just following the error messages.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • When running a built-in rcutorture test, specifying an invalid torture
    type results in what looks like a hard hang, with the error messages
    hidden by other boot-time output. This commit therefore executes a
    WARN_ON() in this case so that the splat appears just following the
    error messages.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Deferred quiescent states can interact with the scheduler, but
    rcu_torture_reader() does not force such interaction all that frequently.
    This commit therefore blocks for one jiffy after ten jiffies of read-side
    runtime. This has the beneficial effect of being most likely to block
    just after long-running readers, and it is exactly these readers that
    are most likely to have been preempted (in CONFIG_PREEMPT=y kernels).
    This in turn helps increase the probability that a deferred quiescent
    state will be seen by RCU's context-switch hooks.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • The old approach placed all the build products into the b* directories,
    which meant that some of these build products needed to be copied to
    the proper directory in the res hierarchy. The new approach leaves
    things like .config and the .o files in the b1 directory, but directs
    build output and diagnostics directly to the proper directory in the
    res hierarchy. Unfortunately, one of the copies was still carried out,
    which could (and sometimes did) overwrite the build output and diagnostics
    with obsolete output remaining in the b1 directory.

    This commit therefore removes the offending "cp" command.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     

27 Aug, 2018

8 commits

  • Linus Torvalds
     
  • Pull timer update from Thomas Gleixner:
    "New defines for the compat time* types so they can be shared between
    32bit and 64bit builds. Not used yet, but merging them now allows the
    actual conversions to be merged through different maintainer trees
    without dependencies

    We still have compat interfaces for 32bit on 64bit even with the new
    2038 safe timespec/val variants because pointer size is different. And
    for the old style timespec/val interfaces we need yet another 'compat'
    interface for both 32bit native and 32bit on 64bit"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    y2038: Provide aliases for compat helpers

    Linus Torvalds
     
  • Pull IDA updates from Matthew Wilcox:
    "A better IDA API:

    id = ida_alloc(ida, GFP_xxx);
    ida_free(ida, id);

    rather than the cumbersome ida_simple_get(), ida_simple_remove().

    The new IDA API is similar to ida_simple_get() but better named. The
    internal restructuring of the IDA code removes the bitmap
    preallocation nonsense.

    I hope the net -200 lines of code is convincing"

    * 'ida-4.19' of git://git.infradead.org/users/willy/linux-dax: (29 commits)
    ida: Change ida_get_new_above to return the id
    ida: Remove old API
    test_ida: check_ida_destroy and check_ida_alloc
    test_ida: Convert check_ida_conv to new API
    test_ida: Move ida_check_max
    test_ida: Move ida_check_leaf
    idr-test: Convert ida_check_nomem to new API
    ida: Start new test_ida module
    target/iscsi: Allocate session IDs from an IDA
    iscsi target: fix session creation failure handling
    drm/vmwgfx: Convert to new IDA API
    dmaengine: Convert to new IDA API
    ppc: Convert vas ID allocation to new IDA API
    media: Convert entity ID allocation to new IDA API
    ppc: Convert mmu context allocation to new IDA API
    Convert net_namespace to new IDA API
    cb710: Convert to new IDA API
    rsxx: Convert to new IDA API
    osd: Convert to new IDA API
    sd: Convert to new IDA API
    ...

    Linus Torvalds
     
  • Pull gcc plugin fix from Kees Cook:
    "Lift gcc test into Kconfig. This is for better behavior when the
    kernel is built with Clang, reported by Stefan Agner"

    * tag 'gcc-plugins-v4.19-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    gcc-plugins: Disable when building under Clang

    Linus Torvalds
     
  • Pull perf updates from Thomas Gleixner:
    "Kernel:
    - Improve kallsyms coverage
    - Add x86 entry trampolines to kcore
    - Fix ARM SPE handling
    - Correct PPC event post processing

    Tools:
    - Make the build system more robust
    - Small fixes and enhancements all over the place
    - Update kernel ABI header copies
    - Preparatory work for converting libtraceevnt to a shared library
    - License cleanups"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits)
    tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy'
    tools arch x86: Update tools's copy of cpufeatures.h
    perf python: Fix pyrf_evlist__read_on_cpu() interface
    perf mmap: Store real cpu number in 'struct perf_mmap'
    perf tools: Remove ext from struct kmod_path
    perf tools: Add gzip_is_compressed function
    perf tools: Add lzma_is_compressed function
    perf tools: Add is_compressed callback to compressions array
    perf tools: Move the temp file processing into decompress_kmodule
    perf tools: Use compression id in decompress_kmodule()
    perf tools: Store compression id into struct dso
    perf tools: Add compression id into 'struct kmod_path'
    perf tools: Make is_supported_compression() static
    perf tools: Make decompress_to_file() function static
    perf tools: Get rid of dso__needs_decompress() call in __open_dso()
    perf tools: Get rid of dso__needs_decompress() call in symbol__disassemble()
    perf tools: Get rid of dso__needs_decompress() call in read_object_code()
    tools lib traceevent: Change to SPDX License format
    perf llvm: Allow passing options to llc in addition to clang
    perf parser: Improve error message for PMU address filters
    ...

    Linus Torvalds
     
  • Pull x86 fixes from Thomas Gleixner:

    - Correct the L1TF fallout on 32bit and the off by one in the 'too much
    RAM for protection' calculation.

    - Add a helpful kernel message for the 'too much RAM' case

    - Unbreak the VDSO in case that the compiler desides to use indirect
    jumps/calls and emits retpolines which cannot be resolved because the
    kernel uses its own thunks, which does not work for the VDSO. Make it
    use the builtin thunks.

    - Re-export start_thread() which was unexported when the 32/64bit
    implementation was unified. start_thread() is required by modular
    binfmt handlers.

    - Trivial cleanups

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/speculation/l1tf: Suggest what to do on systems with too much RAM
    x86/speculation/l1tf: Fix off-by-one error when warning that system has too much RAM
    x86/kvm/vmx: Remove duplicate l1d flush definitions
    x86/speculation/l1tf: Fix overflow in l1tf_pfn_limit() on 32bit
    x86/process: Re-export start_thread()
    x86/mce: Add notifier_block forward declaration
    x86/vdso: Fix vDSO build if a retpoline is emitted

    Linus Torvalds
     
  • Pull irq update from Thomas Gleixner:
    "A small set of updats/fixes for the irq subsystem:

    - Allow GICv3 interrupts to be configured as wake-up sources to
    enable wakeup from suspend

    - Make the error handling of the STM32 irqchip init function work

    - A set of small cleanups and improvements"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    irqchip/gic-v3: Allow interrupt to be configured as wake-up sources
    irqchip/tango: Set irq handler and data in one go
    dt-bindings: irqchip: renesas-irqc: Document r8a774a1 support
    irqchip/s3c24xx: Remove unneeded comparison of unsigned long to 0
    irqchip/stm32: Fix init error handling
    irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP

    Linus Torvalds
     
  • Pull licking update from Thomas Gleixner:
    "Mark the switch cases which fall through to the next case with the
    proper comment so the fallthrough compiler checks can be enabled"

    * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    futex: Mark expected switch fall-throughs

    Linus Torvalds
     

26 Aug, 2018

10 commits

  • …/linux/kernel/git/nvdimm/nvdimm

    Pull libnvdimm memory-failure update from Dave Jiang:
    "As it stands, memory_failure() gets thoroughly confused by dev_pagemap
    backed mappings. The recovery code has specific enabling for several
    possible page states and needs new enabling to handle poison in dax
    mappings.

    In order to support reliable reverse mapping of user space addresses:

    1/ Add new locking in the memory_failure() rmap path to prevent races
    that would typically be handled by the page lock.

    2/ Since dev_pagemap pages are hidden from the page allocator and the
    "compound page" accounting machinery, add a mechanism to determine
    the size of the mapping that encompasses a given poisoned pfn.

    3/ Given pmem errors can be repaired, change the speculatively
    accessed poison protection, mce_unmap_kpfn(), to be reversible and
    otherwise allow ongoing access from the kernel.

    A side effect of this enabling is that MADV_HWPOISON becomes usable
    for dax mappings, however the primary motivation is to allow the
    system to survive userspace consumption of hardware-poison via dax.
    Specifically the current behavior is:

    mce: Uncorrected hardware memory error in user-access at af34214200
    {1}[Hardware Error]: It has been corrected by h/w and requires no further action
    mce: [Hardware Error]: Machine check events logged
    {1}[Hardware Error]: event severity: corrected
    Memory failure: 0xaf34214: reserved kernel page still referenced by 1 users
    [..]
    Memory failure: 0xaf34214: recovery action for reserved kernel page: Failed
    mce: Memory error not recovered
    <reboot>

    ...and with these changes:

    Injecting memory failure for pfn 0x20cb00 at process virtual address 0x7f763dd00000
    Memory failure: 0x20cb00: Killing dax-pmd:5421 due to hardware memory corruption
    Memory failure: 0x20cb00: recovery action for dax page: Recovered

    Given all the cross dependencies I propose taking this through
    nvdimm.git with acks from Naoya, x86/core, x86/RAS, and of course dax
    folks"

    * tag 'libnvdimm-for-4.19_dax-memory-failure' of gitolite.kernel.org:pub/scm/linux/kernel/git/nvdimm/nvdimm:
    libnvdimm, pmem: Restore page attributes when clearing errors
    x86/memory_failure: Introduce {set, clear}_mce_nospec()
    x86/mm/pat: Prepare {reserve, free}_memtype() for "decoy" addresses
    mm, memory_failure: Teach memory_failure() about dev_pagemap pages
    filesystem-dax: Introduce dax_lock_mapping_entry()
    mm, memory_failure: Collect mapping size in collect_procs()
    mm, madvise_inject_error: Let memory_failure() optionally take a page reference
    mm, dev_pagemap: Do not clear ->mapping on final put
    mm, madvise_inject_error: Disable MADV_SOFT_OFFLINE for ZONE_DEVICE pages
    filesystem-dax: Set page->index
    device-dax: Set page->index
    device-dax: Enable page_mapping()
    device-dax: Convert to vmf_insert_mixed and vm_fault_t

    Linus Torvalds
     
  • Pull libnvdimm updates from Dave Jiang:
    "Collection of misc libnvdimm patches for 4.19 submission:

    - Adding support to read locked nvdimm capacity.

    - Change test code to make DSM failure code injection an override.

    - Add support for calculate maximum contiguous area for namespace.

    - Add support for queueing a short ARS when there is on going ARS for
    nvdimm.

    - Allow NULL to be passed in to ->direct_access() for kaddr and pfn
    params.

    - Improve smart injection support for nvdimm emulation testing.

    - Fix test code that supports for emulating controller temperature.

    - Fix hang on error before devm_memremap_pages()

    - Fix a bug that causes user memory corruption when data returned to
    user for ars_status.

    - Maintainer updates for Ross Zwisler emails and adding Jan Kara to
    fsdax"

    * tag 'libnvdimm-for-4.19_misc' of gitolite.kernel.org:pub/scm/linux/kernel/git/nvdimm/nvdimm:
    libnvdimm: fix ars_status output length calculation
    device-dax: avoid hang on error before devm_memremap_pages()
    tools/testing/nvdimm: improve emulation of smart injection
    filesystem-dax: Do not request kaddr and pfn when not required
    md/dm-writecache: Don't request pointer dummy_addr when not required
    dax/super: Do not request a pointer kaddr when not required
    tools/testing/nvdimm: kaddr and pfn can be NULL to ->direct_access()
    s390, dcssblk: kaddr and pfn can be NULL to ->direct_access()
    libnvdimm, pmem: kaddr and pfn can be NULL to ->direct_access()
    acpi/nfit: queue issuing of ars when an uc error notification comes in
    libnvdimm: Export max available extent
    libnvdimm: Use max contiguous area for namespace size
    MAINTAINERS: Add Jan Kara for filesystem DAX
    MAINTAINERS: update Ross Zwisler's email address
    tools/testing/nvdimm: Fix support for emulating controller temperature
    tools/testing/nvdimm: Make DSM failure code injection an override
    acpi, nfit: Prefer _DSM over _LSR for namespace label reads
    libnvdimm: Introduce locked DIMM capacity support

    Linus Torvalds
     
  • Pull ARM SoC late updates from Olof Johansson:
    "A couple of late-merged changes that would be useful to get in this
    merge window:

    - Driver support for reset of audio complex on Meson platforms. The
    audio driver went in this merge window, and these changes have been
    in -next for a while (just not in our tree).

    - Power management fixes for IOMMU on Rockchip platforms, getting
    closer to kexec working on them, including Chromebooks.

    - Another pass updating "arm,psci" -> "psci" for some properties that
    have snuck in since last time it was done"

    * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    iommu/rockchip: Move irq request past pm_runtime_enable
    iommu/rockchip: Handle errors returned from PM framework
    arm64: rockchip: Force CONFIG_PM on Rockchip systems
    ARM: rockchip: Force CONFIG_PM on Rockchip systems
    arm64: dts: Fix various entry-method properties to reflect documentation
    reset: imx7: Fix always writing bits as 0
    reset: meson: add meson audio arb driver
    reset: meson: add dt-bindings for meson-axg audio arb

    Linus Torvalds
     
  • Pull more Kbuild updates from Masahiro Yamada:

    - add build_{menu,n,g,x}config targets for compile-testing Kconfig

    - fix and improve recursive dependency detection in Kconfig

    - fix parallel building of menuconfig/nconfig

    - fix syntax error in clang-version.sh

    - suppress distracting log from syncconfig

    - remove obsolete "rpm" target

    - remove VMLINUX_SYMBOL(_STR) macro entirely

    - fix microblaze build with CONFIG_DYNAMIC_FTRACE

    - move compiler test for dead code/data elimination to Kconfig

    - rename well-known LDFLAGS variable to KBUILD_LDFLAGS

    - misc fixes and cleanups

    * tag 'kbuild-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: rename LDFLAGS to KBUILD_LDFLAGS
    kbuild: pass LDFLAGS to recordmcount.pl
    kbuild: test dead code/data elimination support in Kconfig
    initramfs: move gen_initramfs_list.sh from scripts/ to usr/
    vmlinux.lds.h: remove stale include
    export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR()
    Coccinelle: remove pci_alloc_consistent semantic to detect in zalloc-simple.cocci
    kbuild: make sorting initramfs contents independent of locale
    kbuild: remove "rpm" target, which is alias of "rpm-pkg"
    kbuild: Fix LOADLIBES rename in Documentation/kbuild/makefiles.txt
    kconfig: suppress "configuration written to .config" for syncconfig
    kconfig: fix "Can't open ..." in parallel build
    kbuild: Add a space after `!` to prevent parsing as file pattern
    scripts: modpost: check memory allocation results
    kconfig: improve the recursive dependency report
    kconfig: report recursive dependency involving 'imply'
    kconfig: error out when seeing recursive dependency
    kconfig: add build-only configurator targets
    scripts/dtc: consolidate include path options in Makefile

    Linus Torvalds
     
  • Pull block fixes from Jens Axboe:
    "A few small fixes for this merge window:

    - Locking imbalance fix for bcache (Shan Hai)

    - A few small fixes for wbt. One is a cleanup/prep, one is a fix for
    an existing issue, and the last two are fixes for changes that went
    into this merge window (me)"

    * tag 'for-linus-20180825' of git://git.kernel.dk/linux-block:
    blk-wbt: don't maintain inflight counts if disabled
    blk-wbt: fix has-sleeper queueing check
    blk-wbt: use wq_has_sleeper() for wq active check
    blk-wbt: move disable check into get_limit()
    bcache: release dc->writeback_lock properly in bch_writeback_thread()

    Linus Torvalds
     
  • Pull UBIFS fix from Richard Weinberger:
    "Remove an empty file from UBIFS source"

    * tag 'upstream-4.19-rc1-fix' of git://git.infradead.org/linux-ubifs:
    ubifs: Remove empty file.h

    Linus Torvalds
     
  • Pull cifs fixes from Steve French:
    "Three small SMB3 fixes, one for stable"

    * tag '4.19-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6:
    cifs: update internal module version number for cifs.ko to 2.12
    cifs: check kmalloc before use
    cifs: check if SMB2 PDU size has been padded and suppress the warning
    cifs: create a define for how many iovs we need for an SMB2_open()

    Linus Torvalds
     
  • This is not normally noticeable, but repeated forks are unnecessarily
    expensive because they repeatedly dirty the parent page tables during
    the page table copy operation.

    It's trivial to just avoid write protecting the page table entry if it
    was already not writable.

    This patch was inspired by

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

    which points to an ancient "waste time re-doing fork" issue in the
    presence of lots of signals.

    That bug was fixed by Eric Biederman's signal handling series
    culminating in commit c3ad2c3b02e9 ("signal: Don't restart fork when
    signals come in"), but the unnecessary work for repeated forks is still
    work just fixing, particularly since the fix is trivial.

    Cc: Eric Biederman
    Cc: Oleg Nesterov
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • At the point where r is being checked for different values, r is always
    going to be equal to 2 as the previous if statements jump to end or end1
    if r is not 2. Hence the assignment to err can be simplified to just
    err an assignment without any checks on the value or r.

    Detected by CoverityScan, CID#1226737 ("Logically dead code")

    Signed-off-by: Colin Ian King
    Reviewed-by: Mikulas Patocka
    Signed-off-by: Linus Torvalds

    Colin Ian King
     
  • Tejun Heo wrote:
    >
    > I asked Jens whether he could take care of the libata tree and he
    > thankfully agreed, so, from now on, Jens will be the libata
    > maintainer.
    >
    > Thanks a lot!

    Thanks for your work in this area. I still remember the first linux
    storage summit we did in Vancouver 2001, Tejun was invited to talk about
    his libata error handling work. Before that, it was basically a crap
    shoot if we recovered properly or not... A lot of water has flown under
    the bridge since then!

    Here's an "official" patch. Linus, can you apply it?

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

25 Aug, 2018

6 commits

  • Pull libata updates from Tejun Heo:
    "Nothing too interesting. Mostly ahci and ahci_platform changes, many
    around power management"

    * 'for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (22 commits)
    ata: ahci_platform: enable to get and control reset
    ata: libahci_platform: add reset control support
    ata: add an extra argument to ahci_platform_get_resources()
    ata: sata_rcar: Add r8a77965 support
    ata: sata_rcar: exclude setting of PHY registers in Gen3
    ata: sata_rcar: really mask all interrupts on Gen2 and later
    Revert "ata: ahci_platform: allow disabling of hotplug to save power"
    ata: libahci: Allow reconfigure of DEVSLP register
    ata: libahci: Correct setting of DEVSLP register
    ata: ahci: Enable DEVSLP by default on x86 with SLP_S0
    ata: ahci: Support state with min power but Partial low power state
    Revert "ata: ahci_platform: convert kcalloc to devm_kcalloc"
    ata: sata_rcar: Add rudimentary Runtime PM support
    ata: sata_rcar: Provide a short-hand for &pdev->dev
    ata: Only output sg element mapped number in verbose debug
    ata: Guard ata_scsi_dump_cdb() by ATA_VERBOSE_DEBUG
    ata: ahci_platform: convert kcalloc to devm_kcalloc
    ata: ahci_platform: convert kzallloc to kcalloc
    ata: ahci_platform: correct parameter documentation for ahci_platform_shutdown
    libata: remove ata_sff_data_xfer_noirq()
    ...

    Linus Torvalds
     
  • Pull cgroup updates from Tejun Heo:
    "Just one commit from Steven to take out spin lock from trace event
    handlers"

    * 'for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    cgroup/tracing: Move taking of spin lock out of trace event handlers

    Linus Torvalds
     
  • Pull workqueue updates from Tejun Heo:
    "Over the lockdep cross-release churn, workqueue lost some of the
    existing annotations. Johannes Berg restored it and also improved
    them"

    * 'for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
    workqueue: re-add lockdep dependencies for flushing
    workqueue: skip lockdep wq dependency in cancel_work_sync()

    Linus Torvalds
     
  • Pull IOMMU updates from Joerg Roedel:

    - PASID table handling updates for the Intel VT-d driver. It implements
    a global PASID space now so that applications usings multiple devices
    will just have one PASID.

    - A new config option to make iommu passthroug mode the default.

    - New sysfs attribute for iommu groups to export the type of the
    default domain.

    - A debugfs interface (for debug only) usable by IOMMU drivers to
    export internals to user-space.

    - R-Car Gen3 SoCs support for the ipmmu-vmsa driver

    - The ARM-SMMU now aborts transactions from unknown devices and devices
    not attached to any domain.

    - Various cleanups and smaller fixes all over the place.

    * tag 'iommu-updates-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (42 commits)
    iommu/omap: Fix cache flushes on L2 table entries
    iommu: Remove the ->map_sg indirection
    iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel
    iommu/arm-smmu-v3: Prevent any devices access to memory without registration
    iommu/ipmmu-vmsa: Don't register as BUS IOMMU if machine doesn't have IPMMU-VMSA
    iommu/ipmmu-vmsa: Clarify supported platforms
    iommu/ipmmu-vmsa: Fix allocation in atomic context
    iommu: Add config option to set passthrough as default
    iommu: Add sysfs attribyte for domain type
    iommu/arm-smmu-v3: sync the OVACKFLG to PRIQ consumer register
    iommu/arm-smmu: Error out only if not enough context interrupts
    iommu/io-pgtable-arm-v7s: Abort allocation when table address overflows the PTE
    iommu/io-pgtable-arm: Fix pgtable allocation in selftest
    iommu/vt-d: Remove the obsolete per iommu pasid tables
    iommu/vt-d: Apply per pci device pasid table in SVA
    iommu/vt-d: Allocate and free pasid table
    iommu/vt-d: Per PCI device pasid table interfaces
    iommu/vt-d: Add for_each_device_domain() helper
    iommu/vt-d: Move device_domain_info to header
    iommu/vt-d: Apply global PASID in SVA
    ...

    Linus Torvalds
     
  • Pull thermal management updates from Zhang Rui:

    - Add Daniel Lezcano as the reviewer of thermal framework and SoC
    driver changes (Daniel Lezcano).

    - Fix a bug in intel_dts_soc_thermal driver, which does not translate
    IO-APIC GSI (Global System Interrupt) into Linux irq number (Hans de
    Goede).

    - For device tree bindings, allow cooling devices sharing same trip
    point with same contribution value to share cooling map (Viresh
    Kumar).

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
    dt-bindings: thermal: Allow multiple devices to share cooling map
    MAINTAINERS: Add Daniel Lezcano as designated reviewer for thermal
    Thermal: Intel SoC DTS: Translate IO-APIC GSI number to linux irq number

    Linus Torvalds
     
  • …git/jj/linux-apparmor

    Pull apparmor updates from John Johansen:
    "There is nothing major this time just four bug fixes and a patch to
    remove some dead code:

    Cleanups:
    - remove no-op permission check in policy_unpack

    Bug fixes:
    - fix an error code in __aa_create_ns()
    - fix failure to audit context info in build_change_hat
    - check buffer bounds when mapping permissions mask
    - fully initialize aa_perms struct when answering userspace query"

    * tag 'apparmor-pr-2018-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
    apparmor: remove no-op permission check in policy_unpack
    apparmor: fix an error code in __aa_create_ns()
    apparmor: Fix failure to audit context info in build_change_hat
    apparmor: Fully initialize aa_perms struct when answering userspace query
    apparmor: Check buffer bounds when mapping permissions mask

    Linus Torvalds