17 Aug, 2020

1 commit


16 Aug, 2020

1 commit

  • Pull block fixes from Jens Axboe:
    "A few fixes on the block side of things:

    - Discard granularity fix (Coly)

    - rnbd cleanups (Guoqing)

    - md error handling fix (Dan)

    - md sysfs fix (Junxiao)

    - Fix flush request accounting, which caused an IO slowdown for some
    configurations (Ming)

    - Properly propagate loop flag for partition scanning (Lennart)"

    * tag 'block-5.9-2020-08-14' of git://git.kernel.dk/linux-block:
    block: fix double account of flush request's driver tag
    loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE
    rnbd: no need to set bi_end_io in rnbd_bio_map_kern
    rnbd: remove rnbd_dev_submit_io
    md-cluster: Fix potential error pointer dereference in resize_bitmaps()
    block: check queue's limits.discard_granularity in __blkdev_issue_discard()
    md: get sysfs entry after redundancy attr group create

    Linus Torvalds
     

11 Aug, 2020

1 commit

  • When LOOP_CONFIGURE is used with LO_FLAGS_PARTSCAN we need to propagate
    this into the GENHD_FL_NO_PART_SCAN. LOOP_SETSTATUS does this,
    LOOP_CONFIGURE doesn't so far. Effect is that setting up a loopback
    device with partition scanning doesn't actually work when LOOP_CONFIGURE
    is issued, though it works fine with LOOP_SETSTATUS.

    Let's correct that and propagate the flag in LOOP_CONFIGURE too.

    Fixes: 3448914e8cc5("loop: Add LOOP_CONFIGURE ioctl")

    Signed-off-by: Lennart Poettering
    Acked-by: Martijn Coenen
    Signed-off-by: Jens Axboe

    Lennart Poettering
     

08 Aug, 2020

