Skip to content
  1. Dec 16, 2021
  2. Dec 14, 2021
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 5472f14a
      Linus Torvalds authored
      Pull virtio fixes from Michael Tsirkin:
       "Misc virtio and vdpa bugfixes"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vdpa: Consider device id larger than 31
        virtio/vsock: fix the transport to work with VMADDR_CID_ANY
        virtio_ring: Fix querying of maximum DMA mapping size for virtio device
        virtio: always enter drivers/virtio/
        vduse: check that offset is within bounds in get_config()
        vdpa: check that offsets are within bounds
        vduse: fix memory corruption in vduse_dev_ioctl()
      5472f14a
    • Sergio Paracuellos's avatar
      PCI: mt7621: Convert driver into 'bool' · aa50faff
      Sergio Paracuellos authored
      The driver is not ready yet to be compiled as a module since it depends
      on some symbols not exported on MIPS.  We have the following current
      problems:
      
        Building mips:allmodconfig ... failed
        --------------
        Error log:
        ERROR: modpost: missing MODULE_LICENSE() in drivers/pci/controller/pcie-mt7621.o
        ERROR: modpost: "mips_cm_unlock_other" [drivers/pci/controller/pcie-mt7621.ko] undefined!
        ERROR: modpost: "mips_cpc_base" [drivers/pci/controller/pcie-mt7621.ko] undefined!
        ERROR: modpost: "mips_cm_lock_other" [drivers/pci/controller/pcie-mt7621.ko] undefined!
        ERROR: modpost: "mips_cm_is64" [drivers/pci/controller/pcie-mt7621.ko] undefined!
        ERROR: modpost: "mips_gcr_base" [drivers/pci/controller/pcie-mt7621.ko] undefined!
      
      Temporarily move from 'tristate' to 'bool' until a better solution is
      ready.
      
      Also RALINK is redundant because SOC_MT7621 already depends on it.
      Hence, simplify condition.
      
      Fixes: 2bdd5238
      
       ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver").
      Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
      Reviewed-and-Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aa50faff
    • Linus Torvalds's avatar
      fget: clarify and improve __fget_files() implementation · e386dfc5
      Linus Torvalds authored
      Commit 054aa8d4 ("fget: check that the fd still exists after getting
      a ref to it") fixed a race with getting a reference to a file just as it
      was being closed.  It was a fairly minimal patch, and I didn't think
      re-checking the file pointer lookup would be a measurable overhead,
      since it was all right there and cached.
      
      But I was wrong, as pointed out by the kernel test robot.
      
      The 'poll2' case of the will-it-scale.per_thread_ops benchmark regressed
      quite noticeably.  Admittedly it seems to be a very artificial test:
      doing "poll()" system calls on regular files in a very tight loop in
      multiple threads.
      
      That means that basically all the time is spent just looking up file
      descriptors without ever doing anything useful with them (not that doing
      'poll()' on a regular file is useful to begin with).  And as a result it
      shows the extra "re-check fd" cost as a sore thumb.
      
      Happily, the regression is fixable by just writing the code to loook up
      the fd to be better and clearer.  There's still a cost to verify the
      file pointer, but now it's basically in the noise even for that
      benchmark that does nothing else - and the code is more understandable
      and has better comments too.
      
      [ Side note: this patch is also a classic case of one that looks very
        messy with the default greedy Myers diff - it's much more legible with
        either the patience of histogram diff algorithm ]
      
      Link: https://lore.kernel.org/lkml/20211210053743.GA36420@xsang-OptiPlex-9020/
      Link: https://lore.kernel.org/lkml/20211213083154.GA20853@linux.intel.com/
      
      
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Tested-by: default avatarCarel Si <beibei.si@intel.com>
      Cc: Jann Horn <jannh@google.com>
      Cc: Miklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e386dfc5
  3. Dec 13, 2021
  4. Dec 12, 2021
    • Pavel Hofman's avatar
      usb: core: config: using bit mask instead of individual bits · ca573739
      Pavel Hofman authored
      
      
      Using standard USB_EP_MAXP_MULT_MASK instead of individual bits for
      extracting multiple-transactions bits from wMaxPacketSize value.
      
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarPavel Hofman <pavel.hofman@ivitera.com>
      Link: https://lore.kernel.org/r/20211210085219.16796-2-pavel.hofman@ivitera.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ca573739
    • Pavel Hofman's avatar
      usb: core: config: fix validation of wMaxPacketValue entries · 1a3910c8
      Pavel Hofman authored
      The checks performed by commit aed9d65a ("USB: validate
      wMaxPacketValue entries in endpoint descriptors") require that initial
      value of the maxp variable contains both maximum packet size bits
      (10..0) and multiple-transactions bits (12..11). However, the existing
      code assings only the maximum packet size bits. This patch assigns all
      bits of wMaxPacketSize to the variable.
      
      Fixes: aed9d65a
      
       ("USB: validate wMaxPacketValue entries in endpoint descriptors")
      Cc: stable <stable@vger.kernel.org>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarPavel Hofman <pavel.hofman@ivitera.com>
      Link: https://lore.kernel.org/r/20211210085219.16796-1-pavel.hofman@ivitera.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1a3910c8
    • Greg Kroah-Hartman's avatar
      USB: gadget: zero allocate endpoint 0 buffers · 86ebbc11
      Greg Kroah-Hartman authored
      
      
      Under some conditions, USB gadget devices can show allocated buffer
      contents to a host.  Fix this up by zero-allocating them so that any
      extra data will all just be zeros.
      
      Reported-by: default avatarSzymon Heidrich <szymon.heidrich@gmail.com>
      Tested-by: default avatarSzymon Heidrich <szymon.heidrich@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      86ebbc11
    • Greg Kroah-Hartman's avatar
      USB: gadget: detect too-big endpoint 0 requests · 153a2d7e
      Greg Kroah-Hartman authored
      
      
      Sometimes USB hosts can ask for buffers that are too large from endpoint
      0, which should not be allowed.  If this happens for OUT requests, stall
      the endpoint, but for IN requests, trim the request size to the endpoint
      buffer size.
      
      Co-developed-by: default avatarSzymon Heidrich <szymon.heidrich@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      153a2d7e
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · a763d5a5
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four fixes, all in drivers.
      
        Three are small and obvious, the qedi one is a bit larger but also
        pretty obvious"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: qla2xxx: Format log strings only if needed
        scsi: scsi_debug: Fix buffer size of REPORT ZONES command
        scsi: qedi: Fix cmd_cleanup_cmpl counter mismatch issue
        scsi: pm80xx: Do not call scsi_remove_host() in pm8001_alloc()
      a763d5a5
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.16-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · e034d9cb
      Linus Torvalds authored
      Pull xfs fix from Darrick Wong:
       "This fixes a race between a readonly remount process and other
        processes that hold a file IOLOCK on files that previously experienced
        copy on write, that could result in severe filesystem corruption if
        the filesystem is then remounted rw.
      
        I think this is fairly rare (since the only reliable reproducer I have
        that fits the second criteria is the experimental xfs_scrub program),
        but the race is clear, so we still need to fix this.
      
        Summary:
      
         - Fix a data corruption vector that can result from the ro remount
           process failing to clear all speculative preallocations from files
           and the rw remount process not noticing the incomplete cleanup"
      
      * tag 'xfs-5.16-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: remove all COW fork extents when remounting readonly
      e034d9cb
    • Linus Torvalds's avatar
      Merge branch 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu · 8f97a35a
      Linus Torvalds authored
      Pull percpu fixes from Dennis Zhou:
       "This contains a fix for SMP && !MMU archs for percpu which has been
        tested by arm and sh. It seems in the past they have gotten away with
        it due to mapping of vm functions to km functions, but this fell apart
        a few releases ago and was just reported recently.
      
        The other is just a minor dependency clean up.
      
        I think queued up right now by Andrew is a fix in percpu that papers
        of what seems to be a bug in hotplug for a special situation with
        memoryless nodes. Michal Hocko is digging into it further"
      
      * 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
        percpu_ref: Replace kernel.h with the necessary inclusions
        percpu: km: ensure it is used with NOMMU (either UP or SMP)
      8f97a35a
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.16-2021-12-11' of... · bbdff6d5
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.16-2021-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Prevent out-of-bounds access to per sample registers.
      
       - Fix NULL vs IS_ERR_OR_NULL() checking on the python binding.
      
       - Intel PT fixes, half of those are one-liners:
            - Fix some PGE (packet generation enable/control flow packets) usage.
            - Fix sync state when a PSB (synchronization) packet is found.
            - Fix intel_pt_fup_event() assumptions about setting state type.
            - Fix state setting when receiving overflow (OVF) packet.
            - Fix next 'err' value, walking trace.
            - Fix missing 'instruction' events with 'q' option.
            - Fix error timestamp setting on the decoder error path.
      
      * tag 'perf-tools-fixes-for-v5.16-2021-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf python: Fix NULL vs IS_ERR_OR_NULL() checking
        perf intel-pt: Fix error timestamp setting on the decoder error path
        perf intel-pt: Fix missing 'instruction' events with 'q' option
        perf intel-pt: Fix next 'err' value, walking trace
        perf intel-pt: Fix state setting when receiving overflow (OVF) packet
        perf intel-pt: Fix intel_pt_fup_event() assumptions about setting state type
        perf intel-pt: Fix sync state when a PSB (synchronization) packet is found
        perf intel-pt: Fix some PGE (packet generation enable/control flow packets) usage
        perf tools: Prevent out-of-bounds access to registers
      bbdff6d5
    • Linus Torvalds's avatar
      Merge tag 'block-5.16-2021-12-10' of git://git.kernel.dk/linux-block · eccea80b
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few block fixes that should go into this release:
      
         - NVMe pull request:
              - set ana_log_size to 0 after freeing ana_log_buf (Hou Tao)
              - show subsys nqn for duplicate cntlids (Keith Busch)
              - disable namespace access for unsupported metadata (Keith
                Busch)
              - report write pointer for a full zone as zone start + zone len
                (Niklas Cassel)
              - fix use after free when disconnecting a reconnecting ctrl
                (Ruozhu Li)
              - fix a list corruption in nvmet-tcp (Sagi Grimberg)
      
         - Fix for a regression on DIO single bio async IO (Pavel)
      
         - ioprio seteuid fix (Davidlohr)
      
         - mtd fix that subsequently got reverted as it was broken, will get
           re-done and submitted for the next round
      
         - Two MD fixes via Song (Markus, zhangyue)"
      
      * tag 'block-5.16-2021-12-10' of git://git.kernel.dk/linux-block:
        Revert "mtd_blkdevs: don't scan partition...
      eccea80b
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.16-2021-12-10' of git://git.kernel.dk/linux-block · f152165a
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A few fixes that are all bound for stable:
      
         - Two syzbot reports for io-wq that turned out to be separate fixes,
           but ultimately very closely related
      
         - io_uring task_work running on cancelations"
      
      * tag 'io_uring-5.16-2021-12-10' of git://git.kernel.dk/linux-block:
        io-wq: check for wq exit after adding new worker task_work
        io_uring: ensure task_work gets run as part of cancelations
        io-wq: remove spurious bit clear on task_work addition
      f152165a
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · bd66be54
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Two more I2C driver bugfixes"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: mpc: Use atomic read and fix break condition
        i2c: virtio: fix completion handling
      bd66be54
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 2acdaf59
      Linus Torvalds authored
      Pull clk driver fixes from Stephen Boyd:
      
       - Fix qcom mux logic to look at the proper parent table member. Luckily
         this clk type isn't very common.
      
       - Don't kill clks on qcom systems that use Trion PLLs that are enabled
         out of the bootloader. We will simply skip programming the PLL rate
         if it's already done.
      
       - Use the proper clk_ops for the qcom sm6125 ICE clks.
      
       - Use module_platform_driver() in i.MX as it can be a module.
      
       - Fix a UAF in the versatile clk driver on an error path.
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: versatile: clk-icst: use after free on error path
        clk: qcom: sm6125-gcc: Swap ops of ice and apps on sdcc1
        clk: imx: use module_platform_driver
        clk: qcom: clk-alpha-pll: Don't reconfigure running Trion
        clk: qcom: regmap-mux: fix parent clock lookup
      2acdaf59
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · a84e0b31
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Revert schema checks on %.dtb targets. This was problematic for some
         external build tools.
      
       - A few DT binding example fixes
      
       - Add back dropped 'enet-phy-lane-no-swap' Ethernet PHY property
      
       - Drop erroneous if/then schema in nxp,imx7-mipi-csi2
      
       - Add a quirk to fix some interrupt controllers use of 'interrupt-map'
      
      * tag 'devicetree-fixes-for-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        Revert "kbuild: Enable DT schema checks for %.dtb targets"
        dt-bindings: bq25980: Fixup the example
        dt-bindings: input: gpio-keys: Fix interrupts in example
        dt-bindings: net: Reintroduce PHY no lane swap binding
        dt-bindings: media: nxp,imx7-mipi-csi2: Drop bad if/then schema
        of/irq: Add a quirk for controllers with their own definition of interrupt-map
        dt-bindings: iio: adc: exynos-adc: Fix node name in example
      a84e0b31
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · df442a4e
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "21 patches.
      
        Subsystems affected by this patch series: MAINTAINERS, mailmap, and mm
        (mlock, pagecache, damon, slub, memcg, hugetlb, and pagecache)"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (21 commits)
        mm: bdi: initialize bdi_min_ratio when bdi is unregistered
        hugetlbfs: fix issue of preallocation of gigantic pages can't work
        mm/memcg: relocate mod_objcg_mlstate(), get_obj_stock() and put_obj_stock()
        mm/slub: fix endianness bug for alloc/free_traces attributes
        selftests/damon: split test cases
        selftests/damon: test debugfs file reads/writes with huge count
        selftests/damon: test wrong DAMOS condition ranges input
        selftests/damon: test DAMON enabling with empty target_ids case
        selftests/damon: skip test if DAMON is running
        mm/damon/vaddr-test: remove unnecessary variables
        mm/damon/vaddr-test: split a test function having >1024 bytes frame size
        mm/damon/vaddr: remove an unnecessary warning message
        mm/damon/core: remove unnecessary error messages
        mm/damon/dbgfs: remove an unnecessary error message
        mm/damon/core: use better timer mechanisms selection threshold
        mm/damon/core: fix fake load reports due to uninterruptible sleeps
        timers: implement usleep_idle_range()
        filemap: remove PageHWPoison check from next_uptodate_page()
        mailmap: update email address for Guo Ren
        MAINTAINERS: update kdump maintainers
        ...
      df442a4e
  5. Dec 11, 2021