3 commits

  • …kernel/git/sre/linux-power-supply") into android-mainline

    Merges along the way to 5.9-rc1

    resolves conflicts in:
    Documentation/ABI/testing/sysfs-class-power
    drivers/power/supply/power_supply_sysfs.c
    fs/crypto/inline_crypt.c

    Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
    Change-Id: Ia087834f54fb4e5269d68c3c404747ceed240701

    Greg Kroah-Hartman
     
  • Pull PCI updates from Bjorn Helgaas:
    "Enumeration:
    - Fix pci_cfg_wait queue locking problem (Bjorn Helgaas)
    - Convert PCIe capability PCIBIOS errors to errno (Bolarinwa Olayemi
    Saheed)
    - Align PCIe capability and PCI accessor return values (Bolarinwa
    Olayemi Saheed)
    - Fix pci_create_slot() reference count leak (Qiushi Wu)
    - Announce device after early fixups (Tiezhu Yang)

    PCI device hotplug:
    - Make rpadlpar functions static (Wei Yongjun)

    Driver binding:
    - Add device even if driver attach failed (Rajat Jain)

    Virtualization:
    - xen: Remove redundant initialization of irq (Colin Ian King)

    IOMMU:
    - Add pci_pri_supported() to check device or associated PF (Ashok Raj)
    - Release IVRS table in AMD ACS quirk (Hanjun Guo)
    - Mark AMD Navi10 GPU rev 0x00 ATS as broken (Kai-Heng Feng)
    - Treat "external-facing" devices themselves as internal (Rajat Jain)

    MSI:
    - Forward MSI-X error code in pci_alloc_irq_vectors_affinity() (Piotr
    Stankiewicz)

    Error handling:
    - Clear PCIe Device Status errors only if OS owns AER (Jonathan
    Cameron)
    - Log correctable errors as warning, not error (Matt Jolly)
    - Use 'pci_channel_state_t' instead of 'enum pci_channel_state' (Luc
    Van Oostenryck)

    Peer-to-peer DMA:
    - Allow P2PDMA on AMD Zen and newer CPUs (Logan Gunthorpe)

    ASPM:
    - Add missing newline in sysfs 'policy' (Xiongfeng Wang)

    Native PCIe controllers:
    - Convert to devm_platform_ioremap_resource_byname() (Dejin Zheng)
    - Convert to devm_platform_ioremap_resource() (Dejin Zheng)
    - Remove duplicate error message from devm_pci_remap_cfg_resource()
    callers (Dejin Zheng)
    - Fix runtime PM imbalance on error (Dinghao Liu)
    - Remove dev_err() when handing an error from platform_get_irq()
    (Krzysztof Wilczyński)
    - Use pci_host_bridge.windows list directly instead of splicing in a
    temporary list for cadence, mvebu, host-common (Rob Herring)
    - Use pci_host_probe() instead of open-coding all the pieces for
    altera, brcmstb, iproc, mobiveil, rcar, rockchip, tegra, v3,
    versatile, xgene, xilinx, xilinx-nwl (Rob Herring)
    - Default host bridge parent device to the platform device (Rob
    Herring)
    - Use pci_is_root_bus() instead of tracking root bus number
    separately in aardvark, designware (imx6, keystone,
    designware-host), mobiveil, xilinx-nwl, xilinx, rockchip, rcar (Rob
    Herring)
    - Set host bridge bus number in pci_scan_root_bus_bridge() instead of
    each driver for aardvark, designware-host, host-common, mediatek,
    rcar, tegra, v3-semi (Rob Herring)
    - Move DT resource setup into devm_pci_alloc_host_bridge() (Rob
    Herring)
    - Set bridge map_irq and swizzle_irq to default functions; drivers
    that don't support legacy IRQs (iproc) need to undo this (Rob
    Herring)

    ARM Versatile PCIe controller driver:
    - Drop flag PCI_ENABLE_PROC_DOMAINS (Rob Herring)

    Cadence PCIe controller driver:
    - Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property
    (Kishon Vijay Abraham I)
    - Remove "mem" from reg binding (Kishon Vijay Abraham I)
    - Fix cdns_pcie_{host|ep}_setup() error path (Kishon Vijay Abraham I)
    - Convert all r/w accessors to perform only 32-bit accesses (Kishon
    Vijay Abraham I)
    - Add support to start link and verify link status (Kishon Vijay
    Abraham I)
    - Allow pci_host_bridge to have custom pci_ops (Kishon Vijay Abraham I)
    - Add new *ops* for CPU addr fixup (Kishon Vijay Abraham I)
    - Fix updating Vendor ID and Subsystem Vendor ID register (Kishon
    Vijay Abraham I)
    - Use bridge resources for outbound window setup (Rob Herring)
    - Remove private bus number and range storage (Rob Herring)

    Cadence PCIe endpoint driver:
    - Add MSI-X support (Alan Douglas)

    HiSilicon PCIe controller driver:
    - Remove non-ECAM HiSilicon hip05/hip06 driver (Rob Herring)

    Intel VMD host bridge driver:
    - Use Shadow MEMBAR registers for QEMU/KVM guests (Jon Derrick)

    Loongson PCIe controller driver:
    - Use DECLARE_PCI_FIXUP_EARLY for bridge_class_quirk() (Tiezhu Yang)

    Marvell Aardvark PCIe controller driver:
    - Indicate error in 'val' when config read fails (Pali Rohár)
    - Don't touch PCIe registers if no card connected (Pali Rohár)

    Marvell MVEBU PCIe controller driver:
    - Setup BAR0 in order to fix MSI (Shmuel Hazan)

    Microsoft Hyper-V host bridge driver:
    - Fix a timing issue which causes kdump to fail occasionally (Wei Hu)
    - Make some functions static (Wei Yongjun)

    NVIDIA Tegra PCIe controller driver:
    - Revert tegra124 raw_violation_fixup (Nicolas Chauvet)
    - Remove PLL power supplies (Thierry Reding)

    Qualcomm PCIe controller driver:
    - Change duplicate PCI reset to phy reset (Abhishek Sahu)
    - Add missing ipq806x clocks in PCIe driver (Ansuel Smith)
    - Add missing reset for ipq806x (Ansuel Smith)
    - Add ext reset (Ansuel Smith)
    - Use bulk clk API and assert on error (Ansuel Smith)
    - Add support for tx term offset for rev 2.1.0 (Ansuel Smith)
    - Define some PARF params needed for ipq8064 SoC (Ansuel Smith)
    - Add ipq8064 rev2 variant (Ansuel Smith)
    - Support PCI speed set for ipq806x (Sham Muthayyan)

    Renesas R-Car PCIe controller driver:
    - Use devm_pci_alloc_host_bridge() (Rob Herring)
    - Use struct pci_host_bridge.windows list directly (Rob Herring)
    - Convert rcar-gen2 to use modern host bridge probe functions (Rob
    Herring)

    TI J721E PCIe driver:
    - Add TI J721E PCIe host and endpoint driver (Kishon Vijay Abraham I)

    Xilinx Versal CPM PCIe controller driver:
    - Add Versal CPM Root Port driver and YAML schema (Bharat Kumar
    Gogada)

    MicroSemi Switchtec management driver:
    - Add missing __iomem and __user tags to fix sparse warnings (Logan
    Gunthorpe)

    Miscellaneous:
    - Replace http:// links with https:// (Alexander A. Klimov)
    - Replace lkml.org, spinics, gmane with lore.kernel.org (Bjorn
    Helgaas)
    - Remove unused pci_lost_interrupt() (Heiner Kallweit)
    - Move PCI_VENDOR_ID_REDHAT definition to pci_ids.h (Huacai Chen)
    - Fix kerneldoc warnings (Krzysztof Kozlowski)"

    * tag 'pci-v5.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (113 commits)
    PCI: Fix kerneldoc warnings
    PCI: xilinx-cpm: Add Versal CPM Root Port driver
    PCI: xilinx-cpm: Add YAML schemas for Versal CPM Root Port
    PCI: Set bridge map_irq and swizzle_irq to default functions
    PCI: Move DT resource setup into devm_pci_alloc_host_bridge()
    PCI: rcar-gen2: Convert to use modern host bridge probe functions
    PCI: Remove dev_err() when handing an error from platform_get_irq()
    MAINTAINERS: Add Kishon Vijay Abraham I for TI J721E SoC PCIe
    misc: pci_endpoint_test: Add J721E in pci_device_id table
    PCI: j721e: Add TI J721E PCIe driver
    PCI: switchtec: Add missing __iomem tag to fix sparse warnings
    PCI: switchtec: Add missing __iomem and __user tags to fix sparse warnings
    PCI: rpadlpar: Make functions static
    PCI/P2PDMA: Allow P2PDMA on AMD Zen and newer CPUs
    PCI: Release IVRS table in AMD ACS quirk
    PCI: Announce device after early fixups
    PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken
    PCI: Remove unused pci_lost_interrupt()
    dt-bindings: PCI: Add EP mode dt-bindings for TI's J721E SoC
    dt-bindings: PCI: Add host mode dt-bindings for TI's J721E SoC
    ...

    Linus Torvalds
     
  • Patch series "mm: cleanup usage of "

    Most architectures have very similar versions of pXd_alloc_one() and
    pXd_free_one() for intermediate levels of page table. These patches add
    generic versions of these functions in and enable
    use of the generic functions where appropriate.

    In addition, functions declared and defined in headers are
    used mostly by core mm and early mm initialization in arch and there is no
    actual reason to have the included all over the place.
    The first patch in this series removes unneeded includes of

    In the end it didn't work out as neatly as I hoped and moving
    pXd_alloc_track() definitions to would require
    unnecessary changes to arches that have custom page table allocations, so
    I've decided to move lib/ioremap.c to mm/ and make pgalloc-track.h local
    to mm/.

    This patch (of 8):

    In most cases header is required only for allocations of
    page table memory. Most of the .c files that include that header do not
    use symbols declared in and do not require that header.

    As for the other header files that used to include , it is
    possible to move that include into the .c file that actually uses symbols
    from and drop the include from the header file.

    The process was somewhat automated using

    sed -i -E '/[
    Signed-off-by: Andrew Morton
    Reviewed-by: Pekka Enberg
    Acked-by: Geert Uytterhoeven [m68k]
    Cc: Abdul Haleem
    Cc: Andy Lutomirski
    Cc: Arnd Bergmann
    Cc: Christophe Leroy
    Cc: Joerg Roedel
    Cc: Max Filippov
    Cc: Peter Zijlstra
    Cc: Satheesh Rajendran
    Cc: Stafford Horne
    Cc: Stephen Rothwell
    Cc: Steven Rostedt
    Cc: Joerg Roedel
    Cc: Matthew Wilcox
    Link: http://lkml.kernel.org/r/20200627143453.31835-1-rppt@kernel.org
    Link: http://lkml.kernel.org/r/20200627143453.31835-2-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

07 Aug, 2020

3 commits

  • …into android-mainline

    Steps on the way to 5.9-rc1

    Resolves conflicts in:
    drivers/irqchip/qcom-pdc.c
    include/linux/device.h
    net/xfrm/xfrm_state.c
    security/lsm_audit.c

    Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
    Change-Id: I4aeb3d04f4717714a421721eb3ce690c099bb30a

    Greg Kroah-Hartman
     
  • Pull sched/fifo updates from Ingo Molnar:
    "This adds the sched_set_fifo*() encapsulation APIs to remove static
    priority level knowledge from non-scheduler code.

    The three APIs for non-scheduler code to set SCHED_FIFO are:

    - sched_set_fifo()
    - sched_set_fifo_low()
    - sched_set_normal()

    These are two FIFO priority levels: default (high), and a 'low'
    priority level, plus sched_set_normal() to set the policy back to
    non-SCHED_FIFO.

    Since the changes affect a lot of non-scheduler code, we kept this in
    a separate tree"

    * tag 'sched-fifo-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
    sched,tracing: Convert to sched_set_fifo()
    sched: Remove sched_set_*() return value
    sched: Remove sched_setscheduler*() EXPORTs
    sched,psi: Convert to sched_set_fifo_low()
    sched,rcutorture: Convert to sched_set_fifo_low()
    sched,rcuperf: Convert to sched_set_fifo_low()
    sched,locktorture: Convert to sched_set_fifo()
    sched,irq: Convert to sched_set_fifo()
    sched,watchdog: Convert to sched_set_fifo()
    sched,serial: Convert to sched_set_fifo()
    sched,powerclamp: Convert to sched_set_fifo()
    sched,ion: Convert to sched_set_normal()
    sched,powercap: Convert to sched_set_fifo*()
    sched,spi: Convert to sched_set_fifo*()
    sched,mmc: Convert to sched_set_fifo*()
    sched,ivtv: Convert to sched_set_fifo*()
    sched,drm/scheduler: Convert to sched_set_fifo*()
    sched,msm: Convert to sched_set_fifo*()
    sched,psci: Convert to sched_set_fifo*()
    sched,drbd: Convert to sched_set_fifo*()
    ...

    Linus Torvalds
     
  • …el.dk/linux-block") into android-mainline

    Conflicts:
    drivers/md/dm-bow.c
    drivers/md/dm-default-key.c
    drivers/md/dm.c
    fs/crypto/inline_crypt.c

    Replace bdev->bd_queue with bdev_get_queue(bdev).

    Bug: 129280212
    Bug: 160883801
    Bug: 160885805
    Bug: 162257830
    Change-Id: I9b0b295472080dfc0990dcb769205e68d706ce0e
    Signed-off-by: Eric Biggers <ebiggers@google.com>

    Eric Biggers
     

06 Aug, 2020

4 commits

  • Since we always set bi_end_io after call rnbd_bio_map_kern, so the
    setting in rnbd_bio_map_kern is redundant.

    Signed-off-by: Guoqing Jiang
    Acked-by: Danil Kipnis
    Acked-by: Jack Wang
    Signed-off-by: Jens Axboe

    Guoqing Jiang
     
  • The function only has one caller, so let's open code it in process_rdma.
    Another bonus is we can avoid push/pop stack, since we need to pass 8
    arguments to rnbd_dev_submit_io.

    Signed-off-by: Guoqing Jiang
    Acked-by: Danil Kipnis
    Acked-by: Jack Wang
    Signed-off-by: Jens Axboe

    Guoqing Jiang
     
  • Pull block stacking updates from Jens Axboe:
    "The stacking related fixes depended on both the core block and drivers
    branches, so here's a topic branch with that change.

    Outside of that, a late fix from Johannes for zone revalidation"

    * tag 'for-5.9/block-merge-20200804' of git://git.kernel.dk/linux-block:
    block: don't do revalidate zones on invalid devices
    block: remove blk_queue_stack_limits
    block: remove bdev_stack_limits
    block: inherit the zoned characteristics in blk_stack_limits

    Linus Torvalds
     
  • Pull block driver updates from Jens Axboe:

    - NVMe:
    - ZNS support (Aravind, Keith, Matias, Niklas)
    - Misc cleanups, optimizations, fixes (Baolin, Chaitanya, David,
    Dongli, Max, Sagi)

    - null_blk zone capacity support (Aravind)

    - MD:
    - raid5/6 fixes (ChangSyun)
    - Warning fixes (Damien)
    - raid5 stripe fixes (Guoqing, Song, Yufen)
    - sysfs deadlock fix (Junxiao)
    - raid10 deadlock fix (Vitaly)

    - struct_size conversions (Gustavo)

    - Set of bcache updates/fixes (Coly)

    * tag 'for-5.9/drivers-20200803' of git://git.kernel.dk/linux-block: (117 commits)
    md/raid5: Allow degraded raid6 to do rmw
    md/raid5: Fix Force reconstruct-write io stuck in degraded raid5
    raid5: don't duplicate code for different paths in handle_stripe
    raid5-cache: hold spinlock instead of mutex in r5c_journal_mode_show
    md: print errno in super_written
    md/raid5: remove the redundant setting of STRIPE_HANDLE
    md: register new md sysfs file 'uuid' read-only
    md: fix max sectors calculation for super 1.0
    nvme-loop: remove extra variable in create ctrl
    nvme-loop: set ctrl state connecting after init
    nvme-multipath: do not fall back to __nvme_find_path() for non-optimized paths
    nvme-multipath: fix logic for non-optimized paths
    nvme-rdma: fix controller reset hang during traffic
    nvme-tcp: fix controller reset hang during traffic
    nvmet: introduce the passthru Kconfig option
    nvmet: introduce the passthru configfs interface
    nvmet: Add passthru enable/disable helpers
    nvmet: add passthru code to process commands
    nvme: export nvme_find_get_ns() and nvme_put_ns()
    nvme: introduce nvme_ctrl_get_by_path()
    ...

    Linus Torvalds
     

05 Aug, 2020

2 commits

  • Pull documentation updates from Jonathan Corbet:
    "It's been a busy cycle for documentation - hopefully the busiest for a
    while to come. Changes include:

    - Some new Chinese translations

    - Progress on the battle against double words words and non-HTTPS
    URLs

    - Some block-mq documentation

    - More RST conversions from Mauro. At this point, that task is
    essentially complete, so we shouldn't see this kind of churn again
    for a while. Unless we decide to switch to asciidoc or
    something...:)

    - Lots of typo fixes, warning fixes, and more"

    * tag 'docs-5.9' of git://git.lwn.net/linux: (195 commits)
    scripts/kernel-doc: optionally treat warnings as errors
    docs: ia64: correct typo
    mailmap: add entry for
    doc/zh_CN: add cpu-load Chinese version
    Documentation/admin-guide: tainted-kernels: fix spelling mistake
    MAINTAINERS: adjust kprobes.rst entry to new location
    devices.txt: document rfkill allocation
    PCI: correct flag name
    docs: filesystems: vfs: correct flag name
    docs: filesystems: vfs: correct sync_mode flag names
    docs: path-lookup: markup fixes for emphasis
    docs: path-lookup: more markup fixes
    docs: path-lookup: fix HTML entity mojibake
    CREDITS: Replace HTTP links with HTTPS ones
    docs: process: Add an example for creating a fixes tag
    doc/zh_CN: add Chinese translation prefer section
    doc/zh_CN: add clearing-warn-once Chinese version
    doc/zh_CN: add admin-guide index
    doc:it_IT: process: coding-style.rst: Correct __maybe_unused compiler label
    futex: MAINTAINERS: Re-add selftests directory
    ...

    Linus Torvalds
     
  • Pull uninitialized_var() macro removal from Kees Cook:
    "This is long overdue, and has hidden too many bugs over the years. The
    series has several "by hand" fixes, and then a trivial treewide
    replacement.

    - Clean up non-trivial uses of uninitialized_var()

    - Update documentation and checkpatch for uninitialized_var() removal

    - Treewide removal of uninitialized_var()"

    * tag 'uninit-macro-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    compiler: Remove uninitialized_var() macro
    treewide: Remove uninitialized_var() usage
    checkpatch: Remove awareness of uninitialized_var() macro
    mm/debug_vm_pgtable: Remove uninitialized_var() usage
    f2fs: Eliminate usage of uninitialized_var() macro
    media: sur40: Remove uninitialized_var() usage
    KVM: PPC: Book3S PR: Remove uninitialized_var() usage
    clk: spear: Remove uninitialized_var() usage
    clk: st: Remove uninitialized_var() usage
    spi: davinci: Remove uninitialized_var() usage
    ide: Remove uninitialized_var() usage
    rtlwifi: rtl8192cu: Remove uninitialized_var() usage
    b43: Remove uninitialized_var() usage
    drbd: Remove uninitialized_var() usage
    x86/mm/numa: Remove uninitialized_var() usage
    docs: deprecated.rst: Add uninitialized_var()

    Linus Torvalds
     

04 Aug, 2020

1 commit

  • Pull core block updates from Jens Axboe:
    "Good amount of cleanups and tech debt removals in here, and as a
    result, the diffstat shows a nice net reduction in code.

    - Softirq completion cleanups (Christoph)

    - Stop using ->queuedata (Christoph)

    - Cleanup bd claiming (Christoph)

    - Use check_events, moving away from the legacy media change
    (Christoph)

    - Use inode i_blkbits consistently (Christoph)

    - Remove old unused writeback congestion bits (Christoph)

    - Cleanup/unify submission path (Christoph)

    - Use bio_uninit consistently, instead of bio_disassociate_blkg
    (Christoph)

    - sbitmap cleared bits handling (John)

    - Request merging blktrace event addition (Jan)

    - sysfs add/remove race fixes (Luis)

    - blk-mq tag fixes/optimizations (Ming)

    - Duplicate words in comments (Randy)

    - Flush deferral cleanup (Yufen)

    - IO context locking/retry fixes (John)

    - struct_size() usage (Gustavo)

    - blk-iocost fixes (Chengming)

    - blk-cgroup IO stats fixes (Boris)

    - Various little fixes"

    * tag 'for-5.9/block-20200802' of git://git.kernel.dk/linux-block: (135 commits)
    block: blk-timeout: delete duplicated word
    block: blk-mq-sched: delete duplicated word
    block: blk-mq: delete duplicated word
    block: genhd: delete duplicated words
    block: elevator: delete duplicated word and fix typos
    block: bio: delete duplicated words
    block: bfq-iosched: fix duplicated word
    iocost_monitor: start from the oldest usage index
    iocost: Fix check condition of iocg abs_vdebt
    block: Remove callback typedefs for blk_mq_ops
    block: Use non _rcu version of list functions for tag_set_list
    blk-cgroup: show global disk stats in root cgroup io.stat
    blk-cgroup: make iostat functions visible to stat printing
    block: improve discard bio alignment in __blkdev_issue_discard()
    block: change REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL to be odd numbers
    block: defer flush request no matter whether we have elevator
    block: make blk_timeout_init() static
    block: remove retry loop in ioc_release_fn()
    block: remove unnecessary ioc nested locking
    block: integrate bd_start_claiming into __blkdev_get
    ...

    Linus Torvalds
     

21 Jul, 2020

3 commits

  • This function is just a tiny wrapper around blk_stack_limits. Open code
    it int the two callers.

    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Damien Le Moal
    Tested-by: Damien Le Moal
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • * for-5.9/drivers: (38 commits)
    block: add max_active_zones to blk-sysfs
    block: add max_open_zones to blk-sysfs
    s390/dasd: Use struct_size() helper
    s390/dasd: fix inability to use DASD with DIAG driver
    md-cluster: fix wild pointer of unlock_all_bitmaps()
    md/raid5-cache: clear MD_SB_CHANGE_PENDING before flushing stripes
    md: fix deadlock causing by sysfs_notify
    md: improve io stats accounting
    md: raid0/linear: fix dereference before null check on pointer mddev
    rsxx: switch from 'pci_free_consistent()' to 'dma_free_coherent()'
    nvme: remove ns->disk checks
    nvme-pci: use standard block status symbolic names
    nvme-pci: use the consistent return type of nvme_pci_iod_alloc_size()
    nvme-pci: add a blank line after declarations
    nvme-pci: fix some comments issues
    nvme-pci: remove redundant segment validation
    nvme: document quirked Intel models
    nvme: expose reconnect_delay and ctrl_loss_tmo via sysfs
    nvme: support for zoned namespaces
    nvme: support for multiple Command Sets Supported and Effects log pages
    ...

    Jens Axboe
     
  • * for-5.9/block: (124 commits)
    blk-cgroup: show global disk stats in root cgroup io.stat
    blk-cgroup: make iostat functions visible to stat printing
    block: improve discard bio alignment in __blkdev_issue_discard()
    block: change REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL to be odd numbers
    block: defer flush request no matter whether we have elevator
    block: make blk_timeout_init() static
    block: remove retry loop in ioc_release_fn()
    block: remove unnecessary ioc nested locking
    block: integrate bd_start_claiming into __blkdev_get
    block: use bd_prepare_to_claim directly in the loop driver
    block: refactor bd_start_claiming
    block: simplify the restart case in __blkdev_get
    Revert "blk-rq-qos: remove redundant finish_wait to rq_qos_wait."
    block: always remove partitions from blk_drop_partitions()
    block: relax jiffies rounding for timeouts
    blk-mq: remove redundant validation in __blk_mq_end_request()
    blk-mq: Remove unnecessary local variable
    writeback: remove bdi->congested_fn
    writeback: remove struct bdi_writeback_congested
    writeback: remove {set,clear}_wb_congested
    ...

    Jens Axboe
     

20 Jul, 2020

1 commit


17 Jul, 2020

3 commits

  • Using uninitialized_var() is dangerous as it papers over real bugs[1]
    (or can in the future), and suppresses unrelated compiler warnings
    (e.g. "unused variable"). If the compiler thinks it is uninitialized,
    either simply initialize the variable or make compiler changes.

    In preparation for removing[2] the[3] macro[4], remove all remaining
    needless uses with the following script:

    git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
    xargs perl -pi -e \
    's/\buninitialized_var\(([^\)]+)\)/\1/g;
    s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'

    drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
    pathological white-space.

    No outstanding warnings were found building allmodconfig with GCC 9.3.0
    for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
    alpha, and m68k.

    [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
    [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
    [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
    [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

    Reviewed-by: Leon Romanovsky # drivers/infiniband and mlx4/mlx5
    Acked-by: Jason Gunthorpe # IB
    Acked-by: Kalle Valo # wireless drivers
    Reviewed-by: Chao Yu # erofs
    Signed-off-by: Kees Cook

    Kees Cook
     
  • Using uninitialized_var() is dangerous as it papers over real bugs[1]
    (or can in the future), and suppresses unrelated compiler warnings (e.g.
    "unused variable"). If the compiler thinks it is uninitialized, either
    simply initialize the variable or make compiler changes. As a precursor
    to removing[2] this[3] macro[4], just initialize this variable to NULL.

    [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
    [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
    [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
    [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

    Fixes: a29728463b25 ("drbd: Backport the "events2" command")
    Reviewed-by: Nick Desaulniers
    Signed-off-by: Kees Cook

    Kees Cook
     
  • …regkh/char-misc into master

    Pull char/misc fixes from Greg KH:
    "Here are number of small char/misc driver fixes for 5.8-rc6

    Not that many complex fixes here, just a number of small fixes for
    reported issues, and some new device ids. Nothing fancy.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits)
    virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial
    intel_th: Fix a NULL dereference when hub driver is not loaded
    intel_th: pci: Add Emmitsburg PCH support
    intel_th: pci: Add Tiger Lake PCH-H support
    intel_th: pci: Add Jasper Lake CPU support
    virt: vbox: Fix guest capabilities mask check
    virt: vbox: Fix VBGL_IOCTL_VMMDEV_REQUEST_BIG and _LOG req numbers to match upstream
    uio_pdrv_genirq: fix use without device tree and no interrupt
    uio_pdrv_genirq: Remove warning when irq is not specified
    coresight: etmv4: Fix CPU power management setup in probe() function
    coresight: cti: Fix error handling in probe
    Revert "zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()"
    mei: bus: don't clean driver pointer
    misc: atmel-ssc: lock with mutex instead of spinlock
    phy: sun4i-usb: fix dereference of pointer phy0 before it is null checked
    phy: rockchip: Fix return value of inno_dsidphy_probe()
    phy: ti: j721e-wiz: Constify structs
    phy: ti: am654-serdes: Constify regmap_config
    phy: intel: fix enum type mismatch warning
    phy: intel: Fix compilation error on FIELD_PREP usage
    ...

    Linus Torvalds
     

16 Jul, 2020

1 commit

  • The arcane magic in bd_start_claiming is only needed to be able to claim
    a block_device that hasn't been fully set up. Switch the loop driver
    that claims from the ioctl path with a fully set up struct block_device
    to just use the much simpler bd_prepare_to_claim directly.

    Signed-off-by: Christoph Hellwig
    Acked-by: Tejun Heo
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

13 Jul, 2020

1 commit


11 Jul, 2020

2 commits

  • The wrappers in include/linux/pci-dma-compat.h should go away.

    The patch has been generated with the coccinelle script bellow.
    It has been compile tested.

    This also aligns code with what is in use in '/rsxx/dma.c'

    @@
    @@
    - PCI_DMA_BIDIRECTIONAL
    + DMA_BIDIRECTIONAL

    @@
    @@
    - PCI_DMA_TODEVICE
    + DMA_TO_DEVICE

    @@
    @@
    - PCI_DMA_FROMDEVICE
    + DMA_FROM_DEVICE

    @@
    @@
    - PCI_DMA_NONE
    + DMA_NONE

    @@
    expression e1, e2, e3;
    @@
    - pci_alloc_consistent(e1, e2, e3)
    + dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

    @@
    expression e1, e2, e3;
    @@
    - pci_zalloc_consistent(e1, e2, e3)
    + dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_free_consistent(e1, e2, e3, e4)
    + dma_free_coherent(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_map_single(e1, e2, e3, e4)
    + dma_map_single(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_unmap_single(e1, e2, e3, e4)
    + dma_unmap_single(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4, e5;
    @@
    - pci_map_page(e1, e2, e3, e4, e5)
    + dma_map_page(&e1->dev, e2, e3, e4, e5)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_unmap_page(e1, e2, e3, e4)
    + dma_unmap_page(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_map_sg(e1, e2, e3, e4)
    + dma_map_sg(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_unmap_sg(e1, e2, e3, e4)
    + dma_unmap_sg(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
    + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_dma_sync_single_for_device(e1, e2, e3, e4)
    + dma_sync_single_for_device(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
    + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_dma_sync_sg_for_device(e1, e2, e3, e4)
    + dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2;
    @@
    - pci_dma_mapping_error(e1, e2)
    + dma_mapping_error(&e1->dev, e2)

    @@
    expression e1, e2;
    @@
    - pci_set_dma_mask(e1, e2)
    + dma_set_mask(&e1->dev, e2)

    @@
    expression e1, e2;
    @@
    - pci_set_consistent_dma_mask(e1, e2)
    + dma_set_coherent_mask(&e1->dev, e2)

    Signed-off-by: Christophe JAILLET
    Signed-off-by: Jens Axboe

    Christophe JAILLET
     
  • Pull block fixes from Jens Axboe:

    - Fix for inflight accounting, which affects only dm (Ming)

    - Fix documentation error for bfq (Yufen)

    - Fix memory leak for nbd (Zheng)

    * tag 'block-5.8-2020-07-10' of git://git.kernel.dk/linux-block:
    nbd: Fix memory leak in nbd_add_socket
    blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight()
    docs: block: update and fix tiny error for bfq

    Linus Torvalds
     

09 Jul, 2020

3 commits

  • Except for pktdvd, the only places setting congested bits are file
    systems that allocate their own backing_dev_info structures. And
    pktdvd is a deprecated driver that isn't useful in stack setup
    either. So remove the dead congested_fn stacking infrastructure.

    Signed-off-by: Christoph Hellwig
    Acked-by: Song Liu
    Acked-by: David Sterba
    [axboe: fixup unused variables in bcache/request.c]
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • bdi_rw_congested returns congestion state, so calling it without
    looking at the return value doesn't make much sense.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • When adding first socket to nbd, if nsock's allocation failed, the data
    structure member "config->socks" was reallocated, but the data structure
    member "config->num_connections" was not updated. A memory leak will occur
    then because the function "nbd_config_put" will free "config->socks" only
    when "config->num_connections" is not zero.

    Fixes: 03bf73c315ed ("nbd: prevent memory leak")
    Reported-by: syzbot+934037347002901b8d2a@syzkaller.appspotmail.com
    Signed-off-by: Zheng Bin
    Reviewed-by: Eric Biggers
    Signed-off-by: Jens Axboe

    Zheng Bin
     

08 Jul, 2020

4 commits

  • Allow emulation of a zoned device with a per zone capacity smaller than
    the zone size as as defined in the Zoned Namespace (ZNS) Command Set
    specification. The zone capacity defaults to the zone size if not
    specified and must be smaller than the zone size otherwise.

    Reviewed-by: Matias Bjørling
    Reviewed-by: Chaitanya Kulkarni
    Reviewed-by: Himanshu Madhani
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Daniel Wagner
    Signed-off-by: Aravind Ramesh
    Signed-off-by: Christoph Hellwig

    Aravind Ramesh
     
  • In the zoned storage model, the sectors within a zone are typically all
    writeable. With the introduction of the Zoned Namespace (ZNS) Command
    Set in the NVM Express organization, the model was extended to have a
    specific writeable capacity.

    Extend the zone descriptor data structure with a zone capacity field to
    indicate to the user how many sectors in a zone are writeable.

    Introduce backward compatibility in the zone report ioctl by extending
    the zone report header data structure with a flags field to indicate if
    the capacity field is available.

    Reviewed-by: Jens Axboe
    Reviewed-by: Javier González
    Reviewed-by: Chaitanya Kulkarni
    Reviewed-by: Himanshu Madhani
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Daniel Wagner
    Signed-off-by: Matias Bjørling
    Signed-off-by: Christoph Hellwig

    Matias Bjørling
     
  • Merge in 5.8-rc4 for-5.9/block to setup for-5.9/drivers, to provide
    a clean base and making the life for the NVMe changes easier.

    Signed-off-by: Jens Axboe

    * tag 'v5.8-rc4': (732 commits)
    Linux 5.8-rc4
    x86/ldt: use "pr_info_once()" instead of open-coding it badly
    MIPS: Do not use smp_processor_id() in preemptible code
    MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen
    .gitignore: Do not track `defconfig` from `make savedefconfig`
    io_uring: fix regression with always ignoring signals in io_cqring_wait()
    x86/ldt: Disable 16-bit segments on Xen PV
    x86/entry/32: Fix #MC and #DB wiring on x86_32
    x86/entry/xen: Route #DB correctly on Xen PV
    x86/entry, selftests: Further improve user entry sanity checks
    x86/entry/compat: Clear RAX high bits on Xen PV SYSENTER
    i2c: mlxcpld: check correct size of maximum RECV_LEN packet
    i2c: add Kconfig help text for slave mode
    i2c: slave-eeprom: update documentation
    i2c: eg20t: Load module automatically if ID matches
    i2c: designware: platdrv: Set class based on DMI
    i2c: algo-pca: Add 0x78 as SCL stuck low status for PCA9665
    mm/page_alloc: fix documentation error
    vmalloc: fix the owner argument for the new __vmalloc_node_range callers
    mm/cma.c: use exact_nid true to fix possible per-numa cma leak
    ...

    Jens Axboe
     
  • The method struct pci_error_handlers.error_detected() is defined and
    documented as taking an 'enum pci_channel_state' for the second argument,
    but most drivers use 'pci_channel_state_t' instead.

    This 'pci_channel_state_t' is not a typedef for the enum but a typedef for
    a bitwise type in order to have better/stricter typechecking.

    Consolidate everything by using 'pci_channel_state_t' in the method's
    definition, in the related helpers and in the drivers.

    Enforce use of 'pci_channel_state_t' by replacing 'enum pci_channel_state'
    with an anonymous 'enum'.

    Note: Currently, from a typechecking point of view this patch changes
    nothing because only the constants defined by the enum are bitwise, not the
    enum itself (sparse doesn't have the notion of 'bitwise enum'). This may
    change in some not too far future, hence the patch.

    [bhelgaas: squash in
    https://lore.kernel.org/r/20200702162651.49526-3-luc.vanoostenryck@gmail.com
    https://lore.kernel.org/r/20200702162651.49526-4-luc.vanoostenryck@gmail.com]
    Link: https://lore.kernel.org/r/20200702162651.49526-2-luc.vanoostenryck@gmail.com
    Signed-off-by: Luc Van Oostenryck
    Signed-off-by: Bjorn Helgaas

    Luc Van Oostenryck
     

06 Jul, 2020

2 commits

  • Linux 5.8-rc4

    Signed-off-by: Greg Kroah-Hartman
    Change-Id: Iccdf79fdb94208b33796eca02bb813482e646ab1

    Greg Kroah-Hartman
     
  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Link: https://lore.kernel.org/r/20200627103111.71771-1-grandmaster@al2klimov.de
    Signed-off-by: Jonathan Corbet

    Alexander A. Klimov
     

03 Jul, 2020

1 commit

  • Pull block fixes from Jens Axboe:

    - Use kvfree_sensitive() for the block keyslot free (Eric)

    - Sync blk-mq debugfs flags (Hou)

    - Memory leak fix in virtio-blk error path (Hou)

    * tag 'block-5.8-2020-07-01' of git://git.kernel.dk/linux-block:
    virtio-blk: free vblk-vqs in error path of virtblk_probe()
    block/keyslot-manager: use kvfree_sensitive()
    blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags

    Linus Torvalds
     

01 Jul, 2020

3 commits

  • Turns out that the permissions for 0400 really are what we want here,
    otherwise any user can read from this file.

    [fixed formatting, added changelog, and made attribute static - gregkh]

    Reported-by: Wade Mealing
    Cc: stable
    Fixes: f40609d1591f ("zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()")
    Link: https://bugzilla.redhat.com/show_bug.cgi?id=1847832
    Reviewed-by: Steffen Maier
    Acked-by: Minchan Kim
    Link: https://lore.kernel.org/r/20200617114946.GA2131650@kroah.com
    Signed-off-by: Greg Kroah-Hartman

    Wade Mealing
     
  • Use the block_size helper instead of open coding it. Also remove the
    check for a 0 block size, as that can't happen.

    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • generic_make_request has always been very confusingly misnamed, so rename
    it to submit_bio_noacct to make it clear that it is submit_bio minus
    accounting and a few checks.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig