Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.15.4 (20.04 and 21.04) #82

Closed
wants to merge 10,000 commits into from
Closed

5.15.4 (20.04 and 21.04) #82

wants to merge 10,000 commits into from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Nov 18, 2021

  1. PCI: aardvark: Don't spam about PIO Response Status

    [ Upstream commit 464de7e ]
    
    Use dev_dbg() instead of dev_err() in advk_pcie_check_pio_status().
    
    For example CRS is not an error status, it just says that the request
    should be retried.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 8c39d71 ("PCI: aardvark: Add Aardvark PCI host controller driver")
    Signed-off-by: Marek Behún <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    elkablo authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e8c8058 View commit details
    Browse the repository at this point in the history
  2. PCI: aardvark: Fix preserving PCI_EXP_RTCTL_CRSSVE flag on emulated b…

    …ridge
    
    [ Upstream commit d419052 ]
    
    Commit 43f5c77 ("PCI: aardvark: Fix reporting CRS value") started
    using CRSSVE flag for handling CRS responses.
    
    PCI_EXP_RTCTL_CRSSVE flag is stored only in emulated config space buffer
    and there is handler for PCI_EXP_RTCTL register. So every read operation
    from config space automatically clears CRSSVE flag as it is not defined in
    PCI_EXP_RTCTL read handler.
    
    Fix this by reading current CRSSVE bit flag from emulated space buffer and
    appending it to PCI_EXP_RTCTL read response.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 43f5c77 ("PCI: aardvark: Fix reporting CRS value")
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Marek Behún <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Reviewed-by: Marek Behún <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pali authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5a67f82 View commit details
    Browse the repository at this point in the history
  3. opp: Fix return in _opp_add_static_v2()

    [ Upstream commit 27ff818 ]
    
    Fix sparse warning:
    drivers/opp/of.c:924 _opp_add_static_v2() warn: passing zero to 'ERR_PTR'
    
    For duplicate OPPs 'ret' be set to zero.
    
    Fixes: deac870 ("PM / OPP: _of_add_opp_table_v2(): increment count only if OPP is added")
    Signed-off-by: YueHaibing <[email protected]>
    Signed-off-by: Viresh Kumar <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    YueHaibing authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    97eaf7a View commit details
    Browse the repository at this point in the history
  4. NFS: Fix deadlocks in nfs_scan_commit_list()

    [ Upstream commit 64a93db ]
    
    Partially revert commit 2ce209c ("NFS: Wait for requests that are
    locked on the commit list"), since it can lead to deadlocks between
    commit requests and nfs_join_page_group().
    For now we should assume that any locked requests on the commit list are
    either about to be removed and committed by another task, or the writes
    they describe are about to be retransmitted. In either case, we should
    not need to worry.
    
    Fixes: 2ce209c ("NFS: Wait for requests that are locked on the commit list")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Trond Myklebust authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    cab693c View commit details
    Browse the repository at this point in the history
  5. sparc: Add missing "FORCE" target when using if_changed

    [ Upstream commit a3c7ca2 ]
    
    Fix observed warning:
    
        /builds/linux/arch/sparc/boot/Makefile:35: FORCE prerequisite is missing
    
    Fixes: e1f86d7 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk")
    Signed-off-by: Kees Cook <[email protected]>
    Acked-by: Nicolas Schier <[email protected]>
    Signed-off-by: Masahiro Yamada <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kees authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    a94284b View commit details
    Browse the repository at this point in the history
  6. fs: orangefs: fix error return code of orangefs_revalidate_lookup()

    [ Upstream commit 4c2b46c ]
    
    When op_alloc() returns NULL to new_op, no error return code of
    orangefs_revalidate_lookup() is assigned.
    To fix this bug, ret is assigned with -ENOMEM in this case.
    
    Fixes: 8bb8aef ("OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS.")
    Reported-by: TOTE Robot <[email protected]>
    Signed-off-by: Jia-Ju Bai <[email protected]>
    Signed-off-by: Mike Marshall <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    XidianGeneral authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d268e01 View commit details
    Browse the repository at this point in the history
  7. Input: st1232 - increase "wait ready" timeout

    [ Upstream commit 2667f6b ]
    
    I have a ST1633 touch controller which fails to probe due to a timeout
    waiting for the controller to become ready.  Increasing the minimum
    delay to 100ms ensures that the probe sequence completes successfully.
    
    The ST1633 datasheet says nothing about the maximum delay here and the
    ST1232 I2C protocol document says "wait until" with no notion of a
    timeout.
    
    Since this only runs once during probe, being generous with the timout
    seems reasonable and most likely the device will become ready
    eventually.
    
    (It may be worth noting that I saw this issue with a PREEMPT_RT patched
    kernel which probably has tighter wakeups from usleep_range() than other
    preemption models.)
    
    Fixes: f605be6 ("Input: st1232 - wait until device is ready before reading resolution")
    Signed-off-by: John Keeping <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    johnkeeping authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d36d2c3 View commit details
    Browse the repository at this point in the history
  8. drm/bridge: nwl-dsi: Add atomic_get_input_bus_fmts

    [ Upstream commit 2f1495f ]
    
    Components further up in the chain might ask us for supported formats.
    
    Without this MEDIA_BUS_FMT_FIXED is assumed which then breaks display
    output with mxsfb since it can't determine a proper bus format.
    
    We handle the bus formats that correspond to the DSI formats the bridge
    can potentially output (see chapter 13.6 of the i.MX 8MQ reference
    manual) - which matches what xsfb can input.
    
    Fixes: b776b0f ("drm: mxsfb: Use bus_format from the nearest bridge if present")
    
    Signed-off-by: Guido Günther <[email protected]>
    Reviewed-by: Lucas Stach <[email protected]>
    Reviewed-by: Sam Ravnborg <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/1712f2b952694fd4484dfd8576fbc5b4d7adf042.1633959458.git.agx@sigxcpu.org
    Signed-off-by: Sasha Levin <[email protected]>
    agx authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    1c60136 View commit details
    Browse the repository at this point in the history
  9. mtd: spi-nor: hisi-sfc: Remove excessive clk_disable_unprepare()

    [ Upstream commit 78e4d34 ]
    
    hisi_spi_nor_probe() invokes clk_disable_unprepare() on all paths after
    successful call of clk_prepare_enable(). Besides, the clock is enabled by
    hispi_spi_nor_prep() and disabled by hispi_spi_nor_unprep(). So at remove
    time it is not possible to have the clock enabled. The patch removes
    excessive clk_disable_unprepare() from hisi_spi_nor_remove().
    
    Found by Linux Driver Verification project (linuxtesting.org).
    
    Fixes: e523f11 ("mtd: spi-nor: add hisilicon spi-nor flash controller driver")
    Signed-off-by: Evgeny Novikov <[email protected]>
    Signed-off-by: Tudor Ambarus <[email protected]>
    Reviewed-by: Pratyush Yadav <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    eunovm authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    321a355 View commit details
    Browse the repository at this point in the history
  10. PCI: uniphier: Serialize INTx masking/unmasking and fix the bit opera…

    …tion
    
    [ Upstream commit 4caab28 ]
    
    The condition register PCI_RCV_INTX is used in irq_mask() and irq_unmask()
    callbacks. Accesses to register can occur at the same time without a lock.
    Add a lock into each callback to prevent the issue.
    
    And INTX mask and unmask fields in PCL_RCV_INTX register should only be
    set/reset for each bit. Clearing by PCL_RCV_INTX_ALL_MASK should be
    removed.
    
    INTX status fields in PCL_RCV_INTX register only indicates each INTX
    interrupt status, so the handler can't clear by writing 1 to the field.
    The status is expected to be cleared by the interrupt origin.
    The ack function has no meaning, so should remove it.
    
    Suggested-by: Pali Rohár <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 7e6d5cd ("PCI: uniphier: Add UniPhier PCIe host controller support")
    Signed-off-by: Kunihiko Hayashi <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Acked-by: Pali Rohár <[email protected]>
    Acked-by: Marc Zyngier <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    khayash1 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    4022396 View commit details
    Browse the repository at this point in the history
  11. mtd: rawnand: arasan: Prevent an unsupported configuration

    [ Upstream commit fc9e18f ]
    
    Under the following conditions:
    * after rounding up by 4 the number of bytes to transfer (this is
      related to the controller's internal constraints),
    * if this (rounded) amount of data is situated beyond the end of the
      device,
    * and only in NV-DDR mode,
    the Arasan NAND controller timeouts.
    
    This currently can happen in a particular helper used when picking
    software ECC algorithms. Let's prevent this situation by refusing to use
    the NV-DDR interface with software engines.
    
    Fixes: 4edde60 ("mtd: rawnand: arasan: Support NV-DDR interface")
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    152d0b5 View commit details
    Browse the repository at this point in the history
  12. mtd: core: don't remove debugfs directory if device is in use

    [ Upstream commit c13de23 ]
    
    Previously, if del_mtd_device() failed with -EBUSY due to a non-zero
    usecount, a subsequent call to attempt the deletion again would try to
    remove a debugfs directory that had already been removed and panic.
    With this change the second call can instead proceed safely.
    
    Fixes: e8e3edb ("mtd: create per-device and module-scope debugfs entries")
    Signed-off-by: Zev Weiss <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    zevweiss authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    62eaaa1 View commit details
    Browse the repository at this point in the history
  13. remoteproc: Fix a memory leak in an error handling path in 'rproc_han…

    …dle_vdev()'
    
    [ Upstream commit 0374a4e ]
    
    If 'copy_dma_range_map() fails, the memory allocated for 'rvdev' will leak.
    Move the 'copy_dma_range_map()' call after the device registration so
    that 'rproc_rvdev_release()' can be called to free some resources.
    
    Also, branch to the error handling path if 'copy_dma_range_map()' instead
    of a direct return to avoid some other leaks.
    
    Fixes: e0d0727 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Reviewed-by: Jim Quinlan <[email protected]>
    Reviewed-by: Mathieu Poirier <[email protected]>
    Signed-off-by: Bjorn Andersson <[email protected]>
    Link: https://lore.kernel.org/r/e6d0dad6620da4fdf847faa903f79b735d35f262.1630755377.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Sasha Levin <[email protected]>
    tititiou36 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    84ea624 View commit details
    Browse the repository at this point in the history
  14. rtc: rv3032: fix error handling in rv3032_clkout_set_rate()

    [ Upstream commit c3336b8 ]
    
    Do not call rv3032_exit_eerd() if the enter function fails but don't
    forget to call the exit when the enter succeeds.
    
    Fixes: 2eeaa53 ("rtc: rv3032: Add a driver for Microcrystal RV-3032")
    Signed-off-by: Dan Carpenter <[email protected]>
    Signed-off-by: Alexandre Belloni <[email protected]>
    Link: https://lore.kernel.org/r/20211012101028.GT2083@kadam
    Signed-off-by: Sasha Levin <[email protected]>
    Dan Carpenter authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    1976e7b View commit details
    Browse the repository at this point in the history
  15. dmaengine: at_xdmac: call at_xdmac_axi_config() on resume path

    [ Upstream commit fa5270e ]
    
    at_xdmac could be used on SoCs which supports backup mode (where most
    of the SoC power, including power to DMA controller, is closed at suspend
    time). Thus, on resume, the settings which were previously done need to be
    restored. Do the same for axi configuration.
    
    Fixes: f40566f ("dmaengine: at_xdmac: add AXI priority support and recommended settings")
    Signed-off-by: Claudiu Beznea <[email protected]>
    Reviewed-by: Tudor Ambarus <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    claudiubeznea authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    98b7275 View commit details
    Browse the repository at this point in the history
  16. dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro

    [ Upstream commit 320c88a ]
    
    AT_XDMAC_CC_PERID() should be used to setup bits 24..30 of XDMAC_CC
    register. Using it without parenthesis around 0x7f & (i) will lead to
    setting all the time zero for bits 24..30 of XDMAC_CC as the << operator
    has higher precedence over bitwise &. Thus, add paranthesis around
    0x7f & (i).
    
    Fixes: 15a0385 ("dmaengine: at_xdmac: fix macro typo")
    Signed-off-by: Claudiu Beznea <[email protected]>
    Reviewed-by: Tudor Ambarus <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    claudiubeznea authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f12d23b View commit details
    Browse the repository at this point in the history
  17. dmaengine: stm32-dma: fix stm32_dma_get_max_width

    [ Upstream commit b20fd5f ]
    
    buf_addr parameter of stm32_dma_set_xfer_param function is a dma_addr_t.
    We only need to check the remainder of buf_addr/max_width, so, no need to
    use do_div and extra u64 addr. Use '%' instead.
    
    Fixes: e0ebdbd ("dmaengine: stm32-dma: take address into account when computing max width")
    Signed-off-by: Amelie Delaunay <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ADESTM authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    b07aa21 View commit details
    Browse the repository at this point in the history
  18. NFS: Fix up commit deadlocks

    [ Upstream commit 133a48a ]
    
    If O_DIRECT bumps the commit_info rpcs_out field, then that could lead
    to fsync() hangs. The fix is to ensure that O_DIRECT calls
    nfs_commit_end().
    
    Fixes: 723c921 ("sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Trond Myklebust authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9443fcc View commit details
    Browse the repository at this point in the history
  19. NFS: Fix an Oops in pnfs_mark_request_commit()

    [ Upstream commit f0caea8 ]
    
    Olga reports seeing the following Oops when doing O_DIRECT writes to a
    pNFS flexfiles server:
    
    Oops: 0000 [#1] SMP PTI
    CPU: 1 PID: 234186 Comm: kworker/u8:1 Not tainted 5.15.0-rc4+ #4
    Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.13.0-2.module+el8.3.0+7353+9de0a3cc 04/01/2014
    Workqueue: nfsiod rpc_async_release [sunrpc]
    RIP: 0010:nfs_mark_request_commit+0x12/0x30 [nfs]
    Code: ff ff be 03 00 00 00 e8 ac 34 83 eb e9 29 ff ff
    ff e8 22 bc d7 eb 66 90 0f 1f 44 00 00 48 85 f6 74 16 48 8b 42 10 48
    8b 40 18 <48> 8b 40 18 48 85 c0 74 05 e9 70 fc 15 ec 48 89 d6 e9 68 ed
    ff ff
    RSP: 0018:ffffa82f0159fe00 EFLAGS: 00010286
    RAX: 0000000000000000 RBX: ffff8f3393141880 RCX: 0000000000000000
    RDX: ffffa82f0159fe08 RSI: ffff8f3381252500 RDI: ffff8f3393141880
    RBP: ffff8f33ac317c00 R08: 0000000000000000 R09: ffff8f3487724cb0
    R10: 0000000000000008 R11: 0000000000000001 R12: 0000000000000001
    R13: ffff8f3485bccee0 R14: ffff8f33ac317c10 R15: ffff8f33ac317cd8
    FS:  0000000000000000(0000) GS:ffff8f34fbc80000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000018 CR3: 0000000122120006 CR4: 0000000000770ee0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    PKRU: 55555554
    Call Trace:
     nfs_direct_write_completion+0x13b/0x250 [nfs]
     rpc_free_task+0x39/0x60 [sunrpc]
     rpc_async_release+0x29/0x40 [sunrpc]
     process_one_work+0x1ce/0x370
     worker_thread+0x30/0x380
     ? process_one_work+0x370/0x370
     kthread+0x11a/0x140
     ? set_kthread_struct+0x40/0x40
     ret_from_fork+0x22/0x30
    
    Reported-by: Olga Kornievskaia <[email protected]>
    Fixes: 9c455a8 ("NFS/pNFS: Clean up pNFS commit operations")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Trond Myklebust authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d9bd973 View commit details
    Browse the repository at this point in the history
  20. Fix user namespace leak

    [ Upstream commit d5f458a ]
    
    Fixes: 61ca2c4 ("NFS: Only reference user namespace from nfs4idmap struct instead of cred")
    Signed-off-by: Alexey Gladkov <[email protected]>
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    legionus authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5204722 View commit details
    Browse the repository at this point in the history
  21. auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty string

    [ Upstream commit afcb5a8 ]
    
    While writing an empty string to a device attribute is a no-op, and thus
    does not need explicit safeguards, the user can still write a single
    newline to an attribute file:
    
        echo > .../message
    
    If that happens, img_ascii_lcd_display() trims the newline, yielding an
    empty string, and causing an infinite loop in img_ascii_lcd_scroll().
    
    Fix this by adding a check for empty strings.  Clear the display in case
    one is encountered.
    
    Fixes: 0cad855 ("auxdisplay: img-ascii-lcd: driver for simple ASCII LCD displays")
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Miguel Ojeda <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    geertu authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d6d2815 View commit details
    Browse the repository at this point in the history
  22. auxdisplay: ht16k33: Connect backlight to fbdev

    [ Upstream commit 80f9eb7 ]
    
    Currently /sys/class/graphics/fb0/bl_curve is not accessible (-ENODEV),
    as the driver does not connect the backlight to the frame buffer device.
    Fix this moving backlight initialization up, and filling in
    fb_info.bl_dev.
    
    Fixes: 8992da4 ("auxdisplay: ht16k33: Driver for LED controller")
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Robin van der Gracht <[email protected]>
    Signed-off-by: Miguel Ojeda <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    geertu authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    fba8ce5 View commit details
    Browse the repository at this point in the history
  23. auxdisplay: ht16k33: Fix frame buffer device blanking

    [ Upstream commit 840fe25 ]
    
    As the ht16k33 frame buffer sub-driver does not register an
    fb_ops.fb_blank() handler, blanking does not work:
    
        $ echo 1 > /sys/class/graphics/fb0/blank
        sh: write error: Invalid argument
    
    Fix this by providing a handler that always returns zero, to make sure
    blank events will be sent to the actual device handling the backlight.
    
    Reported-by: Robin van der Gracht <[email protected]>
    Suggested-by: Robin van der Gracht <[email protected]>
    Fixes: 8992da4 ("auxdisplay: ht16k33: Driver for LED controller")
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Miguel Ojeda <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    geertu authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    8ccaade View commit details
    Browse the repository at this point in the history
  24. soc: fsl: dpaa2-console: free buffer before returning from dpaa2_cons…

    …ole_read
    
    [ Upstream commit 8120bd4 ]
    
    Free the kbuf buffer before returning from the dpaa2_console_read()
    function. The variable no longer goes out of scope, leaking the storage
    it points to.
    
    Fixes: c93349d ("soc: fsl: add DPAA2 console support")
    Signed-off-by: Robert-Ionut Alexa <[email protected]>
    Signed-off-by: Ioana Ciornei <[email protected]>
    Signed-off-by: Li Yang <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Robert-Ionut Alexa authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9981e39 View commit details
    Browse the repository at this point in the history
  25. netfilter: nfnetlink_queue: fix OOB when mac header was cleared

    [ Upstream commit 5648b5e ]
    
    On 64bit platforms the MAC header is set to 0xffff on allocation and
    also when a helper like skb_unset_mac_header() is called.
    
    dev_parse_header may call skb_mac_header() which assumes valid mac offset:
    
     BUG: KASAN: use-after-free in eth_header_parse+0x75/0x90
     Read of size 6 at addr ffff8881075a5c05 by task nf-queue/1364
     Call Trace:
      memcpy+0x20/0x60
      eth_header_parse+0x75/0x90
      __nfqnl_enqueue_packet+0x1a61/0x3380
      __nf_queue+0x597/0x1300
      nf_queue+0xf/0x40
      nf_hook_slow+0xed/0x190
      nf_hook+0x184/0x440
      ip_output+0x1c0/0x2a0
      nf_reinject+0x26f/0x700
      nfqnl_recv_verdict+0xa16/0x18b0
      nfnetlink_rcv_msg+0x506/0xe70
    
    The existing code only works if the skb has a mac header.
    
    Fixes: 2c38de4 ("netfilter: fix looped (broad|multi)cast's MAC handling")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Florian Westphal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5b380c5 View commit details
    Browse the repository at this point in the history
  26. dmaengine: dmaengine_desc_callback_valid(): Check for callback_result

    [ Upstream commit e7e1e88 ]
    
    Before the `callback_result` callback was introduced drivers coded their
    invocation to the callback in a similar way to:
    
    	if (cb->callback) {
    		spin_unlock(&dma->lock);
    		cb->callback(cb->callback_param);
    		spin_lock(&dma->lock);
    	}
    
    With the introduction of `callback_result` two helpers where introduced to
    transparently handle both types of callbacks. And drivers where updated to
    look like this:
    
    	if (dmaengine_desc_callback_valid(cb)) {
    		spin_unlock(&dma->lock);
    		dmaengine_desc_callback_invoke(cb, ...);
    		spin_lock(&dma->lock);
    	}
    
    dmaengine_desc_callback_invoke() correctly handles both `callback_result`
    and `callback`. But we forgot to update the dmaengine_desc_callback_valid()
    function to check for `callback_result`. As a result DMA descriptors that
    use the `callback_result` rather than `callback` don't have their callback
    invoked by drivers that follow the pattern above.
    
    Fix this by checking for both `callback` and `callback_result` in
    dmaengine_desc_callback_valid().
    
    Fixes: f067025 ("dmaengine: add support to provide error result from a DMA transation")
    Signed-off-by: Lars-Peter Clausen <[email protected]>
    Acked-by: Dave Jiang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    larsclausen authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    8bc8be6 View commit details
    Browse the repository at this point in the history
  27. dmaengine: tegra210-adma: fix pm runtime unbalance

    [ Upstream commit c5a51fc ]
    
    The previous commit 059e969 ("dmaengine: tegra210-adma: Using
    pm_runtime_resume_and_get to replace open coding") forgets to replace
    the pm_runtime_get_sync in the tegra_adma_probe, but removes the
    pm_runtime_put_noidle.
    
    Fix this by continuing to replace pm_runtime_get_sync with
    pm_runtime_resume_and_get in tegra_adma_probe.
    
    Fixes: 059e969 ("dmaengine: tegra210-adma: Using pm_runtime_resume_and_get to replace open coding")
    Signed-off-by: Dongliang Mu <[email protected]>
    Reviewed-by: Jon Hunter <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mudongliang authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9fb118b View commit details
    Browse the repository at this point in the history
  28. dmanegine: idxd: fix resource free ordering on driver removal

    [ Upstream commit 98da010 ]
    
    Fault triggers on ioread32() when pci driver unbind is envoked. The
    placement of idxd sub-driver removal causes the probing of the device mmio
    region after the mmio mapping being torn down. The driver needs the
    sub-drivers to be unbound but not release the idxd context until all
    shutdown activities has been done. Move the sub-driver unregistering up
    before the remove() calls shutdown(). But take a device ref on the
    idxd->conf_dev so that the memory does not get freed in ->release(). When
    all cleanup activities has been done, release the ref to allow the idxd
    memory to be freed.
    
    [57159.542766] RIP: 0010:ioread32+0x27/0x60
    [57159.547097] Code: 00 66 90 48 81 ff ff ff 03 00 77 1e 48 81 ff 00 00 01 00 76 05 0f
     b7 d7 ed c3 8b 15 03 50 41 01 b8 ff ff ff ff 85 d2 75 04 c3 <8b> 07 c3 55 83 ea 01 48
     89 fe 48 c7 c7 00 70 5f 82 48 89 e5 48 83
    [57159.566647] RSP: 0018:ffffc900011abb60 EFLAGS: 00010292
    [57159.572295] RAX: ffffc900011e0000 RBX: ffff888107d39800 RCX: 0000000000000000
    [57159.579842] RDX: 0000000000000000 RSI: ffffffff82b1e448 RDI: ffffc900011e0090
    [57159.587421] RBP: ffffc900011abb88 R08: 0000000000000000 R09: 0000000000000001
    [57159.594972] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8881019840d0
    [57159.602533] R13: ffff8881097e9000 R14: ffffffffa08542a0 R15: 00000000000003a8
    [57159.610093] FS:  00007f991e0a8740(0000) GS:ffff888459900000(0000) knlGS:00000000000
    00000
    [57159.618614] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [57159.624814] CR2: ffffc900011e0090 CR3: 000000010862a002 CR4: 00000000003706e0
    [57159.632397] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [57159.639973] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [57159.647601] Call Trace:
    [57159.650502]  ? idxd_device_disable+0x41/0x110 [idxd]
    [57159.655948]  idxd_device_drv_remove+0x2b/0x80 [idxd]
    [57159.661374]  idxd_config_bus_remove+0x16/0x20
    [57159.666191]  __device_release_driver+0x163/0x240
    [57159.671320]  device_release_driver+0x2b/0x40
    [57159.676052]  bus_remove_device+0xf5/0x160
    [57159.680524]  device_del+0x19c/0x400
    [57159.684440]  device_unregister+0x18/0x60
    [57159.688792]  idxd_remove+0x140/0x1c0 [idxd]
    [57159.693406]  pci_device_remove+0x3e/0xb0
    [57159.697758]  __device_release_driver+0x163/0x240
    [57159.702788]  device_driver_detach+0x43/0xb0
    [57159.707424]  unbind_store+0x11e/0x130
    [57159.711537]  drv_attr_store+0x24/0x30
    [57159.715646]  sysfs_kf_write+0x4b/0x60
    [57159.719710]  kernfs_fop_write_iter+0x153/0x1e0
    [57159.724563]  new_sync_write+0x120/0x1b0
    [57159.728812]  vfs_write+0x23e/0x350
    [57159.732624]  ksys_write+0x70/0xf0
    [57159.736335]  __x64_sys_write+0x1a/0x20
    [57159.740492]  do_syscall_64+0x3b/0x90
    [57159.744465]  entry_SYSCALL_64_after_hwframe+0x44/0xae
    [57159.749908] RIP: 0033:0x7f991e19c387
    [57159.753898] Code: 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e
     fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51
     c3 48 83 ec 28 48 89 54 24 18 48 89 74 24
    [57159.773564] RSP: 002b:00007ffc2ce2d6a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
    [57159.781550] RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f991e19c387
    [57159.789133] RDX: 000000000000000c RSI: 000055ee2630e140 RDI: 0000000000000001
    [57159.796695] RBP: 000055ee2630e140 R08: 0000000000000000 R09: 00007f991e2324e0
    [57159.804246] R10: 00007f991e2323e0 R11: 0000000000000246 R12: 000000000000000c
    [57159.811800] R13: 00007f991e26f520 R14: 000000000000000c R15: 00007f991e26f700
    [57159.819373] Modules linked in: idxd bridge stp llc bnep sunrpc nls_iso8859_1 intel_
    rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_code
    c_realtek iTCO_wdt 8250_dw snd_hda_codec_generic kvm_intel ledtrig_audio iTCO_vendor_s
    upport snd_hda_intel snd_intel_dspcfg ppdev kvm snd_hda_codec intel_wmi_thunderbolt sn
    d_hwdep irqbypass iwlwifi btusb snd_hda_core rapl btrtl intel_cstate snd_seq btbcm snd
    _seq_device btintel snd_pcm cfg80211 bluetooth pcspkr psmouse input_leds snd_timer int
    el_lpss_pci mei_me intel_lpss snd ecdh_generic ecc mei ucsi_acpi i2c_i801 idma64 i2c_s
    mbus virt_dma soundcore typec_ucsi typec wmi parport_pc parport video mac_hid acpi_pad
     sch_fq_codel drm ip_tables x_tables crct10dif_pclmul crc32_pclmul ghash_clmulni_intel
     usbkbd hid_generic usbmouse aesni_intel usbhid crypto_simd cryptd e1000e hid serio_ra
    w ahci libahci pinctrl_sunrisepoint fuse msr autofs4 [last unloaded: idxd]
    [57159.904082] CR2: ffffc900011e0090
    [57159.907877] ---[ end trace b4e32f49ce9176a4 ]---
    
    Fixes: 49c4959 ("dmaengine: idxd: fix sequence for pci driver remove() and shutdown()")
    Reported-by: Ziye Yang <[email protected]>
    Signed-off-by: Dave Jiang <[email protected]>
    Link: https://lore.kernel.org/r/163225535868.4152687.9318737776682088722.stgit@djiang5-desk3.ch.intel.com
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    davejiang authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    b1b9ef3 View commit details
    Browse the repository at this point in the history
  29. dmaengine: idxd: reconfig device after device reset command

    [ Upstream commit e530a9f ]
    
    Device reset clears the MSIXPERM table and the device registers. Re-program
    the MSIXPERM table and re-enable the error interrupts post reset.
    
    Fixes: 745e92a ("dmaengine: idxd: idxd: move remove() bits for idxd 'struct device' to device.c")
    Reported-by: Sanjay Kumar <[email protected]>
    Signed-off-by: Dave Jiang <[email protected]>
    Link: https://lore.kernel.org/r/163054188513.2853562.12077053294595278181.stgit@djiang5-desk3.ch.intel.com
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    davejiang authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    671dd8b View commit details
    Browse the repository at this point in the history
  30. signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL)

    [ Upstream commit ce0ee4e ]
    
    Today the sh code allocates memory the first time a process uses
    the fpu.  If that memory allocation fails, kill the affected task
    with force_sig(SIGKILL) rather than do_group_exit(SIGKILL).
    
    Calling do_group_exit from an exception handler can potentially lead
    to dead locks as do_group_exit is not designed to be called from
    interrupt context.  Instead use force_sig(SIGKILL) to kill the
    userspace process.  Sending signals in general and force_sig in
    particular has been tested from interrupt context so there should be
    no problems.
    
    Cc: Yoshinori Sato <[email protected]>
    Cc: Rich Felker <[email protected]>
    Cc: [email protected]
    Fixes: 0ea820c ("sh: Move over to dynamically allocated FPU context.")
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Eric W. Biederman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ebiederm authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    8f072ec View commit details
    Browse the repository at this point in the history
  31. m68k: set a default value for MEMORY_RESERVE

    [ Upstream commit 1aaa557 ]
    
    'make randconfig' can produce a .config file with
    "CONFIG_MEMORY_RESERVE=" (no value) since it has no default.
    When a subsequent 'make all' is done, kconfig restarts the config
    and prompts for a value for MEMORY_RESERVE. This breaks
    scripting/automation where there is no interactive user input.
    
    Add a default value for MEMORY_RESERVE. (Any integer value will
    work here for kconfig.)
    
    Fixes a kconfig warning:
    
    .config:214:warning: symbol value '' invalid for MEMORY_RESERVE
    * Restart config...
    Memory reservation (MiB) (MEMORY_RESERVE) [] (NEW)
    
    Fixes: 1da177e ("Linux-2.6.12-rc2") # from beginning of git history
    Signed-off-by: Randy Dunlap <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Cc: Greg Ungerer <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Ungerer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rddunlap authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    fb2b4c7 View commit details
    Browse the repository at this point in the history
  32. watchdog: f71808e_wdt: fix inaccurate report in WDIOC_GETTIMEOUT

    [ Upstream commit 164483c ]
    
    The fintek watchdog timer can configure timeouts of second granularity
    only up to 255 seconds. Beyond that, the timeout needs to be configured
    with minute granularity. WDIOC_GETTIMEOUT should report the actual
    timeout configured, not just echo back the timeout configured by the
    user. Do so.
    
    Fixes: 96cb4eb ("watchdog: f71808e_wdt: new watchdog driver for Fintek F71808E and F71882FG")
    Suggested-by: Guenter Roeck <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Signed-off-by: Ahmad Fatoum <[email protected]>
    Link: https://lore.kernel.org/r/5e17960fe8cc0e3cb2ba53de4730b75d9a0f33d5.1628525954.git-series.a.fatoum@pengutronix.de
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Wim Van Sebroeck <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    a3f authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e5f9487 View commit details
    Browse the repository at this point in the history
  33. ar7: fix kernel builds for compiler test

    [ Upstream commit 28b7ee3 ]
    
    TI AR7 Watchdog Timer is only build for 32bit.
    
    Avoid error like:
    In file included from drivers/watchdog/ar7_wdt.c:29:
    ./arch/mips/include/asm/mach-ar7/ar7.h: In function ‘ar7_is_titan’:
    ./arch/mips/include/asm/mach-ar7/ar7.h:111:24: error: implicit declaration of function ‘KSEG1ADDR’; did you mean ‘CKSEG1ADDR’? [-Werror=implicit-function-declaration]
      111 |  return (readl((void *)KSEG1ADDR(AR7_REGS_GPIO + 0x24)) & 0xffff) ==
          |                        ^~~~~~~~~
          |                        CKSEG1ADDR
    
    Fixes: da2a68b ("watchdog: Enable COMPILE_TEST where possible")
    Signed-off-by: Jackie Liu <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Wim Van Sebroeck <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    JackieLiu1 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    eb63b76 View commit details
    Browse the repository at this point in the history
  34. scsi: target: core: Remove from tmr_list during LUN unlink

    [ Upstream commit 12b6fcd ]
    
    Currently TMF commands are removed from de_device.dev_tmf_list at the very
    end of se_cmd lifecycle. However, se_lun unlinks from se_cmd upon a command
    status (response) being queued in transport layer. This means that LUN and
    backend device can be deleted in the meantime and a panic will occur:
    
    target_tmr_work()
    	cmd->se_tfo->queue_tm_rsp(cmd); // send abort_rsp to a wire
    	transport_lun_remove_cmd(cmd) // unlink se_cmd from se_lun
    - // - // - // -
    <<<--- lun remove
    <<<--- core backend device remove
    - // - // - // -
    qlt_handle_abts_completion()
      tfo->free_mcmd()
        transport_generic_free_cmd()
          target_put_sess_cmd()
            core_tmr_release_req() {
              if (dev) { // backend device, can not be null
                spin_lock_irqsave(&dev->se_tmr_lock, flags); //<<<--- CRASH
    
    Call Trace:
    NIP [c000000000e1683c] _raw_spin_lock_irqsave+0x2c/0xc0
    LR [c00800000e433338] core_tmr_release_req+0x40/0xa0 [target_core_mod]
    Call Trace:
    (unreliable)
    0x0
    target_put_sess_cmd+0x2a0/0x370 [target_core_mod]
    transport_generic_free_cmd+0x6c/0x1b0 [target_core_mod]
    tcm_qla2xxx_complete_mcmd+0x28/0x50 [tcm_qla2xxx]
    process_one_work+0x2c4/0x5c0
    worker_thread+0x88/0x690
    
    For the iSCSI protocol this is easily reproduced:
    
     - Send some SCSI sommand
    
     - Send Abort of that command over iSCSI
    
     - Remove LUN on target
    
     - Send next iSCSI command to acknowledge the Abort_Response
    
     - Target panics
    
    There is no need to keep the command in tmr_list until response completion,
    so move the removal from tmr_list from the response completion to the
    response queueing when the LUN is unlinked.  Move the removal from state
    list too as it is a subject to the same race condition.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: c66ac9d ("[SCSI] target: Add LIO target core v4.0.0-rc6")
    Reviewed-by: Roman Bolshakov <[email protected]>
    Reviewed-by: Mike Christie <[email protected]>
    Signed-off-by: Dmitry Bogdanov <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    logost authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    b65e904 View commit details
    Browse the repository at this point in the history
  35. scsi: qla2xxx: Relogin during fabric disturbance

    [ Upstream commit bb2ca6b ]
    
    For RSCN of type "Area, Domain, or Fabric", which indicate a portion or
    entire fabric was disturbed, current driver does not set the scan_need flag
    to indicate a session was affected by the disturbance. This in turn can
    lead to I/O timeout and delay of relogin. Hence initiate relogin in the
    event of fabric disturbance.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 1560baf ("scsi: qla2xxx: Use complete switch scan for RSCN events")
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Quinn Tran authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    7ee1c31 View commit details
    Browse the repository at this point in the history
  36. scsi: qla2xxx: Fix gnl list corruption

    [ Upstream commit c98c5da ]
    
    Current code does list element deletion and addition in and out of lock
    protection. This patch moves deletion behind lock.
    
    list_add double add: new=ffff9130b5eb89f8, prev=ffff9130b5eb89f8,
        next=ffff9130c6a715f0.
     ------------[ cut here ]------------
     kernel BUG at lib/list_debug.c:31!
     invalid opcode: 0000 [#1] SMP PTI
     CPU: 1 PID: 182395 Comm: kworker/1:37 Kdump: loaded Tainted: G W  OE
     --------- -  - 4.18.0-193.el8.x86_64 #1
     Hardware name: HP ProLiant DL160 Gen8, BIOS J03 02/10/2014
     Workqueue: qla2xxx_wq qla2x00_iocb_work_fn [qla2xxx]
     RIP: 0010:__list_add_valid+0x41/0x50
     Code: 85 94 00 00 00 48 39 c7 74 0b 48 39 d7 74 06 b8 01 00 00 00 c3 48 89 f2
     4c 89 c1 48 89 fe 48 c7 c7 60 83 ad 97 e8 4d bd ce ff <0f> 0b 0f 1f 00 66 2e
     0f 1f 84 00 00 00 00 00 48 8b 07 48 8b 57 08
     RSP: 0018:ffffaba306f47d68 EFLAGS: 00010046
     RAX: 0000000000000058 RBX: ffff9130b5eb8800 RCX: 0000000000000006
     RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff9130b7456a00
     RBP: ffff9130c6a70a58 R08: 000000000008d7be R09: 0000000000000001
     R10: 0000000000000000 R11: 0000000000000001 R12: ffff9130c6a715f0
     R13: ffff9130b5eb8824 R14: ffff9130b5eb89f8 R15: ffff9130b5eb89f8
     FS:  0000000000000000(0000) GS:ffff9130b7440000(0000) knlGS:0000000000000000
     CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
     CR2: 00007efcaaef11a0 CR3: 000000005200a002 CR4: 00000000000606e0
     Call Trace:
      qla24xx_async_gnl+0x113/0x3c0 [qla2xxx]
      ? qla2x00_iocb_work_fn+0x53/0x80 [qla2xxx]
      ? process_one_work+0x1a7/0x3b0
      ? worker_thread+0x30/0x390
      ? create_worker+0x1a0/0x1a0
      ? kthread+0x112/0x130
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 726b854 ("qla2xxx: Add framework for async fabric discovery")
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Quinn Tran authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    411ca50 View commit details
    Browse the repository at this point in the history
  37. scsi: qla2xxx: Turn off target reset during issue_lip

    [ Upstream commit 0b7a9fd ]
    
    When user uses issue_lip to do link bounce, driver sends additional target
    reset to remote device before resetting the link. The target reset would
    affect other paths with active I/Os. This patch will remove the unnecessary
    target reset.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 5854771 ("[SCSI] qla2xxx: Add ISPFX00 specific bus reset routine")
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Quinn Tran authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    09e4daf View commit details
    Browse the repository at this point in the history
  38. scsi: qla2xxx: edif: Fix app start fail

    [ Upstream commit 8e6d5df ]
    
    On app start, all sessions need to be reset to see if secure connection can
    be made. Fix the broken check which prevents that process.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 4de067e ("scsi: qla2xxx: edif: Add N2N support for EDIF")
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Quinn Tran authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    696815e View commit details
    Browse the repository at this point in the history
  39. scsi: qla2xxx: edif: Fix app start delay

    [ Upstream commit b492d6a ]
    
    Current driver does unnecessary pause for each session to get to certain
    state before allowing the app start call to return. In larger environment,
    this introduces a long delay.  Originally the delay was meant to
    synchronize app and driver. However, the with current implementation the
    two sides use various events to synchronize their state.
    
    The same is applied to the authentication failure call.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 4de067e ("scsi: qla2xxx: edif: Add N2N support for EDIF")
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Quinn Tran authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    dcd0c5e View commit details
    Browse the repository at this point in the history
  40. scsi: qla2xxx: edif: Flush stale events and msgs on session down

    [ Upstream commit b1af26c ]
    
    On session down, driver will flush all stale messages and doorbell
    events. This prevents authentication application from having to process
    stale data.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 4de067e ("scsi: qla2xxx: edif: Add N2N support for EDIF")
    Reviewed-by: Himanshu Madhani <[email protected]>
    Co-developed-by: Karunakara Merugu <[email protected]>
    Signed-off-by: Karunakara Merugu <[email protected]>
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Quinn Tran authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    aac0a76 View commit details
    Browse the repository at this point in the history
  41. scsi: qla2xxx: edif: Increase ELS payload

    [ Upstream commit 0f6d600 ]
    
    Currently, firmware limits ELS payload to FC frame size/2112.  This patch
    adjusts memory buffer size to be able to handle max ELS payload.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 84318a9 ("scsi: qla2xxx: edif: Add send, receive, and accept for auth_els")
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Quinn Tran authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e56d800 View commit details
    Browse the repository at this point in the history
  42. scsi: qla2xxx: edif: Fix EDIF bsg

    [ Upstream commit 9fd26c6 ]
    
    Various EDIF bsgs did not properly fill out the reply_payload_rcv_len
    field. This causes app to parse empty data in the return payload.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 7ebb336 ("scsi: qla2xxx: edif: Add start + stop bsgs")
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Quinn Tran authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    4b7e3d5 View commit details
    Browse the repository at this point in the history
  43. NFSv4: Fix a regression in nfs_set_open_stateid_locked()

    [ Upstream commit 01d29f8 ]
    
    If we already hold open state on the client, yet the server gives us a
    completely different stateid to the one we already hold, then we
    currently treat it as if it were an out-of-sequence update, and wait for
    5 seconds for other updates to come in.
    This commit fixes the behaviour so that we immediately start processing
    of the new stateid, and then leave it to the call to
    nfs4_test_and_free_stateid() to decide what to do with the old stateid.
    
    Fixes: b4868b4 ("NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Trond Myklebust authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9b88281 View commit details
    Browse the repository at this point in the history
  44. dmaengine: idxd: fix resource leak on dmaengine driver disable

    [ Upstream commit a3e340c ]
    
    The wq resources needs to be released before the kernel type is reset by
    __drv_disable_wq(). With dma channels unregistered and wq quiesced, all the
    wq resources for dmaengine can be freed. There is no need to wait until wq
    is disabled. With the wq->type being reset to "unknown", the driver is
    skipping the freeing of the resources.
    
    Fixes: 0cda4f6 ("dmaengine: idxd: create dmaengine driver for wq 'device'")
    Reported-by: Jacob Pan <[email protected]>
    Tested-by: Jacob Pan <[email protected]>
    Signed-off-by: Dave Jiang <[email protected]>
    Link: https://lore.kernel.org/r/163517405099.3484556.12521975053711345244.stgit@djiang5-desk3.ch.intel.com
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    davejiang authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5b12e19 View commit details
    Browse the repository at this point in the history
  45. i2c: xlr: Fix a resource leak in the error handling path of 'xlr_i2c_…

    …probe()'
    
    [ Upstream commit 7f98960 ]
    
    A successful 'clk_prepare()' call should be balanced by a corresponding
    'clk_unprepare()' call in the error handling path of the probe, as already
    done in the remove function.
    
    More specifically, 'clk_prepare_enable()' is used, but 'clk_disable()' is
    also already called. So just the unprepare step has still to be done.
    
    Update the error handling path accordingly.
    
    Fixes: 75d31c2 ("i2c: xlr: add support for Sigma Designs controller variant")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Signed-off-by: Wolfram Sang <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tititiou36 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    01e1893 View commit details
    Browse the repository at this point in the history
  46. gpio: realtek-otto: fix GPIO line IRQ offset

    [ Upstream commit 585a070 ]
    
    The irqchip uses one domain for all GPIO lines, so the line offset
    should be determined w.r.t. the first line of the first port, not the
    first line of the triggered port.
    
    Fixes: 0d82fb1 ("gpio: Add Realtek Otto GPIO support")
    Signed-off-by: Sander Vanheule <[email protected]>
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    svanheule authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    db651ac View commit details
    Browse the repository at this point in the history
  47. xen-pciback: Fix return in pm_ctrl_init()

    [ Upstream commit 4745ea2 ]
    
    Return NULL instead of passing to ERR_PTR while err is zero,
    this fix smatch warnings:
    drivers/xen/xen-pciback/conf_space_capability.c:163
     pm_ctrl_init() warn: passing zero to 'ERR_PTR'
    
    Fixes: a92336a ("xen/pciback: Drop two backends, squash and cleanup some code.")
    Signed-off-by: YueHaibing <[email protected]>
    Reviewed-by: Juergen Gross <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Boris Ostrovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    YueHaibing authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f314286 View commit details
    Browse the repository at this point in the history
  48. nbd: fix max value for 'first_minor'

    [ Upstream commit e4c4871 ]
    
    commit b1a8116 ("block: nbd: add sanity check for first_minor")
    checks that 'first_minor' should not be greater than 0xff, which is
    wrong. Whitout the commit, the details that when user pass 0x100000,
    it ends up create sysfs dir "/sys/block/43:0" are as follows:
    
    nbd_dev_add
     disk->first_minor = index << part_shift
      -> default part_shift is 5, first_minor is 0x2000000
      device_add_disk
       ddev->devt = MKDEV(disk->major, disk->first_minor)
        -> (0x2b << 20) | (0x2000000) = 0x2b00000
       device_add
        device_create_sys_dev_entry
    	 format_dev_t
    	  sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev));
    	   -> got 43:0
    	  sysfs_create_link -> /sys/block/43:0
    
    By the way, with the wrong fix, when part_shift is the default value,
    only 8 ndb devices can be created since 8 << 5 is greater than 0xff.
    
    Since the max bits for 'first_minor' should be the same as what
    MKDEV() does, which is 20. Change the upper bound of 'first_minor'
    from 0xff to 0xfffff.
    
    Fixes: b1a8116 ("block: nbd: add sanity check for first_minor")
    Signed-off-by: Yu Kuai <[email protected]>
    Reviewed-by: Josef Bacik <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yu Kuai authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    795e6b3 View commit details
    Browse the repository at this point in the history
  49. nbd: fix possible overflow for 'first_minor' in nbd_dev_add()

    [ Upstream commit 940c264 ]
    
    If 'part_shift' is not zero, then 'index << part_shift' might
    overflow to a value that is not greater than '0xfffff', then sysfs
    might complains about duplicate creation.
    
    Fixes: b0d9111 ("nbd: use an idr to keep track of nbd devices")
    Signed-off-by: Yu Kuai <[email protected]>
    Reviewed-by: Josef Bacik <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yu Kuai authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e99270d View commit details
    Browse the repository at this point in the history
  50. io-wq: fix max-workers not correctly set on multi-node system

    [ Upstream commit 71c9ce2 ]
    
    In io-wq.c:io_wq_max_workers(), new_count[] was changed right after each
    node's value was set. This caused the following node getting the setting
    of the previous one.
    
    Returned values are copied from node 0.
    
    Fixes: 2e48005 ("io-wq: provide a way to limit max number of workers")
    Signed-off-by: Beld Zhang <[email protected]>
    [axboe: minor fixups]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    beldzhang authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    cd63d08 View commit details
    Browse the repository at this point in the history
  51. net: davinci_emac: Fix interrupt pacing disable

    [ Upstream commit d52bcb4 ]
    
    This patch allows to use 0 for `coal->rx_coalesce_usecs` param to
    disable rx irq coalescing.
    
    Previously we could enable rx irq coalescing via ethtool
    (For ex: `ethtool -C eth0 rx-usecs 2000`) but we couldn't disable
    it because this part rejects 0 value:
    
           if (!coal->rx_coalesce_usecs)
                   return -EINVAL;
    
    Fixes: 84da265 ("TI DaVinci EMAC : Implement interrupt pacing functionality.")
    Signed-off-by: Maxim Kiselev <[email protected]>
    Reviewed-by: Grygorii Strashko <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    bigunclemax authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9c806a7 View commit details
    Browse the repository at this point in the history
  52. kselftests/net: add missed icmp.sh test to Makefile

    [ Upstream commit ca3676f ]
    
    When generating the selftests to another folder, the icmp.sh test will
    miss as it is not in Makefile, e.g.
    
      make -C tools/testing/selftests/ install \
          TARGETS="net" INSTALL_PATH=/tmp/kselftests
    
    Fixes: 7e9838b ("selftests/net: Add icmp.sh for testing ICMP dummy address responses")
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    13bf487 View commit details
    Browse the repository at this point in the history
  53. kselftests/net: add missed setup_loopback.sh/setup_veth.sh to Makefile

    [ Upstream commit b99ac18 ]
    
    When generating the selftests to another folder, the include file
    setup_loopback.sh/setup_veth.sh for gro.sh/gre_gro.sh are missing as
    they are not in Makefile, e.g.
    
      make -C tools/testing/selftests/ install \
          TARGETS="net" INSTALL_PATH=/tmp/kselftests
    
    Fixes: 7d15750 ("selftests/net: GRO coalesce test")
    Fixes: 9af771d ("selftests/net: allow GRO coalesce test on veth")
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    19f6735 View commit details
    Browse the repository at this point in the history
  54. kselftests/net: add missed SRv6 tests

    [ Upstream commit 653e7f1 ]
    
    When generating the selftests to another folder, the SRv6 tests are
    missing as they are not in Makefile, e.g.
    
      make -C tools/testing/selftests/ install \
          TARGETS="net" INSTALL_PATH=/tmp/kselftests
    
    Fixes: 03a0b56 ("selftests: seg6: add selftest for SRv6 End.DT46 Behavior")
    Fixes: 2195444 ("selftests: add selftest for the SRv6 End.DT4 behavior")
    Fixes: 2bc0355 ("selftests: add selftest for the SRv6 End.DT6 (VRF) behavior")
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    14a49eb View commit details
    Browse the repository at this point in the history
  55. kselftests/net: add missed vrf_strict_mode_test.sh test to Makefile

    [ Upstream commit 8883deb ]
    
    When generating the selftests to another folder, the
    vrf_strict_mode_test.sh test will miss as it is not in Makefile, e.g.
    
      make -C tools/testing/selftests/ install \
          TARGETS="net" INSTALL_PATH=/tmp/kselftests
    
    Fixes: 8735e6e ("selftests: add selftest for the VRF strict mode")
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    fca8095 View commit details
    Browse the repository at this point in the history
  56. kselftests/net: add missed toeplitz.sh/toeplitz_client.sh to Makefile

    [ Upstream commit 17b6737 ]
    
    When generating the selftests to another folder, the toeplitz.sh
    and toeplitz_client.sh are missing as they are not in Makefile, e.g.
    
      make -C tools/testing/selftests/ install \
          TARGETS="net" INSTALL_PATH=/tmp/kselftests
    
    Making them under TEST_PROGS_EXTENDED as they test NIC hardware features
    and are not intended to be run from kselftests.
    
    Fixes: 5ebfb4c ("selftests/net: toeplitz test")
    Reviewed-by: Willem de Bruijn <[email protected]>
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    351237a View commit details
    Browse the repository at this point in the history
  57. ethtool: fix ethtool msg len calculation for pause stats

    [ Upstream commit 1aabe57 ]
    
    ETHTOOL_A_PAUSE_STAT_MAX is the MAX attribute id,
    so we need to subtract non-stats and add one to
    get a count (IOW -2+1 == -1).
    
    Otherwise we'll see:
    
      ethnl cmd 21: calculated reply length 40, but consumed 52
    
    Fixes: 9a27a33 ("ethtool: add standard pause stats")
    Signed-off-by: Jakub Kicinski <[email protected]>
    Reviewed-by: Saeed Mahameed <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kuba-moo authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    2e746ef View commit details
    Browse the repository at this point in the history
  58. openrisc: fix SMP tlb flush NULL pointer dereference

    [ Upstream commit 27dff9a ]
    
    Throughout the OpenRISC kernel port VMA is passed as NULL when flushing
    kernel tlb entries.  Somehow this was missed when I was testing
    c28b274 ("openrisc: Implement proper SMP tlb flushing") and now the
    SMP kernel fails to completely boot.
    
    In OpenRISC VMA is used only to determine which cores need to have their
    TLB entries flushed.
    
    This patch updates the logic to flush tlbs on all cores when the VMA is
    passed as NULL.  Also, we update places VMA is passed as NULL to use
    flush_tlb_kernel_range instead.  Now, the only place VMA is passed as
    NULL is in the implementation of flush_tlb_kernel_range.
    
    Fixes: c28b274 ("openrisc: Implement proper SMP tlb flushing")
    Reported-by: Jan Henrik Weinstock <[email protected]>
    Signed-off-by: Stafford Horne <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    stffrdhrn authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f48a13b View commit details
    Browse the repository at this point in the history
  59. net: vlan: fix a UAF in vlan_dev_real_dev()

    [ Upstream commit 563bcba ]
    
    The real_dev of a vlan net_device may be freed after
    unregister_vlan_dev(). Access the real_dev continually by
    vlan_dev_real_dev() will trigger the UAF problem for the
    real_dev like following:
    
    ==================================================================
    BUG: KASAN: use-after-free in vlan_dev_real_dev+0xf9/0x120
    Call Trace:
     kasan_report.cold+0x83/0xdf
     vlan_dev_real_dev+0xf9/0x120
     is_eth_port_of_netdev_filter.part.0+0xb1/0x2c0
     is_eth_port_of_netdev_filter+0x28/0x40
     ib_enum_roce_netdev+0x1a3/0x300
     ib_enum_all_roce_netdevs+0xc7/0x140
     netdevice_event_work_handler+0x9d/0x210
    ...
    
    Freed by task 9288:
     kasan_save_stack+0x1b/0x40
     kasan_set_track+0x1c/0x30
     kasan_set_free_info+0x20/0x30
     __kasan_slab_free+0xfc/0x130
     slab_free_freelist_hook+0xdd/0x240
     kfree+0xe4/0x690
     kvfree+0x42/0x50
     device_release+0x9f/0x240
     kobject_put+0x1c8/0x530
     put_device+0x1b/0x30
     free_netdev+0x370/0x540
     ppp_destroy_interface+0x313/0x3d0
    ...
    
    Move the put_device(real_dev) to vlan_dev_free(). Ensure
    real_dev not be freed before vlan_dev unregistered.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Reported-by: [email protected]
    Signed-off-by: Ziyang Xuan <[email protected]>
    Reviewed-by: Jason Gunthorpe <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ziyang Xuan authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    2103242 View commit details
    Browse the repository at this point in the history
  60. net: dsa: felix: fix broken VLAN-tagged PTP under VLAN-aware bridge

    [ Upstream commit 92f6248 ]
    
    Normally it is expected that the dsa_device_ops :: rcv() method finishes
    parsing the DSA tag and consumes it, then never looks at it again.
    
    But commit c0bcf53 ("net: dsa: ocelot: add hardware timestamping
    support for Felix") added support for RX timestamping in a very
    unconventional way. On this switch, a partial timestamp is available in
    the DSA header, but the driver got away with not parsing that timestamp
    right away, but instead delayed that parsing for a little longer:
    
    dsa_switch_rcv():
    	nskb = cpu_dp->rcv(skb, dev); <------------- not here
    	-> ocelot_rcv()
    	...
    
    	skb = nskb;
    	skb_push(skb, ETH_HLEN);
    	skb->pkt_type = PACKET_HOST;
    	skb->protocol = eth_type_trans(skb, skb->dev);
    
    	...
    
    	if (dsa_skb_defer_rx_timestamp(p, skb)) <--- but here
    	-> felix_rxtstamp()
    		return 0;
    
    When in felix_rxtstamp(), this driver accounted for the fact that
    eth_type_trans() happened in the meanwhile, so it got a hold of the
    extraction header again by subtracting (ETH_HLEN + OCELOT_TAG_LEN) bytes
    from the current skb->data.
    
    This worked for quite some time but was quite fragile from the very
    beginning. Not to mention that having DSA tag parsing split in two
    different files, under different folders (net/dsa/tag_ocelot.c vs
    drivers/net/dsa/ocelot/felix.c) made it quite non-obvious for patches to
    come that they might break this.
    
    Finally, the blamed commit does the following: at the end of
    ocelot_rcv(), it checks whether the skb payload contains a VLAN header.
    If it does, and this port is under a VLAN-aware bridge, that VLAN ID
    might not be correct in the sense that the packet might have suffered
    VLAN rewriting due to TCAM rules (VCAP IS1). So we consume the VLAN ID
    from the skb payload using __skb_vlan_pop(), and take the classified
    VLAN ID from the DSA tag, and construct a hwaccel VLAN tag with the
    classified VLAN, and the skb payload is VLAN-untagged.
    
    The big problem is that __skb_vlan_pop() does:
    
    	memmove(skb->data + VLAN_HLEN, skb->data, 2 * ETH_ALEN);
    	__skb_pull(skb, VLAN_HLEN);
    
    aka it moves the Ethernet header 4 bytes to the right, and pulls 4 bytes
    from the skb headroom (effectively also moving skb->data, by definition).
    So for felix_rxtstamp()'s fragile logic, all bets are off now.
    Instead of having the "extraction" pointer point to the DSA header,
    it actually points to 4 bytes _inside_ the extraction header.
    Corollary, the last 4 bytes of the "extraction" header are in fact 4
    stale bytes of the destination MAC address from the Ethernet header,
    from prior to the __skb_vlan_pop() movement.
    
    So of course, RX timestamps are completely bogus when the system is
    configured in this way.
    
    The fix is actually very simple: just don't structure the code like that.
    For better or worse, the DSA PTP timestamping API does not offer a
    straightforward way for drivers to present their RX timestamps, but
    other drivers (sja1105) have established a simple mechanism to carry
    their RX timestamp from dsa_device_ops :: rcv() all the way to
    dsa_switch_ops :: port_rxtstamp() and even later. That mechanism is to
    simply save the partial timestamp to the skb->cb, and complete it later.
    
    Question: why don't we simply populate the skb's struct
    skb_shared_hwtstamps from ocelot_rcv(), and bother with this
    complication of propagating the timestamp to felix_rxtstamp()?
    
    Answer: dsa_switch_ops :: port_rxtstamp() answers the question whether
    PTP packets need sleepable context to retrieve the full RX timestamp.
    Currently felix_rxtstamp() answers "no, thanks" to that question, and
    calls ocelot_ptp_gettime64() from softirq atomic context. This is
    understandable, since Felix VSC9959 is a PCIe memory-mapped switch, so
    hardware access does not require sleeping. But the felix driver is
    preparing for the introduction of other switches where hardware access
    is over a slow bus like SPI or MDIO:
    https://lore.kernel.org/lkml/[email protected]/
    
    So I would like to keep this code structure, so the rework needed when
    that driver will need PTP support will be minimal (answer "yes, I need
    deferred context for this skb's RX timestamp", then the partial
    timestamp will still be found in the skb->cb.
    
    Fixes: ea440cd ("net: dsa: tag_ocelot: use VLAN information from tagging header when available")
    Reported-by: Po Liu <[email protected]>
    Cc: Yangbo Lu <[email protected]>
    Signed-off-by: Vladimir Oltean <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    vladimiroltean authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    932224b View commit details
    Browse the repository at this point in the history
  61. ice: Fix replacing VF hardware MAC to existing MAC filter

    [ Upstream commit ce572a5 ]
    
    VF was not able to change its hardware MAC address in case
    the new address was already present in the MAC filter list.
    Change the handling of VF add mac request to not return
    if requested MAC address is already present on the list
    and check if its hardware MAC needs to be updated in this case.
    
    Fixes: ed4c068 ("ice: Enable ip link show on the PF to display VF unicast MAC(s)")
    Signed-off-by: Sylwester Dziedziuch <[email protected]>
    Tested-by: Tony Brelinski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    sylwesterdziedziuch authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    abf65a2 View commit details
    Browse the repository at this point in the history
  62. ice: Fix not stopping Tx queues for VFs

    [ Upstream commit b385cca ]
    
    When a VF is removed and/or reset its Tx queues need to be
    stopped from the PF. This is done by calling the ice_dis_vf_qs()
    function, which calls ice_vsi_stop_lan_tx_rings(). Currently
    ice_dis_vf_qs() is protected by the VF state bit ICE_VF_STATE_QS_ENA.
    Unfortunately, this is causing the Tx queues to not be disabled in some
    cases and when the VF tries to re-enable/reconfigure its Tx queues over
    virtchnl the op is failing. This is because a VF can be reset and/or
    removed before the ICE_VF_STATE_QS_ENA bit is set, but the Tx queues
    were already configured via ice_vsi_cfg_single_txq() in the
    VIRTCHNL_OP_CONFIG_VSI_QUEUES op. However, the ICE_VF_STATE_QS_ENA bit
    is set on a successful VIRTCHNL_OP_ENABLE_QUEUES, which will always
    happen after the VIRTCHNL_OP_CONFIG_VSI_QUEUES op.
    
    This was causing the following error message when loading the ice
    driver, creating VFs, and modifying VF trust in an endless loop:
    
    [35274.192484] ice 0000:88:00.0: Failed to set LAN Tx queue context, error: ICE_ERR_PARAM
    [35274.193074] ice 0000:88:00.0: VF 0 failed opcode 6, retval: -5
    [35274.193640] iavf 0000:88:01.0: PF returned error -5 (IAVF_ERR_PARAM) to our request 6
    
    Fix this by always calling ice_dis_vf_qs() and silencing the error
    message in ice_vsi_stop_tx_ring() since the calling code ignores the
    return anyway. Also, all other places that call ice_vsi_stop_tx_ring()
    catch the error, so this doesn't affect those flows since there was no
    change to the values the function returns.
    
    Other solutions were considered (i.e. tracking which VF queues had been
    "started/configured" in VIRTCHNL_OP_CONFIG_VSI_QUEUES, but it seemed
    more complicated than it was worth. This solution also brings in the
    chance for other unexpected conditions due to invalid state bit checks.
    So, the proposed solution seemed like the best option since there is no
    harm in failing to stop Tx queues that were never started.
    
    This issue can be seen using the following commands:
    
    for i in {0..50}; do
            rmmod ice
            modprobe ice
    
            sleep 1
    
            echo 1 > /sys/class/net/ens785f0/device/sriov_numvfs
            echo 1 > /sys/class/net/ens785f1/device/sriov_numvfs
    
            ip link set ens785f1 vf 0 trust on
            ip link set ens785f0 vf 0 trust on
    
            sleep 2
    
            echo 0 > /sys/class/net/ens785f0/device/sriov_numvfs
            echo 0 > /sys/class/net/ens785f1/device/sriov_numvfs
            sleep 1
            echo 1 > /sys/class/net/ens785f0/device/sriov_numvfs
            echo 1 > /sys/class/net/ens785f1/device/sriov_numvfs
    
            ip link set ens785f1 vf 0 trust on
            ip link set ens785f0 vf 0 trust on
    done
    
    Fixes: 77ca27c ("ice: add support for virtchnl_queue_select.[tx|rx]_queues bitmap")
    Signed-off-by: Brett Creeley <[email protected]>
    Tested-by: Konrad Jankowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    bcreeley13 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    1deba5e View commit details
    Browse the repository at this point in the history
  63. kdb: Adopt scheduler's task classification

    [ Upstream commit b77dbc8 ]
    
    Currently kdb contains some open-coded routines to generate a summary
    character for each task. This code currently issues warnings, is
    almost certainly broken and won't make sense to any kernel dev who
    has ever used /proc to examine task states.
    
    Fix both the warning and the potential for confusion by adopting the
    scheduler's task classification. Whilst doing this we also simplify the
    filtering by using mask strings directly (which means we don't have to
    guess all the characters the scheduler might give us).
    
    Unfortunately we can't quite match the scheduler classification completely.
    We add four extra states: - for idle loops and i, m and s for sleeping
    system daemons (which means kthreads in one of the I, M and S states).
    These extra states are used to manage the filters for tools to make the
    output of ps and bta less noisy.
    
    Note: The Fixes below is the last point the original dubious code was
          moved; it was not introduced by that patch. However it gives us
          the last point to which this patch can be easily backported.
          Happily that should be enough to cover the introduction of
          CONFIG_WERROR!
    
    Fixes: 2f064a5 ("sched: Change task_struct::state")
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Douglas Anderson <[email protected]>
    Signed-off-by: Daniel Thompson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    daniel-thompson authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    fdcdc4c View commit details
    Browse the repository at this point in the history
  64. ACPI: PMIC: Fix intel_pmic_regs_handler() read accesses

    [ Upstream commit 009a789 ]
    
    The handling of PMIC register reads through writing 0 to address 4
    of the OpRegion is wrong. Instead of returning the read value
    through the value64, which is a no-op for function == ACPI_WRITE calls,
    store the value and then on a subsequent function == ACPI_READ with
    address == 3 (the address for the value field of the OpRegion)
    return the stored value.
    
    This has been tested on a Xiaomi Mi Pad 2 and makes the ACPI battery dev
    there mostly functional (unfortunately there are still other issues).
    
    Here are the SET() / GET() functions of the PMIC ACPI device,
    which use this OpRegion, which clearly show the new behavior to
    be correct:
    
    OperationRegion (REGS, 0x8F, Zero, 0x50)
    Field (REGS, ByteAcc, NoLock, Preserve)
    {
        CLNT,   8,
        SA,     8,
        OFF,    8,
        VAL,    8,
        RWM,    8
    }
    
    Method (GET, 3, Serialized)
    {
        If ((AVBE == One))
        {
            CLNT = Arg0
            SA = Arg1
            OFF = Arg2
            RWM = Zero
            If ((AVBG == One))
            {
                GPRW = Zero
            }
        }
    
        Return (VAL) /* \_SB_.PCI0.I2C7.PMI5.VAL_ */
    }
    
    Method (SET, 4, Serialized)
    {
        If ((AVBE == One))
        {
            CLNT = Arg0
            SA = Arg1
            OFF = Arg2
            VAL = Arg3
            RWM = One
            If ((AVBG == One))
            {
                GPRW = One
            }
        }
    }
    
    Fixes: 0afa877 ("ACPI / PMIC: intel: add REGS operation region support")
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jwrdegoede authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    19c6525 View commit details
    Browse the repository at this point in the history
  65. PCI: j721e: Fix j721e_pcie_probe() error path

    [ Upstream commit 496bb18 ]
    
    If an error occurs after a successful cdns_pcie_init_phy() call, it must be
    undone by a cdns_pcie_disable_phy() call, as already done above and below.
    
    Update the goto to branch at the correct place of the error handling path.
    
    Link: https://lore.kernel.org/r/db477b0cb444891a17c4bb424467667dc30d0bab.1624794264.git.christophe.jaillet@wanadoo.fr
    Fixes: 49e0efd ("PCI: j721e: Add support to provide refclk to PCIe connector")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Krzysztof Wilczyński <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tititiou36 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    4e7af8a View commit details
    Browse the repository at this point in the history
  66. nvdimm/btt: do not call del_gendisk() if not needed

    [ Upstream commit 3aefb5e ]
    
    del_gendisk() should not called if the disk has not been added. Fix this.
    
    Fixes: 41cd8b7 ("libnvdimm, btt: add support for blk integrity")
    Reviewed-by: Dan Williams <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Luis Chamberlain <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mcgrof authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    064b6b0 View commit details
    Browse the repository at this point in the history
  67. scsi: bsg: Fix errno when scsi_bsg_register_queue() fails

    [ Upstream commit 5f7cf82 ]
    
    When the value of error is printed, it will always be 0. We should print
    the correct error code when scsi_bsg_register_queue() fails.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: ead09dd ("scsi: bsg: Simplify device registration")
    Cc: Jens Axboe <[email protected]>
    Cc: Christoph Hellwig <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Jackie Liu <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    JackieLiu1 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    1e476c9 View commit details
    Browse the repository at this point in the history
  68. scsi: ufs: ufshpb: Use proper power management API

    [ Upstream commit 351b3a8 ]
    
    In ufshpb, pm_runtime_{get,put}_sync() are used to avoid unwanted runtime
    suspend during query requests. Whereas commit b294ff3 ("scsi: ufs:
    core: Enable power management for wlun") modified the driver core to use
    ufshcd_rpm_{get,put}_sync() APIs.
    
    Switch to these APIs in HPB module as well.
    
    Link: https://lore.kernel.org/r/20210902003534epcms2p1937a0f0eeb48a441cb69f5ef13ff8430@epcms2p1
    Reviewed-by: Avri Altman <[email protected]>
    Signed-off-by: Daejun Park <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Daejun Park authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5dd6e64 View commit details
    Browse the repository at this point in the history
  69. scsi: ufs: core: Fix NULL pointer dereference

    [ Upstream commit 1da3b01 ]
    
    Calling ufshcd_rpm_{get/put}_sync() prior to ufshcd_scsi_add_wlus() being
    called will trigger a NULL pointer dereference. This is because
    hba->sdev_ufs_device is initialized in ufshcd_scsi_add_wlus().
    
        Unable to handle kernel NULL pointer dereference at virtual address
        0000000000000348
        Mem abort info:
          ESR = 0x96000004
          EC = 0x25: DABT (current EL), IL = 32 bits
          SET = 0, FnV = 0
          EA = 0, S1PTW = 0
          FSC = 0x04: level 0 translation fault
        Data abort info:
          ISV = 0, ISS = 0x00000004
          CM = 0, WnR = 0
        [0000000000000348] user address but active_mm is swapper
        Internal error: Oops: 96000004 [#1] PREEMPT SMP
        Modules linked in:
        CPU: 0 PID: 91 Comm: kworker/u16:1 Not tainted 5.15.0-rc1-beanhuo-linaro-1423
        Hardware name: MicronRB (DT)
        Workqueue: events_unbound async_run_entry_fn
        pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
        pc : pm_runtime_drop_link+0x128/0x338
        lr : ufshpb_get_dev_info+0x8c/0x148
        sp : ffff800012573c10
        x29: ffff800012573c10 x28: 0000000000000000 x27: 0000000000000003
        x26: ffff000001d21298 x25: 000000005abcea60 x24: ffff800011d89000
        x23: 0000000000000001 x22: ffff000001d21880 x21: ffff000001ec9300
        x20: 0000000000000004 x19: 0000000000000198 x18: ffffffffffffffff
        x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000041400
        x14: 5eee00201100200a x13: 000000000000bb03 x12: 0000000000000000
        x11: 0000000000000100 x10: 0200000000000000 x9 : bb0000021a162c01
        x8 : 0302010021021003 x7 : 0000000000000000 x6 : ffff800012573af0
        x5 : 0000000000000001 x4 : 0000000000000001 x3 : 0000000000000200
        x2 : 0000000000000348 x1 : 0000000000000348 x0 : ffff80001095308c
        Call trace:
         pm_runtime_drop_link+0x128/0x338
         ufshpb_get_dev_info+0x8c/0x148
         ufshcd_probe_hba+0xda0/0x11b8
         ufshcd_async_scan+0x34/0x330
         async_run_entry_fn+0x38/0x180
         process_one_work+0x1f4/0x498
         worker_thread+0x48/0x480
         kthread+0x140/0x158
         ret_from_fork+0x10/0x20
        Code: 88027c01 35ffffa2 17fff6c4 f9800051 (885f7c40)
        ---[ end trace 2ba541335f595c95 ]
    
    ufshpb_get_dev_info() is only called during asynchronous scanning and at
    that time pm_runtime_get_sync() has been called:
    
        ...
        /* Hold auto suspend until async scan completes */
        pm_runtime_get_sync(dev);
        atomic_set(&hba->scsi_block_reqs_cnt, 0);
        ...
        ufshcd_async_scan()
            ufshcd_probe_hba(hba, true);
                ufshcd_device_params_init(hba);
                    ufshpb_get_dev_info();
        ...
            pm_runtime_put_sync(hba->dev);
    
    Remove ufshcd_rpm_{get/put}_sync() from ufshpb_get_dev_info() to fix this
    problem.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 351b3a8 ("scsi: ufs: ufshpb: Use proper power management API")
    Signed-off-by: Bean Huo <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    beanhuo authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e022fea View commit details
    Browse the repository at this point in the history
  70. scsi: ufs: ufshpb: Properly handle max-single-cmd

    [ Upstream commit 9ec5128 ]
    
    The spec recommends that for transfer length larger than the max-single-cmd
    attribute (bMAX_DATA_SIZE_FOR_HPB_SINGLE_CMD) it is possible to couple
    pre-requests with the HPB-READ command.  Being a recommendation, using
    pre-requests can be perceived merely as a means of optimization.  A common
    practice was to send pre-requests for chunks within some interval, and
    leave the READ10 untouched if larger.
    
    Now that the pre-request flows have been removed, all the commands are
    single commands.  Properly handle this attribute and do not send HPB-READ
    for transfer lengths larger than max-single-cmd.
    
    [mkp: resolve conflict]
    
    Fixes: 09d9e4d ("scsi: ufs: ufshpb: Remove HPB2.0 flows")
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Daejun Park <[email protected]>
    Signed-off-by: Avri Altman <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    avri-altman-wdc authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    57488e2 View commit details
    Browse the repository at this point in the history
  71. selftests: net: properly support IPv6 in GSO GRE test

    [ Upstream commit a985442 ]
    
    Explicitly pass -6 to netcat when the test is using IPv6 to prevent
    failures.
    
    Also make sure to pass "-N" to netcat to close the socket after EOF on
    the client side, otherwise we would always hit the timeout and the test
    would fail.
    
    Without this fix applied:
    
     TEST: GREv6/v4 - copy file w/ TSO                                   [FAIL]
     TEST: GREv6/v4 - copy file w/ GSO                                   [FAIL]
     TEST: GREv6/v6 - copy file w/ TSO                                   [FAIL]
     TEST: GREv6/v6 - copy file w/ GSO                                   [FAIL]
    
    With this fix applied:
    
     TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
     TEST: GREv6/v4 - copy file w/ GSO                                   [ OK ]
     TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
     TEST: GREv6/v6 - copy file w/ GSO                                   [ OK ]
    
    Fixes: 025efa0 ("selftests: add simple GSO GRE test")
    Signed-off-by: Andrea Righi <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Andrea Righi authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e65a7ab View commit details
    Browse the repository at this point in the history
  72. drm/nouveau/svm: Fix refcount leak bug and missing check against null…

    … bug
    
    [ Upstream commit 6bb8c2d ]
    
    The reference counting issue happens in one exception handling path of
    nouveau_svmm_bind(). When cli->svm.svmm is null, the function forgets
    to decrease the refcount of mm increased by get_task_mm(), causing a
    refcount leak.
    
    Fix this issue by using mmput() to decrease the refcount in the
    exception handling path.
    
    Also, the function forgets to do check against null when get mm
    by get_task_mm().
    
    Fix this issue by adding null check after get mm by get_task_mm().
    
    Signed-off-by: Chenyuan Mi <[email protected]>
    Signed-off-by: Xiyu Yang <[email protected]>
    Signed-off-by: Xin Tan <[email protected]>
    Fixes: 822cab6 ("drm/nouveau/svm: check for SVM initialized before migrating")
    Reviewed-by: Lyude Paul <[email protected]>
    Reviewed-by: Ben Skeggs <[email protected]>
    Reviewed-by: Karol Herbst <[email protected]>
    Signed-off-by: Karol Herbst <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/14
    Signed-off-by: Sasha Levin <[email protected]>
    Chenyuan Mi authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    8e8ed25 View commit details
    Browse the repository at this point in the history
  73. nvdimm/pmem: cleanup the disk if pmem_release_disk() is yet assigned

    [ Upstream commit accf58a ]
    
    Prior to devm being able to use pmem_release_disk() there are other
    failure which can occur for which we must account for and release the
    disk for. Address those few cases.
    
    Fixes: 3dd60fb ("nvdimm/pmem: stop using q_usage_count as external pgmap refcount")
    Reviewed-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Luis Chamberlain <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mcgrof authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    275e4a3 View commit details
    Browse the repository at this point in the history
  74. block/ataflop: use the blk_cleanup_disk() helper

    [ Upstream commit 44a469b ]
    
    Use the helper to replace two lines with one.
    
    Signed-off-by: Luis Chamberlain <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mcgrof authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9d3261d View commit details
    Browse the repository at this point in the history
  75. block/ataflop: add registration bool before calling del_gendisk()

    [ Upstream commit 573effb ]
    
    The ataflop assumes del_gendisk() is safe to call, this is only
    true because add_disk() does not return a failure, but that will
    change soon. And so, before we get to adding error handling for
    that case, let's make sure we keep track of which disks actually
    get registered. Then we use this to only call del_gendisk for them.
    
    Signed-off-by: Luis Chamberlain <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mcgrof authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    875ffb4 View commit details
    Browse the repository at this point in the history
  76. block/ataflop: provide a helper for cleanup up an atari disk

    [ Upstream commit deae113 ]
    
    Instead of using two separate code paths for cleaning up an atari disk,
    use one. We take the more careful approach to check for *all* disk
    types, as is done on exit. The init path didn't have that check as
    the alternative disk types are only probed for later, they are not
    initialized by default.
    
    Yes, there is a shared tag for all disks.
    
    Signed-off-by: Luis Chamberlain <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mcgrof authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e107071 View commit details
    Browse the repository at this point in the history
  77. ataflop: remove ataflop_probe_lock mutex

    [ Upstream commit 4ddb85d ]
    
    Commit bf9c053 ("ataflop: use a separate gendisk for each media
    format") introduced ataflop_probe_lock mutex, but forgot to unlock the
    mutex when atari_floppy_init() (i.e. module loading) succeeded. This will
    result in double lock deadlock if ataflop_probe() is called. Also,
    unregister_blkdev() must not be called from atari_floppy_init() with
    ataflop_probe_lock held when atari_floppy_init() failed, for
    ataflop_probe() waits for ataflop_probe_lock with major_names_lock held
    (i.e. AB-BA deadlock).
    
    __register_blkdev() needs to be called last in order to avoid calling
    ataflop_probe() when atari_floppy_init() is about to fail, for memory for
    completing already-started ataflop_probe() safely will be released as soon
    as atari_floppy_init() released ataflop_probe_lock mutex.
    
    As with commit 8b52d8b ("loop: reorder loop_exit"),
    unregister_blkdev() needs to be called first in order to avoid calling
    ataflop_alloc_disk() from ataflop_probe() after del_gendisk() from
    atari_floppy_exit().
    
    By relocating __register_blkdev() / unregister_blkdev() as explained above,
    we can remove ataflop_probe_lock mutex, for probe function and __exit
    function are serialized by major_names_lock mutex.
    
    Signed-off-by: Tetsuo Handa <[email protected]>
    Fixes: bf9c053 ("ataflop: use a separate gendisk for each media format")
    Reviewed-by: Luis Chamberlain <[email protected]>
    Tested-by: Michael Schmitz <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Tetsuo Handa authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6d1d540 View commit details
    Browse the repository at this point in the history
  78. PCI: Do not enable AtomicOps on VFs

    [ Upstream commit 5ec0a6f ]
    
    Host crashes when pci_enable_atomic_ops_to_root() is called for VFs with
    virtual buses. The virtual buses added to SR-IOV have bus->self set to NULL
    and host crashes due to this.
    
      PID: 4481   TASK: ffff89c6941b0000  CPU: 53  COMMAND: "bash"
      ...
       #3 [ffff9a9481713808] oops_end at ffffffffb9025cd6
       #4 [ffff9a9481713828] page_fault_oops at ffffffffb906e417
       #5 [ffff9a9481713888] exc_page_fault at ffffffffb9a0ad14
       #6 [ffff9a94817138b0] asm_exc_page_fault at ffffffffb9c00ace
          [exception RIP: pcie_capability_read_dword+28]
          RIP: ffffffffb952fd5c  RSP: ffff9a9481713960  RFLAGS: 00010246
          RAX: 0000000000000001  RBX: ffff89c6b1096000  RCX: 0000000000000000
          RDX: ffff9a9481713990  RSI: 0000000000000024  RDI: 0000000000000000
          RBP: 0000000000000080   R8: 0000000000000008   R9: ffff89c64341a2f8
          R10: 0000000000000002  R11: 0000000000000000  R12: ffff89c648bab000
          R13: 0000000000000000  R14: 0000000000000000  R15: ffff89c648bab0c8
          ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
       #7 [ffff9a9481713988] pci_enable_atomic_ops_to_root at ffffffffb95359a6
       #8 [ffff9a94817139c0] bnxt_qplib_determine_atomics at ffffffffc08c1a33 [bnxt_re]
       #9 [ffff9a94817139d0] bnxt_re_dev_init at ffffffffc08ba2d1 [bnxt_re]
    
    Per PCIe r5.0, sec 9.3.5.10, the AtomicOp Requester Enable bit in Device
    Control 2 is reserved for VFs.  The PF value applies to all associated VFs.
    
    Return -EINVAL if pci_enable_atomic_ops_to_root() is called for a VF.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 35f5ace ("RDMA/bnxt_re: Enable global atomic ops if platform supports")
    Fixes: 430a236 ("PCI: Add pci_enable_atomic_ops_to_root()")
    Signed-off-by: Selvin Xavier <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Andy Gospodarek <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    selvintxavier authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d8dedce View commit details
    Browse the repository at this point in the history
  79. cpufreq: intel_pstate: Clear HWP desired on suspend/shutdown and offline

    [ Upstream commit dbea75f ]
    
    Commit a365ab6 ("cpufreq: intel_pstate: Implement the
    ->adjust_perf() callback") caused intel_pstate to use nonzero HWP
    desired values in certain usage scenarios, but it did not prevent
    them from being leaked into the confugirations in which HWP desired
    is expected to be 0.
    
    The failing scenarios are switching the driver from the passive
    mode to the active mode and starting a new kernel via kexec() while
    intel_pstate is running in the passive mode.
    
    To address this issue, ensure that HWP desired will be cleared on
    offline and suspend/shutdown.
    
    Fixes: a365ab6 ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback")
    Reported-by: Julia Lawall <[email protected]>
    Tested-by: Julia Lawall <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rafaeljw authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    96f9abc View commit details
    Browse the repository at this point in the history
  80. net: phy: fix duplex out of sync problem while changing settings

    [ Upstream commit a4db905 ]
    
    As reported by Zhang there's a small issue if in forced mode the duplex
    mode changes with the link staying up [0]. In this case the MAC isn't
    notified about the change.
    
    The proposed patch relies on the phylib state machine and ignores the
    fact that there are drivers that uses phylib but not the phylib state
    machine. So let's don't change the behavior for such drivers and fix
    it w/o re-adding state PHY_FORCING for the case that phylib state
    machine is used.
    
    [0] https://lore.kernel.org/netdev/[email protected]/T/
    
    Fixes: 2bd229d ("net: phy: remove state PHY_FORCING")
    Reported-by: Zhang Changzhong <[email protected]>
    Tested-by: Zhang Changzhong <[email protected]>
    Signed-off-by: Heiner Kallweit <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    hkallweit authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    8f1e237 View commit details
    Browse the repository at this point in the history
  81. block: fix device_add_disk() kobject_create_and_add() error handling

    [ Upstream commit fe7d064 ]
    
    Commit 83cbce9 ("block: add error handling for device_add_disk /
    add_disk") added error handling to device_add_disk(), however the goto
    label for the kobject_create_and_add() failure did not set the return
    value correctly, and so we can end up in a situation where
    kobject_create_and_add() fails but we report success.
    
    Fixes: 83cbce9 ("block: add error handling for device_add_disk / add_disk")
    Reported-by: kernel test robot <[email protected]>
    Reported-by: Dan Carpenter <[email protected]>
    Signed-off-by: Luis Chamberlain <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    [axboe: fold in followup fix from Wu Bo <[email protected]>]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mcgrof authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9d5c7b0 View commit details
    Browse the repository at this point in the history
  82. drm/ttm: remove ttm_bo_vm_insert_huge()

    [ Upstream commit 0d97950 ]
    
    The huge page functionality in TTM does not work safely because PUD and
    PMD entries do not have a special bit.
    
    get_user_pages_fast() considers any page that passed pmd_huge() as
    usable:
    
    	if (unlikely(pmd_trans_huge(pmd) || pmd_huge(pmd) ||
    		     pmd_devmap(pmd))) {
    
    And vmf_insert_pfn_pmd_prot() unconditionally sets
    
    	entry = pmd_mkhuge(pfn_t_pmd(pfn, prot));
    
    eg on x86 the page will be _PAGE_PRESENT | PAGE_PSE.
    
    As such gup_huge_pmd() will try to deref a struct page:
    
    	head = try_grab_compound_head(pmd_page(orig), refs, flags);
    
    and thus crash.
    
    Thomas further notices that the drivers are not expecting the struct page
    to be used by anything - in particular the refcount incr above will cause
    them to malfunction.
    
    Thus everything about this is not able to fully work correctly considering
    GUP_fast. Delete it entirely. It can return someday along with a proper
    PMD/PUD_SPECIAL bit in the page table itself to gate GUP_fast.
    
    Fixes: 314b658 ("drm/ttm, drm/vmwgfx: Support huge TTM pagefaults")
    Signed-off-by: Jason Gunthorpe <[email protected]>
    Reviewed-by: Thomas Hellström <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    [danvet: Update subject per Thomas' &Christian's review]
    Signed-off-by: Daniel Vetter <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    jgunthorpe authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    71fb40a View commit details
    Browse the repository at this point in the history
  83. bonding: Fix a use-after-free problem when bond_sysfs_slave_add() failed

    [ Upstream commit b93c6a9 ]
    
    When I do fuzz test for bonding device interface, I got the following
    use-after-free Calltrace:
    
    ==================================================================
    BUG: KASAN: use-after-free in bond_enslave+0x1521/0x24f0
    Read of size 8 at addr ffff88825bc11c00 by task ifenslave/7365
    
    CPU: 5 PID: 7365 Comm: ifenslave Tainted: G            E     5.15.0-rc1+ #13
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014
    Call Trace:
     dump_stack_lvl+0x6c/0x8b
     print_address_description.constprop.0+0x48/0x70
     kasan_report.cold+0x82/0xdb
     __asan_load8+0x69/0x90
     bond_enslave+0x1521/0x24f0
     bond_do_ioctl+0x3e0/0x450
     dev_ifsioc+0x2ba/0x970
     dev_ioctl+0x112/0x710
     sock_do_ioctl+0x118/0x1b0
     sock_ioctl+0x2e0/0x490
     __x64_sys_ioctl+0x118/0x150
     do_syscall_64+0x35/0xb0
     entry_SYSCALL_64_after_hwframe+0x44/0xae
    RIP: 0033:0x7f19159cf577
    Code: b3 66 90 48 8b 05 11 89 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 78
    RSP: 002b:00007ffeb3083c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
    RAX: ffffffffffffffda RBX: 00007ffeb3084bca RCX: 00007f19159cf577
    RDX: 00007ffeb3083ce0 RSI: 0000000000008990 RDI: 0000000000000003
    RBP: 00007ffeb3084bc4 R08: 0000000000000040 R09: 0000000000000000
    R10: 00007ffeb3084bc0 R11: 0000000000000246 R12: 00007ffeb3083ce0
    R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffeb3083cb0
    
    Allocated by task 7365:
     kasan_save_stack+0x23/0x50
     __kasan_kmalloc+0x83/0xa0
     kmem_cache_alloc_trace+0x22e/0x470
     bond_enslave+0x2e1/0x24f0
     bond_do_ioctl+0x3e0/0x450
     dev_ifsioc+0x2ba/0x970
     dev_ioctl+0x112/0x710
     sock_do_ioctl+0x118/0x1b0
     sock_ioctl+0x2e0/0x490
     __x64_sys_ioctl+0x118/0x150
     do_syscall_64+0x35/0xb0
     entry_SYSCALL_64_after_hwframe+0x44/0xae
    
    Freed by task 7365:
     kasan_save_stack+0x23/0x50
     kasan_set_track+0x20/0x30
     kasan_set_free_info+0x24/0x40
     __kasan_slab_free+0xf2/0x130
     kfree+0xd1/0x5c0
     slave_kobj_release+0x61/0x90
     kobject_put+0x102/0x180
     bond_sysfs_slave_add+0x7a/0xa0
     bond_enslave+0x11b6/0x24f0
     bond_do_ioctl+0x3e0/0x450
     dev_ifsioc+0x2ba/0x970
     dev_ioctl+0x112/0x710
     sock_do_ioctl+0x118/0x1b0
     sock_ioctl+0x2e0/0x490
     __x64_sys_ioctl+0x118/0x150
     do_syscall_64+0x35/0xb0
     entry_SYSCALL_64_after_hwframe+0x44/0xae
    
    Last potentially related work creation:
     kasan_save_stack+0x23/0x50
     kasan_record_aux_stack+0xb7/0xd0
     insert_work+0x43/0x190
     __queue_work+0x2e3/0x970
     delayed_work_timer_fn+0x3e/0x50
     call_timer_fn+0x148/0x470
     run_timer_softirq+0x8a8/0xc50
     __do_softirq+0x107/0x55f
    
    Second to last potentially related work creation:
     kasan_save_stack+0x23/0x50
     kasan_record_aux_stack+0xb7/0xd0
     insert_work+0x43/0x190
     __queue_work+0x2e3/0x970
     __queue_delayed_work+0x130/0x180
     queue_delayed_work_on+0xa7/0xb0
     bond_enslave+0xe25/0x24f0
     bond_do_ioctl+0x3e0/0x450
     dev_ifsioc+0x2ba/0x970
     dev_ioctl+0x112/0x710
     sock_do_ioctl+0x118/0x1b0
     sock_ioctl+0x2e0/0x490
     __x64_sys_ioctl+0x118/0x150
     do_syscall_64+0x35/0xb0
     entry_SYSCALL_64_after_hwframe+0x44/0xae
    
    The buggy address belongs to the object at ffff88825bc11c00
     which belongs to the cache kmalloc-1k of size 1024
    The buggy address is located 0 bytes inside of
     1024-byte region [ffff88825bc11c00, ffff88825bc12000)
    The buggy address belongs to the page:
    page:ffffea00096f0400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x25bc10
    head:ffffea00096f0400 order:3 compound_mapcount:0 compound_pincount:0
    flags: 0x57ff00000010200(slab|head|node=1|zone=2|lastcpupid=0x7ff)
    raw: 057ff00000010200 ffffea0009a71c08 ffff888240001968 ffff88810004dbc0
    raw: 0000000000000000 00000000000a000a 00000001ffffffff 0000000000000000
    page dumped because: kasan: bad access detected
    
    Memory state around the buggy address:
     ffff88825bc11b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
     ffff88825bc11b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    >ffff88825bc11c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                       ^
     ffff88825bc11c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
     ffff88825bc11d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ==================================================================
    
    Put new_slave in bond_sysfs_slave_add() will cause use-after-free problems
    when new_slave is accessed in the subsequent error handling process. Since
    new_slave will be put in the subsequent error handling process, remove the
    unnecessary put to fix it.
    In addition, when sysfs_create_file() fails, if some files have been crea-
    ted successfully, we need to call sysfs_remove_file() to remove them.
    Since there are sysfs_create_files() & sysfs_remove_files() can be used,
    use these two functions instead.
    
    Fixes: 7afcaec (bonding: use kobject_put instead of _del after kobject_add)
    Signed-off-by: Huang Guobin <[email protected]>
    Reviewed-by: Jakub Kicinski <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Huang Guobin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    0c49ae7 View commit details
    Browse the repository at this point in the history
  84. octeontx2-pf: select CONFIG_NET_DEVLINK

    [ Upstream commit 9cbc336 ]
    
    The octeontx2 pf nic driver failsz to link when the devlink support
    is not reachable:
    
    aarch64-linux-ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.o: in function `otx2_dl_mcam_count_get':
    otx2_devlink.c:(.text+0x10): undefined reference to `devlink_priv'
    aarch64-linux-ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.o: in function `otx2_dl_mcam_count_validate':
    otx2_devlink.c:(.text+0x50): undefined reference to `devlink_priv'
    aarch64-linux-ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.o: in function `otx2_dl_mcam_count_set':
    otx2_devlink.c:(.text+0xd0): undefined reference to `devlink_priv'
    aarch64-linux-ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.o: in function `otx2_devlink_info_get':
    otx2_devlink.c:(.text+0x150): undefined reference to `devlink_priv'
    
    This is already selected by the admin function driver, but not the
    actual nic, which might be built-in when the af driver is not.
    
    Fixes: 2da4894 ("octeontx2-pf: devlink params support to set mcam entry count")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    arndb authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e9806f8 View commit details
    Browse the repository at this point in the history
  85. ALSA: memalloc: Catch call with NULL snd_dma_buffer pointer

    [ Upstream commit dce9446 ]
    
    Although we've covered all calls with NULL dma buffer pointer, so far,
    there may be still some else in the wild.  For catching such a case
    more easily, add a WARN_ON_ONCE() in snd_dma_get_ops().
    
    Fixes: 37af81c ("ALSA: core: Abstract memory alloc helpers")
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tiwai authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    ca1362f View commit details
    Browse the repository at this point in the history
  86. mfd: core: Add missing of_node_put for loop iteration

    [ Upstream commit 002be81 ]
    
    Early exits from for_each_child_of_node() should decrement the
    node reference counter.  Reported by Coccinelle:
    
      drivers/mfd/mfd-core.c:197:2-24: WARNING:
        Function "for_each_child_of_node" should have of_node_put() before goto around lines 209.
    
    Fixes: c94bb23 ("mfd: Make MFD core code Device Tree and IRQ domain aware")
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Lee Jones <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    krzk authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    34b1f6d View commit details
    Browse the repository at this point in the history
  87. mfd: cpcap: Add SPI device ID table

    [ Upstream commit d5fa859 ]
    
    Currently autoloading for SPI devices does not use the DT ID table, it uses
    SPI modalises. Supporting OF modalises is going to be difficult if not
    impractical, an attempt was made but has been reverted, so ensure that
    module autoloading works for this driver by adding a SPI device ID table.
    
    Fixes: 96c8395 ("spi: Revert modalias changes")
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Lee Jones <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    broonie authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    bd20d4d View commit details
    Browse the repository at this point in the history
  88. mfd: sprd: Add SPI device ID table

    [ Upstream commit c5c7f06 ]
    
    Currently autoloading for SPI devices does not use the DT ID table, it uses
    SPI modalises. Supporting OF modalises is going to be difficult if not
    impractical, an attempt was made but has been reverted, so ensure that
    module autoloading works for this driver by adding a SPI device ID table.
    
    Fixes: 96c8395 ("spi: Revert modalias changes")
    Signed-off-by: Mark Brown <[email protected]>
    Reviewed-by: Baolin Wang <[email protected]>
    Signed-off-by: Lee Jones <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    broonie authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5fb2bcf View commit details
    Browse the repository at this point in the history
  89. mfd: altera-sysmgr: Fix a mistake caused by resource_size conversion

    [ Upstream commit fae2570 ]
    
    The resource_size defines that:
    	res->end - res->start + 1;
    The origin original code is:
    	sysmgr_config.max_register = res->end - res->start - 3;
    
    So, the correct fix is that:
    	sysmgr_config.max_register = resource_size(res) - 4;
    
    Fixes: d12edf9 ("mfd: altera-sysmgr: Use resource_size function on resource object")
    Signed-off-by: Kai Song <[email protected]>
    Signed-off-by: Lee Jones <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Kai Song authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    27f2e5b View commit details
    Browse the repository at this point in the history
  90. ACPI: PM: Fix device wakeup power reference counting error

    [ Upstream commit 452a3e7 ]
    
    Fix a device wakeup power reference counting error introduced by
    commit a2d7b2e ("ACPI: PM: Fix sharing of wakeup power
    resources") because of a coding mistake.
    
    Fixes: a2d7b2e ("ACPI: PM: Fix sharing of wakeup power resources")
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rafaeljw authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f0f8307 View commit details
    Browse the repository at this point in the history
  91. libbpf: Fix lookup_and_delete_elem_flags error reporting

    [ Upstream commit 64165dd ]
    
    Fix bpf_map_lookup_and_delete_elem_flags() to pass the return code through
    libbpf_err_errno() as we do similarly in bpf_map_lookup_and_delete_elem().
    
    Fixes: f12b654 ("libbpf: Streamline error reporting for low-level APIs")
    Signed-off-by: Mehrdad Arshad Rad <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Acked-by: Yonghong Song <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    mehrdadrad authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e13c754 View commit details
    Browse the repository at this point in the history
  92. selftests/bpf/xdp_redirect_multi: Put the logs to tmp folder

    [ Upstream commit 8b4ac13 ]
    
    The xdp_redirect_multi test logs are created in selftest folder and not cleaned
    after test. Let's creat a tmp dir and remove the logs after testing.
    
    Fixes: d232924 ("selftests/bpf: Add xdp_redirect_multi test")
    Suggested-by: Jiri Benc <[email protected]>
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    ddf4f38 View commit details
    Browse the repository at this point in the history
  93. selftests/bpf/xdp_redirect_multi: Use arping to accurate the arp number

    [ Upstream commit f53ea9d ]
    
    The arp request number triggered by ping none exist address is not accurate,
    which may lead the test false negative/positive. Change to use arping to
    accurate the arp number. Also do not use grep pattern match for dot.
    
    Fixes: d232924 ("selftests/bpf: Add xdp_redirect_multi test")
    Suggested-by: Jiri Benc <[email protected]>
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    00f9911 View commit details
    Browse the repository at this point in the history
  94. selftests/bpf/xdp_redirect_multi: Give tcpdump a chance to terminate …

    …cleanly
    
    [ Upstream commit 648c367 ]
    
    No need to kill tcpdump with -9.
    
    Fixes: d232924 ("selftests/bpf: Add xdp_redirect_multi test")
    Suggested-by: Jiri Benc <[email protected]>
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    a99e4d9 View commit details
    Browse the repository at this point in the history
  95. selftests/bpf/xdp_redirect_multi: Limit the tests in netns

    [ Upstream commit 8955c1a ]
    
    As I want to test both DEVMAP and DEVMAP_HASH in XDP multicast redirect, I
    limited DEVMAP max entries to a small value for performace. When the test
    runs after amount of interface creating/deleting tests. The interface index
    will exceed the map max entries and xdp_redirect_multi will error out with
    "Get interfacesInterface index to large".
    
    Fix this issue by limit the tests in netns and specify the ifindex when
    creating interfaces.
    
    Fixes: d232924 ("selftests/bpf: Add xdp_redirect_multi test")
    Reported-by: Jiri Benc <[email protected]>
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    39db3e5 View commit details
    Browse the repository at this point in the history
  96. drm: fb_helper: improve CONFIG_FB dependency

    [ Upstream commit 9d6366e ]
    
    My previous patch correctly addressed the possible link failure, but as
    Jani points out, the dependency is now stricter than it needs to be.
    
    Change it again, to allow DRM_FBDEV_EMULATION to be used when
    DRM_KMS_HELPER and FB are both loadable modules and DRM is linked into
    the kernel.
    
    As a side-effect, the option is now only visible when at least one DRM
    driver makes use of DRM_KMS_HELPER. This is better, because the option
    has no effect otherwise.
    
    Fixes: 606b102 ("drm: fb_helper: fix CONFIG_FB dependency")
    Suggested-by: Acked-by: Jani Nikula <[email protected]>
    Reviewed-by: Javier Martinez Canillas <[email protected]>
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Daniel Vetter <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    arndb authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    94e18f5 View commit details
    Browse the repository at this point in the history
  97. Revert "drm/imx: Annotate dma-fence critical section in commit path"

    [ Upstream commit 14d9a37 ]
    
    This reverts commit f4b34fa.
    
    Since commit f4b34fa ("drm/imx: Annotate dma-fence critical section in
    commit path") the following possible circular dependency is detected:
    
    [    5.001811] ======================================================
    [    5.001817] WARNING: possible circular locking dependency detected
    [    5.001824] 5.14.9-01225-g45da36cc6fcc-dirty #1 Tainted: G        W
    [    5.001833] ------------------------------------------------------
    [    5.001838] kworker/u8:0/7 is trying to acquire lock:
    [    5.001848] c1752080 (regulator_list_mutex){+.+.}-{3:3}, at: regulator_lock_dependent+0x40/0x294
    [    5.001903]
    [    5.001903] but task is already holding lock:
    [    5.001909] c176df78 (dma_fence_map){++++}-{0:0}, at: imx_drm_atomic_commit_tail+0x10/0x160
    [    5.001957]
    [    5.001957] which lock already depends on the new lock.
    ...
    
    Revert it for now.
    
    Tested on a imx6q-sabresd.
    
    Fixes: f4b34fa ("drm/imx: Annotate dma-fence critical section in commit path")
    Signed-off-by: Fabio Estevam <[email protected]>
    Signed-off-by: Daniel Vetter <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    fabioestevam authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    97308cd View commit details
    Browse the repository at this point in the history
  98. drm/amdgpu/powerplay: fix sysfs_emit/sysfs_emit_at handling

    [ Upstream commit e9c7671 ]
    
    sysfs_emit and sysfs_emit_at requrie a page boundary
    aligned buf address. Make them happy!
    
    v2: fix sysfs_emit -> sysfs_emit_at missed conversions
    
    Cc: Lang Yu <[email protected]>
    Cc: Darren Powell <[email protected]>
    Fixes: 6db0c87 ("amdgpu/pm: Replace hwmgr smu usage of sprintf with sysfs_emit")
    Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1774
    Reviewed-by: Lang Yu <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    alexdeucher authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    e16a1e4 View commit details
    Browse the repository at this point in the history
  99. can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path

    [ Upstream commit d9447f7 ]
    
    In es58x_rx_err_msg(), if can->do_set_mode() fails, the function
    directly returns without calling netif_rx(skb). This means that the
    skb previously allocated by alloc_can_err_skb() is not freed. In other
    terms, this is a memory leak.
    
    This patch simply removes the return statement in the error branch and
    let the function continue.
    
    Issue was found with GCC -fanalyzer, please follow the link below for
    details.
    
    Fixes: 8537257 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
    Link: https://lore.kernel.org/all/[email protected]
    Signed-off-by: Vincent Mailhol <[email protected]>
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    vincent-mailhol authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    7eb0881 View commit details
    Browse the repository at this point in the history
  100. can: mcp251xfd: mcp251xfd_chip_start(): fix error handling for mcp251…

    …xfd_chip_rx_int_enable()
    
    [ Upstream commit 69c55f6 ]
    
    This patch fixes the error handling for mcp251xfd_chip_rx_int_enable().
    Instead just returning the error, properly shut down the chip.
    
    Link: https://lore.kernel.org/all/[email protected]
    Fixes: 55e5b97 ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN")
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    marckleinebudde authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    1ba8ddd View commit details
    Browse the repository at this point in the history
  101. mm/zsmalloc.c: close race window between zs_pool_dec_isolated() and z…

    …s_unregister_migration()
    
    [ Upstream commit afe8605 ]
    
    There is one possible race window between zs_pool_dec_isolated() and
    zs_unregister_migration() because wait_for_isolated_drain() checks the
    isolated count without holding class->lock and there is no order inside
    zs_pool_dec_isolated().  Thus the below race window could be possible:
    
      zs_pool_dec_isolated		zs_unregister_migration
        check pool->destroying != 0
    				  pool->destroying = true;
    				  smp_mb();
    				  wait_for_isolated_drain()
    				    wait for pool->isolated_pages == 0
        atomic_long_dec(&pool->isolated_pages);
        atomic_long_read(&pool->isolated_pages) == 0
    
    Since we observe the pool->destroying (false) before atomic_long_dec()
    for pool->isolated_pages, waking pool->migration_wait up is missed.
    
    Fix this by ensure checking pool->destroying happens after the
    atomic_long_dec(&pool->isolated_pages).
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 701d678 ("mm/zsmalloc.c: fix race condition in zs_destroy_pool")
    Signed-off-by: Miaohe Lin <[email protected]>
    Cc: Minchan Kim <[email protected]>
    Cc: Sergey Senozhatsky <[email protected]>
    Cc: Henry Burns <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    MiaoheLin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3d6b113 View commit details
    Browse the repository at this point in the history
  102. zram: off by one in read_block_state()

    [ Upstream commit a88e03c ]
    
    snprintf() returns the number of bytes it would have printed if there
    were space.  But it does not count the NUL terminator.  So that means
    that if "count == copied" then this has already overflowed by one
    character.
    
    This bug likely isn't super harmful in real life.
    
    Link: https://lkml.kernel.org/r/20210916130404.GA25094@kili
    Fixes: c026534 ("zram: introduce zram memory tracking")
    Signed-off-by: Dan Carpenter <[email protected]>
    Cc: Minchan Kim <[email protected]>
    Cc: Sergey Senozhatsky <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dan Carpenter authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    18fdce8 View commit details
    Browse the repository at this point in the history
  103. perf bpf: Add missing free to bpf_event__print_bpf_prog_info()

    [ Upstream commit 88c42f4 ]
    
    If btf__new() is called then there needs to be a corresponding btf__free().
    
    Fixes: f8dfeae ("perf bpf: Show more BPF program info in print_bpf_prog_info()")
    Signed-off-by: Ian Rogers <[email protected]>
    Cc: Alexander Shishkin <[email protected]>
    Cc: Alexei Starovoitov <[email protected]>
    Cc: Andrii Nakryiko <[email protected]>
    Cc: Daniel Borkmann <[email protected]>
    Cc: Jiri Olsa <[email protected]>
    Cc: John Fastabend <[email protected]>
    Cc: KP Singh <[email protected]>
    Cc: Mark Rutland <[email protected]>
    Cc: Martin KaFai Lau <[email protected]>
    Cc: Namhyung Kim <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Song Liu <[email protected]>
    Cc: Stephane Eranian <[email protected]>
    Cc: Tiezhu Yang <[email protected]>
    Cc: Yonghong Song <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Link: http://lore.kernel.org/lkml/[email protected]
    Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    captain5050 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    63609f1 View commit details
    Browse the repository at this point in the history
  104. llc: fix out-of-bound array index in llc_sk_dev_hash()

    [ Upstream commit 8ac9dfd ]
    
    Both ifindex and LLC_SK_DEV_HASH_ENTRIES are signed.
    
    This means that (ifindex % LLC_SK_DEV_HASH_ENTRIES) is negative
    if @ifindex is negative.
    
    We could simply make LLC_SK_DEV_HASH_ENTRIES unsigned.
    
    In this patch I chose to use hash_32() to get more entropy
    from @ifindex, like llc_sk_laddr_hashfn().
    
    UBSAN: array-index-out-of-bounds in ./include/net/llc.h:75:26
    index -43 is out of range for type 'hlist_head [64]'
    CPU: 1 PID: 20999 Comm: syz-executor.3 Not tainted 5.15.0-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    Call Trace:
     <TASK>
     __dump_stack lib/dump_stack.c:88 [inline]
     dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
     ubsan_epilogue+0xb/0x5a lib/ubsan.c:151
     __ubsan_handle_out_of_bounds.cold+0x62/0x6c lib/ubsan.c:291
     llc_sk_dev_hash include/net/llc.h:75 [inline]
     llc_sap_add_socket+0x49c/0x520 net/llc/llc_conn.c:697
     llc_ui_bind+0x680/0xd70 net/llc/af_llc.c:404
     __sys_bind+0x1e9/0x250 net/socket.c:1693
     __do_sys_bind net/socket.c:1704 [inline]
     __se_sys_bind net/socket.c:1702 [inline]
     __x64_sys_bind+0x6f/0xb0 net/socket.c:1702
     do_syscall_x64 arch/x86/entry/common.c:50 [inline]
     do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
     entry_SYSCALL_64_after_hwframe+0x44/0xae
    RIP: 0033:0x7fa503407ae9
    
    Fixes: 6d2e3ea ("llc: use a device based hash table to speed up multicast delivery")
    Signed-off-by: Eric Dumazet <[email protected]>
    Reported-by: syzbot <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Eric Dumazet authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    72fb40d View commit details
    Browse the repository at this point in the history
  105. nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails

    [ Upstream commit 9fec40f ]
    
    skb is already freed by dev_kfree_skb in pn533_fill_fragment_skbs,
    but follow error handler branch when pn533_fill_fragment_skbs()
    fails, skb is freed again, results in double free issue. Fix this
    by not free skb in error path of pn533_fill_fragment_skbs.
    
    Fixes: 963a82e ("NFC: pn533: Split large Tx frames in chunks")
    Fixes: 93ad420 ("NFC: pn533: Target mode Tx fragmentation support")
    Signed-off-by: Chengfeng Ye <[email protected]>
    Reviewed-by: Dan Carpenter <[email protected]>
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ychame authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    2d2dfc3 View commit details
    Browse the repository at this point in the history
  106. litex_liteeth: Fix a double free in the remove function

    [ Upstream commit c45231a ]
    
    'netdev' is a managed resource allocated in the probe using
    'devm_alloc_etherdev()'.
    It must not be freed explicitly in the remove function.
    
    Fixes: ee7da21 ("net: Add driver for LiteX's LiteETH network interface")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tititiou36 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    2d57d52 View commit details
    Browse the repository at this point in the history
  107. arm64: arm64_ftr_reg->name may not be a human-readable string

    [ Upstream commit 9dc232a ]
    
    The id argument of ARM64_FTR_REG_OVERRIDE() is used for two purposes:
    one as the system register encoding (used for the sys_id field of
    __ftr_reg_entry), and the other as the register name (stringified
    and used for the name field of arm64_ftr_reg), which is debug
    information. The id argument is supposed to be a macro that
    indicates an encoding of the register (eg. SYS_ID_AA64PFR0_EL1, etc).
    
    ARM64_FTR_REG(), which also has the same id argument,
    uses ARM64_FTR_REG_OVERRIDE() and passes the id to the macro.
    Since the id argument is completely macro-expanded before it is
    substituted into a macro body of ARM64_FTR_REG_OVERRIDE(),
    the stringified id in the body of ARM64_FTR_REG_OVERRIDE is not
    a human-readable register name, but a string of numeric bitwise
    operations.
    
    Fix this so that human-readable register names are available as
    debug information.
    
    Fixes: 8f266a5 ("arm64: cpufeature: Add global feature override facility")
    Signed-off-by: Reiji Watanabe <[email protected]>
    Reviewed-by: Oliver Upton <[email protected]>
    Acked-by: Marc Zyngier <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Will Deacon <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    reijiw-kvm authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f828915 View commit details
    Browse the repository at this point in the history
  108. arm64: pgtable: make __pte_to_phys/__phys_to_pte_val inline functions

    [ Upstream commit c7c386f ]
    
    gcc warns about undefined behavior the vmalloc code when building
    with CONFIG_ARM64_PA_BITS_52, when the 'idx++' in the argument to
    __phys_to_pte_val() is evaluated twice:
    
    mm/vmalloc.c: In function 'vmap_pfn_apply':
    mm/vmalloc.c:2800:58: error: operation on 'data->idx' may be undefined [-Werror=sequence-point]
     2800 |         *pte = pte_mkspecial(pfn_pte(data->pfns[data->idx++], data->prot));
          |                                                 ~~~~~~~~~^~
    arch/arm64/include/asm/pgtable-types.h:25:37: note: in definition of macro '__pte'
       25 | #define __pte(x)        ((pte_t) { (x) } )
          |                                     ^
    arch/arm64/include/asm/pgtable.h:80:15: note: in expansion of macro '__phys_to_pte_val'
       80 |         __pte(__phys_to_pte_val((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))
          |               ^~~~~~~~~~~~~~~~~
    mm/vmalloc.c:2800:30: note: in expansion of macro 'pfn_pte'
     2800 |         *pte = pte_mkspecial(pfn_pte(data->pfns[data->idx++], data->prot));
          |                              ^~~~~~~
    
    I have no idea why this never showed up earlier, but the safest
    workaround appears to be changing those macros into inline functions
    so the arguments get evaluated only once.
    
    Cc: Matthew Wilcox <[email protected]>
    Fixes: 75387b9 ("arm64: handle 52-bit physical addresses in page table entries")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Will Deacon <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    arndb authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    b90d961 View commit details
    Browse the repository at this point in the history
  109. bpf, sockmap: Remove unhash handler for BPF sockmap usage

    [ Upstream commit b8b8315 ]
    
    We do not need to handle unhash from BPF side we can simply wait for the
    close to happen. The original concern was a socket could transition from
    ESTABLISHED state to a new state while the BPF hook was still attached.
    But, we convinced ourself this is no longer possible and we also improved
    BPF sockmap to handle listen sockets so this is no longer a problem.
    
    More importantly though there are cases where unhash is called when data is
    in the receive queue. The BPF unhash logic will flush this data which is
    wrong. To be correct it should keep the data in the receive queue and allow
    a receiving application to continue reading the data. This may happen when
    tcp_abort() is received for example. Instead of complicating the logic in
    unhash simply moving all this to tcp_close() hook solves this.
    
    Fixes: 5119940 ("bpf: skb_verdict, support SK_PASS on RX BPF path")
    Signed-off-by: John Fastabend <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Tested-by: Jussi Maki <[email protected]>
    Reviewed-by: Jakub Sitnicki <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    jrfastab authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    41c65a3 View commit details
    Browse the repository at this point in the history
  110. bpf, sockmap: Fix race in ingress receive verdict with redirect to self

    [ Upstream commit c5d2177 ]
    
    A socket in a sockmap may have different combinations of programs attached
    depending on configuration. There can be no programs in which case the socket
    acts as a sink only. There can be a TX program in this case a BPF program is
    attached to sending side, but no RX program is attached. There can be an RX
    program only where sends have no BPF program attached, but receives are hooked
    with BPF. And finally, both TX and RX programs may be attached. Giving us the
    permutations:
    
     None, Tx, Rx, and TxRx
    
    To date most of our use cases have been TX case being used as a fast datapath
    to directly copy between local application and a userspace proxy. Or Rx cases
    and TxRX applications that are operating an in kernel based proxy. The traffic
    in the first case where we hook applications into a userspace application looks
    like this:
    
      AppA  redirect   AppB
       Tx <-----------> Rx
       |                |
       +                +
       TCP <--> lo <--> TCP
    
    In this case all traffic from AppA (after 3whs) is copied into the AppB
    ingress queue and no traffic is ever on the TCP recieive_queue.
    
    In the second case the application never receives, except in some rare error
    cases, traffic on the actual user space socket. Instead the send happens in
    the kernel.
    
               AppProxy       socket pool
           sk0 ------------->{sk1,sk2, skn}
            ^                      |
            |                      |
            |                      v
           ingress              lb egress
           TCP                  TCP
    
    Here because traffic is never read off the socket with userspace recv() APIs
    there is only ever one reader on the sk receive_queue. Namely the BPF programs.
    
    However, we've started to introduce a third configuration where the BPF program
    on receive should process the data, but then the normal case is to push the
    data into the receive queue of AppB.
    
           AppB
           recv()                (userspace)
         -----------------------
           tcp_bpf_recvmsg()     (kernel)
             |             |
             |             |
             |             |
           ingress_msgQ    |
             |             |
           RX_BPF          |
             |             |
             v             v
           sk->receive_queue
    
    This is different from the App{A,B} redirect because traffic is first received
    on the sk->receive_queue.
    
    Now for the issue. The tcp_bpf_recvmsg() handler first checks the ingress_msg
    queue for any data handled by the BPF rx program and returned with PASS code
    so that it was enqueued on the ingress msg queue. Then if no data exists on
    that queue it checks the socket receive queue. Unfortunately, this is the same
    receive_queue the BPF program is reading data off of. So we get a race. Its
    possible for the recvmsg() hook to pull data off the receive_queue before the
    BPF hook has a chance to read it. It typically happens when an application is
    banging on recv() and getting EAGAINs. Until they manage to race with the RX
    BPF program.
    
    To fix this we note that before this patch at attach time when the socket is
    loaded into the map we check if it needs a TX program or just the base set of
    proto bpf hooks. Then it uses the above general RX hook regardless of if we
    have a BPF program attached at rx or not. This patch now extends this check to
    handle all cases enumerated above, TX, RX, TXRX, and none. And to fix above
    race when an RX program is attached we use a new hook that is nearly identical
    to the old one except now we do not let the recv() call skip the RX BPF program.
    Now only the BPF program pulls data from sk->receive_queue and recv() only
    pulls data from the ingress msgQ post BPF program handling.
    
    With this resolved our AppB from above has been up and running for many hours
    without detecting any errors. We do this by correlating counters in RX BPF
    events and the AppB to ensure data is never skipping the BPF program. Selftests,
    was not able to detect this because we only run them for a short period of time
    on well ordered send/recvs so we don't get any of the noise we see in real
    application environments.
    
    Fixes: 5119940 ("bpf: skb_verdict, support SK_PASS on RX BPF path")
    Signed-off-by: John Fastabend <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Tested-by: Jussi Maki <[email protected]>
    Reviewed-by: Jakub Sitnicki <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    jrfastab authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    c5cc0d2 View commit details
    Browse the repository at this point in the history
  111. bpf: sockmap, strparser, and tls are reusing qdisc_skb_cb and colliding

    [ Upstream commit e0dc3b9 ]
    
    Strparser is reusing the qdisc_skb_cb struct to stash the skb message handling
    progress, e.g. offset and length of the skb. First this is poorly named and
    inherits a struct from qdisc that doesn't reflect the actual usage of cb[] at
    this layer.
    
    But, more importantly strparser is using the following to access its metadata.
    
      (struct _strp_msg *)((void *)skb->cb + offsetof(struct qdisc_skb_cb, data))
    
    Where _strp_msg is defined as:
    
      struct _strp_msg {
            struct strp_msg            strp;                 /*     0     8 */
            int                        accum_len;            /*     8     4 */
    
            /* size: 12, cachelines: 1, members: 2 */
            /* last cacheline: 12 bytes */
      };
    
    So we use 12 bytes of ->data[] in struct. However in BPF code running parser
    and verdict the user has read capabilities into the data[] array as well. Its
    not too problematic, but we should not be exposing internal state to BPF
    program. If its really needed then we can use the probe_read() APIs which allow
    reading kernel memory. And I don't believe cb[] layer poses any API breakage by
    moving this around because programs can't depend on cb[] across layers.
    
    In order to fix another issue with a ctx rewrite we need to stash a temp
    variable somewhere. To make this work cleanly this patch builds a cb struct
    for sk_skb types called sk_skb_cb struct. Then we can use this consistently
    in the strparser, sockmap space. Additionally we can start allowing ->cb[]
    write access after this.
    
    Fixes: 604326b ("bpf, sockmap: convert to generic sk_msg interface")
    Signed-off-by: John Fastabend <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Tested-by: Jussi Maki <[email protected]>
    Reviewed-by: Jakub Sitnicki <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    jrfastab authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    1a8dba0 View commit details
    Browse the repository at this point in the history
  112. bpf, sockmap: sk_skb data_end access incorrect when src_reg = dst_reg

    [ Upstream commit b2c4618 ]
    
    The current conversion of skb->data_end reads like this:
    
      ; data_end = (void*)(long)skb->data_end;
       559: (79) r1 = *(u64 *)(r2 +200)   ; r1  = skb->data
       560: (61) r11 = *(u32 *)(r2 +112)  ; r11 = skb->len
       561: (0f) r1 += r11
       562: (61) r11 = *(u32 *)(r2 +116)
       563: (1f) r1 -= r11
    
    But similar to the case in 84f44df ("bpf: sock_ops sk access may stomp
    registers when dst_reg = src_reg"), the code will read an incorrect skb->len
    when src == dst. In this case we end up generating this xlated code:
    
      ; data_end = (void*)(long)skb->data_end;
       559: (79) r1 = *(u64 *)(r1 +200)   ; r1  = skb->data
       560: (61) r11 = *(u32 *)(r1 +112)  ; r11 = (skb->data)->len
       561: (0f) r1 += r11
       562: (61) r11 = *(u32 *)(r1 +116)
       563: (1f) r1 -= r11
    
    ... where line 560 is the reading 4B of (skb->data + 112) instead of the
    intended skb->len Here the skb pointer in r1 gets set to skb->data and the
    later deref for skb->len ends up following skb->data instead of skb.
    
    This fixes the issue similarly to the patch mentioned above by creating an
    additional temporary variable and using to store the register when dst_reg =
    src_reg. We name the variable bpf_temp_reg and place it in the cb context for
    sk_skb. Then we restore from the temp to ensure nothing is lost.
    
    Fixes: 16137b0 ("bpf: Compute data_end dynamically with JIT code")
    Signed-off-by: Jussi Maki <[email protected]>
    Signed-off-by: John Fastabend <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Reviewed-by: Jakub Sitnicki <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    joamaki authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    0bff34d View commit details
    Browse the repository at this point in the history
  113. dmaengine: stm32-dma: fix burst in case of unaligned memory address

    [ Upstream commit af229d2 ]
    
    Theorically, address pointers used by STM32 DMA must be chosen so as to
    ensure that all transfers within a burst block are aligned on the address
    boundary equal to the size of the transfer.
    If this is always the case for peripheral addresses on STM32, it is not for
    memory addresses if the user doesn't respect this alignment constraint.
    To avoid a weird behavior of the DMA controller in this case (no error
    triggered but data are not transferred as expected), force no burst.
    
    Signed-off-by: Amelie Delaunay <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ADESTM authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    4ee1ac7 View commit details
    Browse the repository at this point in the history
  114. dmaengine: stm32-dma: avoid 64-bit division in stm32_dma_get_max_width

    [ Upstream commit 2498363 ]
    
    Using the % operator on a 64-bit variable is expensive and can
    cause a link failure:
    
    arm-linux-gnueabi-ld: drivers/dma/stm32-dma.o: in function `stm32_dma_get_max_width':
    stm32-dma.c:(.text+0x170): undefined reference to `__aeabi_uldivmod'
    arm-linux-gnueabi-ld: drivers/dma/stm32-dma.o: in function `stm32_dma_set_xfer_param':
    stm32-dma.c:(.text+0x1cd4): undefined reference to `__aeabi_uldivmod'
    
    As we know that we just want to check the alignment in
    stm32_dma_get_max_width(), there is no need for a full division, and
    using a simple mask is a faster replacement.
    
    Same in stm32_dma_set_xfer_param(), change this to only allow burst
    transfers if the address is a multiple of the length.
    stm32_dma_get_best_burst just after will take buf_len into account to fix
    burst in case of misalignment.
    
    Fixes: b20fd5f ("dmaengine: stm32-dma: fix stm32_dma_get_max_width")
    Reported-by: kernel test robot <[email protected]>
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Amelie Delaunay <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    arndb authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    0bf8323 View commit details
    Browse the repository at this point in the history
  115. gve: Fix off by one in gve_tx_timeout()

    [ Upstream commit 1c360cc ]
    
    The priv->ntfy_blocks[] has "priv->num_ntfy_blks" elements so this >
    needs to be >= to prevent an off by one bug.  The priv->ntfy_blocks[]
    array is allocated in gve_alloc_notify_blocks().
    
    Fixes: 87a7f32 ("gve: Recover from queue stall due to missed IRQ")
    Signed-off-by: Dan Carpenter <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dan Carpenter authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    fea0b95 View commit details
    Browse the repository at this point in the history
  116. drm/i915/fb: Fix rounding error in subsampled plane size calculation

    [ Upstream commit 90ab96f ]
    
    For NV12 FBs with odd main surface tile-row height the CCS surface
    height was incorrectly calculated 1 less than the actual value. Fix this
    by rounding up the result of divison. For consistency do the same for
    the CCS surface width calculation.
    
    Fixes: b3e57bc ("drm/i915/tgl: Gen-12 render decompression")
    Signed-off-by: Imre Deak <[email protected]>
    Reviewed-by: Juha-Pekka Heikkila <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 2ee5ef9)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ideak authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    2cf82ea View commit details
    Browse the repository at this point in the history
  117. init: make unknown command line param message clearer

    [ Upstream commit 8bc2b3d ]
    
    The prior message is confusing users, which is the exact opposite of the
    goal.  If the message is being seen, one of the following situations is
    happening:
    
     1. the param is misspelled
     2. the param is not valid due to the kernel configuration
     3. the param is intended for init but isn't after the '--'
        delineator on the command line
    
    To make that more clear to the user, explicitly mention "kernel command
    line" and also note that the params are still passed to user space to
    avoid causing any alarm over params intended for init.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 86d1919 ("init: print out unknown kernel parameters")
    Signed-off-by: Andrew Halaney <[email protected]>
    Suggested-by: Steven Rostedt (VMware) <[email protected]>
    Acked-by: Randy Dunlap <[email protected]>
    Cc: Borislav Petkov <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ahalaney authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    acdc506 View commit details
    Browse the repository at this point in the history
  118. seq_file: fix passing wrong private data

    [ Upstream commit 10a6de1 ]
    
    DEFINE_PROC_SHOW_ATTRIBUTE() is supposed to be used to define a series
    of functions and variables to register proc file easily. And the users
    can use proc_create_data() to pass their own private data and get it
    via seq->private in the callback. Unfortunately, the proc file system
    use PDE_DATA() to get private data instead of inode->i_private. So fix
    it. Fortunately, there only one user of it which does not pass any
    private data, so this bug does not break any in-tree codes.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 97a3253 ("proc: convert everything to "struct proc_ops"")
    Signed-off-by: Muchun Song <[email protected]>
    Cc: Andy Shevchenko <[email protected]>
    Cc: Stephen Rothwell <[email protected]>
    Cc: Florent Revest <[email protected]>
    Cc: Alexey Dobriyan <[email protected]>
    Cc: Christian Brauner <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Muchun Song authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f00e054 View commit details
    Browse the repository at this point in the history
  119. drm/amdgpu: fix uvd crash on Polaris12 during driver unloading

    [ Upstream commit 4fc30ea ]
    
    There was a change(below) target for such issue:
    d82e2c2 ("drm/amdgpu: Fix crash on device remove/driver unload")
    But the fix for VI ASICs was missing there. This is a supplement for
    that.
    
    Fixes: d82e2c2 ("drm/amdgpu: Fix crash on device remove/driver unload")
    
    Signed-off-by: Evan Quan <[email protected]>
    Acked-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Evan Quan authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f17e9e8 View commit details
    Browse the repository at this point in the history
  120. net: dsa: mv88e6xxx: Don't support >1G speeds on 6191X on ports other…

    … than 10
    
    [ Upstream commit dc2fc9f ]
    
    Model 88E6191X only supports >1G speeds on port 10. Port 0 and 9 are
    only 1G.
    
    Fixes: de776d0 ("net: dsa: mv88e6xxx: add support for mv88e6393x family")
    Signed-off-by: Marek Behún <[email protected]>
    Cc: Russell King (Oracle) <[email protected]>
    Reviewed-by: Andrew Lunn <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    elkablo authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    422fb87 View commit details
    Browse the repository at this point in the history
  121. net/sched: sch_taprio: fix undefined behavior in ktime_mono_to_any

    [ Upstream commit 6dc2540 ]
    
    1) if q->tk_offset == TK_OFFS_MAX, then get_tcp_tstamp() calls
       ktime_mono_to_any() with out-of-bound value.
    
    2) if q->tk_offset is changed in taprio_parse_clockid(),
       taprio_get_time() might also call ktime_mono_to_any()
       with out-of-bound value as sysbot found:
    
    UBSAN: array-index-out-of-bounds in kernel/time/timekeeping.c:908:27
    index 3 is out of range for type 'ktime_t *[3]'
    CPU: 1 PID: 25668 Comm: kworker/u4:0 Not tainted 5.15.0-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    Workqueue: bat_events batadv_iv_send_outstanding_bat_ogm_packet
    Call Trace:
     <TASK>
     __dump_stack lib/dump_stack.c:88 [inline]
     dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
     ubsan_epilogue+0xb/0x5a lib/ubsan.c:151
     __ubsan_handle_out_of_bounds.cold+0x62/0x6c lib/ubsan.c:291
     ktime_mono_to_any+0x1d4/0x1e0 kernel/time/timekeeping.c:908
     get_tcp_tstamp net/sched/sch_taprio.c:322 [inline]
     get_packet_txtime net/sched/sch_taprio.c:353 [inline]
     taprio_enqueue_one+0x5b0/0x1460 net/sched/sch_taprio.c:420
     taprio_enqueue+0x3b1/0x730 net/sched/sch_taprio.c:485
     dev_qdisc_enqueue+0x40/0x300 net/core/dev.c:3785
     __dev_xmit_skb net/core/dev.c:3869 [inline]
     __dev_queue_xmit+0x1f6e/0x3630 net/core/dev.c:4194
     batadv_send_skb_packet+0x4a9/0x5f0 net/batman-adv/send.c:108
     batadv_iv_ogm_send_to_if net/batman-adv/bat_iv_ogm.c:393 [inline]
     batadv_iv_ogm_emit net/batman-adv/bat_iv_ogm.c:421 [inline]
     batadv_iv_send_outstanding_bat_ogm_packet+0x6d7/0x8e0 net/batman-adv/bat_iv_ogm.c:1701
     process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
     worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
     kthread+0x405/0x4f0 kernel/kthread.c:327
     ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
    
    Fixes: 7ede7b0 ("taprio: make clock reference conversions easier")
    Fixes: 5400206 ("taprio: Adjust timestamps for TCP packets")
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Vedang Patel <[email protected]>
    Reported-by: syzbot <[email protected]>
    Reviewed-by: Vinicius Costa Gomes <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Eric Dumazet authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3e13ce8 View commit details
    Browse the repository at this point in the history
  122. net: hns3: fix ROCE base interrupt vector initialization bug

    [ Upstream commit beb27ca ]
    
    Currently, NIC init ROCE interrupt vector with MSIX interrupt. But ROCE use
    pci_irq_vector() to get interrupt vector, which adds the relative interrupt
    vector again and gets wrong interrupt vector.
    
    So fixes it by assign relative interrupt vector to ROCE instead of MSIX
    interrupt vector and delete the unused struct member base_msi_vector
    declaration of hclgevf_dev.
    
    Fixes: 46a3df9 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
    Signed-off-by: Jie Wang <[email protected]>
    Signed-off-by: Guangbin Huang <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jie Wang authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    bcbee7c View commit details
    Browse the repository at this point in the history
  123. net: hns3: fix pfc packet number incorrect after querying pfc parameters

    [ Upstream commit 0b653a8 ]
    
    Currently, driver will send command to firmware to query pfc packet number
    when user uses dcb tool to get pfc parameters. However, the periodic
    service task will also periodically query and record MAC statistics,
    including pfc packet number.
    
    As the hardware registers of statistics is cleared after reading, it will
    cause pfc packet number of MAC statistics are not correct after using dcb
    tool to get pfc parameters.
    
    To fix this problem, when user uses dcb tool to get pfc parameters, driver
    updates MAC statistics firstly and then get pfc packet number from MAC
    statistics.
    
    Fixes: 64fd230 ("net: hns3: add support for querying pfc puase packets statistic")
    Signed-off-by: Jie Wang <[email protected]>
    Signed-off-by: Guangbin Huang <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jie Wang authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5c05136 View commit details
    Browse the repository at this point in the history
  124. net: hns3: fix kernel crash when unload VF while it is being reset

    [ Upstream commit e140c79 ]
    
    When fully configure VLANs for a VF, then unload the VF while
    triggering a reset to PF, will cause a kernel crash because the
    irq is already uninit.
    
    [ 293.177579] ------------[ cut here ]------------
    [ 293.183502] kernel BUG at drivers/pci/msi.c:352!
    [ 293.189547] Internal error: Oops - BUG: 0 [#1] SMP
    ......
    [ 293.390124] Workqueue: hclgevf hclgevf_service_task [hclgevf]
    [ 293.402627] pstate: 80c00009 (Nzcv daif +PAN +UAO)
    [ 293.414324] pc : free_msi_irqs+0x19c/0x1b8
    [ 293.425429] lr : free_msi_irqs+0x18c/0x1b8
    [ 293.436545] sp : ffff00002716fbb0
    [ 293.446950] x29: ffff00002716fbb0 x28: 0000000000000000
    [ 293.459519] x27: 0000000000000000 x26: ffff45b91ea16b00
    [ 293.472183] x25: 0000000000000000 x24: ffffa587b08f4700
    [ 293.484717] x23: ffffc591ac30e000 x22: ffffa587b08f8428
    [ 293.497190] x21: ffffc591ac30e300 x20: 0000000000000000
    [ 293.509594] x19: ffffa58a062a8300 x18: 0000000000000000
    [ 293.521949] x17: 0000000000000000 x16: ffff45b91dcc3f48
    [ 293.534013] x15: 0000000000000000 x14: 0000000000000000
    [ 293.545883] x13: 0000000000000040 x12: 0000000000000228
    [ 293.557508] x11: 0000000000000020 x10: 0000000000000040
    [ 293.568889] x9 : ffff45b91ea1e190 x8 : ffffc591802d0000
    [ 293.580123] x7 : ffffc591802d0148 x6 : 0000000000000120
    [ 293.591190] x5 : ffffc591802d0000 x4 : 0000000000000000
    [ 293.602015] x3 : 0000000000000000 x2 : 0000000000000000
    [ 293.612624] x1 : 00000000000004a4 x0 : ffffa58a1e0c6b80
    [ 293.623028] Call trace:
    [ 293.630340] free_msi_irqs+0x19c/0x1b8
    [ 293.638849] pci_disable_msix+0x118/0x140
    [ 293.647452] pci_free_irq_vectors+0x20/0x38
    [ 293.656081] hclgevf_uninit_msi+0x44/0x58 [hclgevf]
    [ 293.665309] hclgevf_reset_rebuild+0x1ac/0x2e0 [hclgevf]
    [ 293.674866] hclgevf_reset+0x358/0x400 [hclgevf]
    [ 293.683545] hclgevf_reset_service_task+0xd0/0x1b0 [hclgevf]
    [ 293.693325] hclgevf_service_task+0x4c/0x2e8 [hclgevf]
    [ 293.702307] process_one_work+0x1b0/0x448
    [ 293.710034] worker_thread+0x54/0x468
    [ 293.717331] kthread+0x134/0x138
    [ 293.724114] ret_from_fork+0x10/0x18
    [ 293.731324] Code: f940b000 b4ffff00 a903e7b8 f90017b6 (d4210000)
    
    This patch fixes the problem by waiting for the VF reset done
    while unloading the VF.
    
    Fixes: e2cb1de ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
    Signed-off-by: Yufeng Mo <[email protected]>
    Signed-off-by: Guangbin Huang <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yufeng Mo authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3d3f131 View commit details
    Browse the repository at this point in the history
  125. net: hns3: allow configure ETS bandwidth of all TCs

    [ Upstream commit 688db0c ]
    
    Currently, driver only allow configuring ETS bandwidth of TCs according
    to the max TC number queried from firmware. However, the hardware actually
    supports 8 TCs and users may need to configure ETS bandwidth of all TCs,
    so remove the restriction.
    
    Fixes: 330baff ("net: hns3: add ETS TC weight setting in SSU module")
    Signed-off-by: Guangbin Huang <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Guangbin Huang authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    cb85093 View commit details
    Browse the repository at this point in the history
  126. net: stmmac: allow a tc-taprio base-time of zero

    [ Upstream commit f64ab8e ]
    
    Commit fe28c53 ("net: stmmac: fix taprio configuration when
    base_time is in the past") allowed some base time values in the past,
    but apparently not all, the base-time value of 0 (Jan 1st 1970) is still
    explicitly denied by the driver.
    
    Remove the bogus check.
    
    Fixes: b60189e ("net: stmmac: Integrate EST with TAPRIO scheduler API")
    Signed-off-by: Vladimir Oltean <[email protected]>
    Reviewed-by: Kurt Kanzenbach <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    vladimiroltean authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    0c8ee89 View commit details
    Browse the repository at this point in the history
  127. net: ethernet: ti: cpsw_ale: Fix access to un-initialized memory

    [ Upstream commit 7a16685 ]
    
    It is spurious to allocate a bitmap without initializing it.
    So, better safe than sorry, initialize it to 0 at least to have some known
    values.
    
    While at it, switch to the devm_bitmap_ API which is less verbose.
    
    Fixes: 4b41d34 ("net: ethernet: ti: cpsw: allow untagged traffic on host port")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tititiou36 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6fb190f View commit details
    Browse the repository at this point in the history
  128. net: marvell: mvpp2: Fix wrong SerDes reconfiguration order

    [ Upstream commit bb7bbb6 ]
    
    Commit bfe301e ("net: mvpp2: convert to use
    mac_prepare()/mac_finish()") introduced a bug wherein it leaves the MAC
    RESET register asserted after mac_finish(), due to wrong order of
    function calls.
    
    Before it was:
      .mac_config()
        mvpp22_mode_reconfigure()
          assert reset
        mvpp2_xlg_config()
          deassert reset
    
    Now it is:
      .mac_prepare()
      .mac_config()
        mvpp2_xlg_config()
          deassert reset
      .mac_finish()
        mvpp2_xlg_config()
          assert reset
    
    Obviously this is wrong.
    
    This bug is triggered when phylink tries to change the PHY interface
    mode from a GMAC mode (sgmii, 1000base-x, 2500base-x) to XLG mode
    (10gbase-r, xaui). The XLG mode does not work since reset is left
    asserted. Only after
      ifconfig down && ifconfig up
    is called will the XLG mode work.
    
    Move the call to mvpp22_mode_reconfigure() to .mac_prepare()
    implementation. Since some of the subsequent functions need to know
    whether the interface is being changed, we unfortunately also need to
    pass around the new interface mode before setting port->phy_interface.
    
    Fixes: bfe301e ("net: mvpp2: convert to use mac_prepare()/mac_finish()")
    Signed-off-by: Marek Behún <[email protected]>
    Signed-off-by: Russell King (Oracle) <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    elkablo authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    c8234e6 View commit details
    Browse the repository at this point in the history
  129. vsock: prevent unnecessary refcnt inc for nonblocking connect

    [ Upstream commit c7cd82b ]
    
    Currently vosck_connect() increments sock refcount for nonblocking
    socket each time it's called, which can lead to memory leak if
    it's called multiple times because connect timeout function decrements
    sock refcount only once.
    
    Fixes it by making vsock_connect() return -EALREADY immediately when
    sock state is already SS_CONNECTING.
    
    Fixes: d021c34 ("VSOCK: Introduce VM Sockets")
    Reviewed-by: Stefano Garzarella <[email protected]>
    Signed-off-by: Eiichi Tsukata <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Etsukata authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    2440482 View commit details
    Browse the repository at this point in the history
  130. net/smc: fix sk_refcnt underflow on linkdown and fallback

    [ Upstream commit e5d5aad ]
    
    We got the following WARNING when running ab/nginx
    test with RDMA link flapping (up-down-up).
    The reason is when smc_sock fallback and at linkdown
    happens simultaneously, we may got the following situation:
    
    __smc_lgr_terminate()
     --> smc_conn_kill()
        --> smc_close_active_abort()
               smc_sock->sk_state = SMC_CLOSED
               sock_put(smc_sock)
    
    smc_sock was set to SMC_CLOSED and sock_put() been called
    when terminate the link group. But later application call
    close() on the socket, then we got:
    
    __smc_release():
        if (smc_sock->fallback)
            smc_sock->sk_state = SMC_CLOSED
            sock_put(smc_sock)
    
    Again we set the smc_sock to CLOSED through it's already
    in CLOSED state, and double put the refcnt, so the following
    warning happens:
    
    refcount_t: underflow; use-after-free.
    WARNING: CPU: 5 PID: 860 at lib/refcount.c:28 refcount_warn_saturate+0x8d/0xf0
    Modules linked in:
    CPU: 5 PID: 860 Comm: nginx Not tainted 5.10.46+ torvalds#403
    Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 8c24b4c 04/01/2014
    RIP: 0010:refcount_warn_saturate+0x8d/0xf0
    Code: 05 5c 1e b5 01 01 e8 52 25 bc ff 0f 0b c3 80 3d 4f 1e b5 01 00 75 ad 48
    
    RSP: 0018:ffffc90000527e50 EFLAGS: 00010286
    RAX: 0000000000000026 RBX: ffff8881300df2c0 RCX: 0000000000000027
    RDX: 0000000000000000 RSI: ffff88813bd58040 RDI: ffff88813bd58048
    RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000001
    R10: ffff8881300df2c0 R11: ffffc90000527c78 R12: ffff8881300df340
    R13: ffff8881300df930 R14: ffff88810b3dad80 R15: ffff8881300df4f8
    FS:  00007f739de8fb80(0000) GS:ffff88813bd40000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 000000000a01b008 CR3: 0000000111b64003 CR4: 00000000003706e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     smc_release+0x353/0x3f0
     __sock_release+0x3d/0xb0
     sock_close+0x11/0x20
     __fput+0x93/0x230
     task_work_run+0x65/0xa0
     exit_to_user_mode_prepare+0xf9/0x100
     syscall_exit_to_user_mode+0x27/0x190
     entry_SYSCALL_64_after_hwframe+0x44/0xa9
    
    This patch adds check in __smc_release() to make
    sure we won't do an extra sock_put() and set the
    socket to CLOSED when its already in CLOSED state.
    
    Fixes: 51f1de7 (net/smc: replace sock_put worker by socket refcounting)
    Signed-off-by: Dust Li <[email protected]>
    Reviewed-by: Tony Lu <[email protected]>
    Signed-off-by: Dust Li <[email protected]>
    Acked-by: Karsten Graul <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dust Li authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    ed8b735 View commit details
    Browse the repository at this point in the history
  131. cxgb4: fix eeprom len when diagnostics not implemented

    [ Upstream commit 4ca110b ]
    
    Ensure diagnostics monitoring support is implemented for the SFF 8472
    compliant port module and set the correct length for ethtool port
    module eeprom read.
    
    Fixes: f56ec67 ("cxgb4: Add support for ethtool i2c dump")
    Signed-off-by: Manoj Malviya <[email protected]>
    Signed-off-by: Rahul Lakkireddy <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    chelsiocudbg authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3ce70c3 View commit details
    Browse the repository at this point in the history
  132. selftests/net: udpgso_bench_rx: fix port argument

    [ Upstream commit d336509 ]
    
    The below commit added optional support for passing a bind address.
    It configures the sockaddr bind arguments before parsing options and
    reconfigures on options -b and -4.
    
    This broke support for passing port (-p) on its own.
    
    Configure sockaddr after parsing all arguments.
    
    Fixes: 3327a9c ("selftests: add functionals test for UDP GRO")
    Reported-by: Eric Dumazet <[email protected]>
    Signed-off-by: Willem de Bruijn <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    wdebruij authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    2cc4450 View commit details
    Browse the repository at this point in the history
  133. thermal: int340x: fix build on 32-bit targets

    [ Upstream commit d9c8e52 ]
    
    Commit aeb58c8 ("thermal/drivers/int340x: processor_thermal: Suppot
    64 bit RFIM responses") started using 'readq()' to read 64-bit status
    responses from the int340x hardware.
    
    That's all fine and good, but on 32-bit targets a 64-bit 'readq()' is
    ambiguous, since it's no longer an atomic access.  Some hardware might
    require 64-bit accesses, and other hardware might want low word first or
    high word first.
    
    It's quite likely that the driver isn't relevant in a 32-bit environment
    any more, and there's a patch floating around to just make it depend on
    X86_64, but let's make it buildable on x86-32 anyway.
    
    The driver previously just read the low 32 bits, so the hardware
    certainly is ok with 32-bit reads, and in a little-endian environment
    the low word first model is the natural one.
    
    So just add the include for the 'io-64-nonatomic-lo-hi.h' version.
    
    Fixes: aeb58c8 ("thermal/drivers/int340x: processor_thermal: Suppot 64 bit RFIM responses")
    Reported-by: Jakub Kicinski <[email protected]>
    Cc: Srinivas Pandruvada <[email protected]>
    Cc: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    torvalds authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    c3f2809 View commit details
    Browse the repository at this point in the history
  134. smb3: do not error on fsync when readonly

    commit 71e6864 upstream.
    
    Linux allows doing a flush/fsync on a file open for read-only,
    but the protocol does not allow that.  If the file passed in
    on the flush is read-only try to find a writeable handle for
    the same inode, if that is not possible skip sending the
    fsync call to the server to avoid breaking the apps.
    
    Reported-by: Julian Sikorski <[email protected]>
    Tested-by: Julian Sikorski <[email protected]>
    Suggested-by: Jeremy Allison <[email protected]>
    Reviewed-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Steve French authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    93114d5 View commit details
    Browse the repository at this point in the history
  135. ARM: 9155/1: fix early early_iounmap()

    commit 0d08e7b upstream.
    
    Currently __set_fixmap() bails out with a warning when called in early boot
    from early_iounmap(). Fix it, and while at it, make the comment a bit easier
    to understand.
    
    Cc: <[email protected]>
    Fixes: b089c31 ("ARM: 8667/3: Fix memory attribute inconsistencies when using fixmap")
    Acked-by: Ard Biesheuvel <[email protected]>
    Signed-off-by: Michał Mirosław <[email protected]>
    Signed-off-by: Russell King (Oracle) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    osctobe authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    12f0dc4 View commit details
    Browse the repository at this point in the history
  136. ARM: 9156/1: drop cc-option fallbacks for architecture selection

    commit 418ace9 upstream.
    
    Naresh and Antonio ran into a build failure with latest Debian
    armhf compilers, with lots of output like
    
     tmp/ccY3nOAs.s:2215: Error: selected processor does not support `cpsid i' in ARM mode
    
    As it turns out, $(cc-option) fails early here when the FPU is not
    selected before CPU architecture is selected, as the compiler
    option check runs before enabling -msoft-float, which causes
    a problem when testing a target architecture level without an FPU:
    
    cc1: error: '-mfloat-abi=hard': selected architecture lacks an FPU
    
    Passing e.g. -march=armv6k+fp in place of -march=armv6k would avoid this
    issue, but the fallback logic is already broken because all supported
    compilers (gcc-5 and higher) are much more recent than these options,
    and building with -march=armv5t as a fallback no longer works.
    
    The best way forward that I see is to just remove all the checks, which
    also has the nice side-effect of slightly improving the startup time for
    'make'.
    
    The -mtune=marvell-f option was apparently never supported by any mainline
    compiler, and the custom Codesourcery gcc build that did support is
    now too old to build kernels, so just use -mtune=xscale unconditionally
    for those.
    
    This should be safe to apply on all stable kernels, and will be required
    in order to keep building them with gcc-11 and higher.
    
    Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996419
    
    Reported-by: Antonio Terceiro <[email protected]>
    Reported-by: Naresh Kamboju <[email protected]>
    Reported-by: Sebastian Andrzej Siewior <[email protected]>
    Tested-by: Sebastian Reichel <[email protected]>
    Tested-by: Klaus Kudielka <[email protected]>
    Cc: Matthias Klose <[email protected]>
    Cc: [email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Russell King (Oracle) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    arndb authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    ca8f29d View commit details
    Browse the repository at this point in the history
  137. parisc: Fix backtrace to always include init funtion names

    commit 279917e upstream.
    
    I noticed that sometimes at kernel startup the backtraces did not
    included the function names of init functions. Their address were not
    resolved to function names and instead only the address was printed.
    
    Debugging shows that the culprit is is_ksym_addr() which is called
    by the backtrace functions to check if an address belongs to a function in
    the kernel. The problem occurs only for CONFIG_KALLSYMS_ALL=y.
    
    When looking at is_ksym_addr() one can see that for CONFIG_KALLSYMS_ALL=y
    the function only tries to resolve the address via is_kernel() function,
    which checks like this:
    	if (addr >= _stext && addr <= _end)
                    return 1;
    On parisc the init functions are located before _stext, so this check fails.
    Other platforms seem to have all functions (including init functions)
    behind _stext.
    
    The following patch moves the _stext symbol at the beginning of the
    kernel and thus includes the init section. This fixes the check and does
    not seem to have any negative side effects on where the kernel mapping
    happens in the map_pages() function in arch/parisc/mm/init.c.
    
    Signed-off-by: Helge Deller <[email protected]>
    Cc: [email protected] # 5.4+
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hdeller authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    1dc7ce0 View commit details
    Browse the repository at this point in the history
  138. parisc: Flush kernel data mapping in set_pte_at() when installing pte…

    … for user page
    
    commit 38860b2 upstream.
    
    For years, there have been random segmentation faults in userspace on
    SMP PA-RISC machines.  It occurred to me that this might be a problem in
    set_pte_at().  MIPS and some other architectures do cache flushes when
    installing PTEs with the present bit set.
    
    Here I have adapted the code in update_mmu_cache() to flush the kernel
    mapping when the kernel flush is deferred, or when the kernel mapping
    may alias with the user mapping.  This simplifies calls to
    update_mmu_cache().
    
    I also changed the barrier in set_pte() from a compiler barrier to a
    full memory barrier.  I know this change is not sufficient to fix the
    problem.  It might not be needed.
    
    I have had a few days of operation with 5.14.16 to 5.15.1 and haven't
    seen any random segmentation faults on rp3440 or c8000 so far.
    
    Signed-off-by: John David Anglin <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Cc: [email protected] # 5.12+
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    danglin44 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    8301503 View commit details
    Browse the repository at this point in the history
  139. MIPS: fix duplicated slashes for Platform file path

    commit cca2aac upstream.
    
    platform-y accumulates platform names with a slash appended.
    The current $(patsubst ...) ends up with doubling slashes.
    
    GNU Make still include Platform files, but in case of an error,
    a clumsy file path is displayed:
    
      arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop.  Stop.
    
    Signed-off-by: Masahiro Yamada <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Cc: Jason Self <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    masahir0y authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    7089587 View commit details
    Browse the repository at this point in the history
  140. MIPS: fix *-pkg builds for loongson2ef platform

    commit 0706f74 upstream.
    
    Since commit 805b2e1 ("kbuild: include Makefile.compiler only when
    compiler is needed"), package builds for the loongson2f platform fail.
    
      $ make ARCH=mips CROSS_COMPILE=mips64-linux- lemote2f_defconfig bindeb-pkg
        [ snip ]
      sh ./scripts/package/builddeb
      arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop.  Stop.
      cp: cannot stat '': No such file or directory
      make[5]: *** [scripts/Makefile.package:87: intdeb-pkg] Error 1
      make[4]: *** [Makefile:1558: intdeb-pkg] Error 2
      make[3]: *** [debian/rules:13: binary-arch] Error 2
      dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
      make[2]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2
      make[1]: *** [Makefile:1558: bindeb-pkg] Error 2
      make: *** [Makefile:350: __build_one_by_one] Error 2
    
    The reason is because "make image_name" fails.
    
      $ make ARCH=mips CROSS_COMPILE=mips64-linux- image_name
      arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop.  Stop.
    
    In general, adding $(error ...) in the parse stage is troublesome,
    and it is pointless to check toolchains even if we are not building
    anything. Do not include Kbuild.platform in such cases.
    
    Fixes: 805b2e1 ("kbuild: include Makefile.compiler only when compiler is needed")
    Reported-by: Jason Self <[email protected]>
    Signed-off-by: Masahiro Yamada <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    masahir0y authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9b1b68e View commit details
    Browse the repository at this point in the history
  141. MIPS: Fix assembly error from MIPSr2 code used within MIPS_ISA_ARCH_L…

    …EVEL
    
    commit a923a26 upstream.
    
    Fix assembly errors like:
    
    {standard input}: Assembler messages:
    {standard input}:287: Error: opcode not supported on this processor: mips3 (mips3) `dins $10,$7,32,32'
    {standard input}:680: Error: opcode not supported on this processor: mips3 (mips3) `dins $10,$7,32,32'
    {standard input}:1274: Error: opcode not supported on this processor: mips3 (mips3) `dins $12,$9,32,32'
    {standard input}:2175: Error: opcode not supported on this processor: mips3 (mips3) `dins $10,$7,32,32'
    make[1]: *** [scripts/Makefile.build:277: mm/highmem.o] Error 1
    
    with code produced from `__cmpxchg64' for MIPS64r2 CPU configurations
    using CONFIG_32BIT and CONFIG_PHYS_ADDR_T_64BIT.
    
    This is due to MIPS_ISA_ARCH_LEVEL downgrading the assembly architecture
    to `r4000' i.e. MIPS III for MIPS64r2 configurations, while there is a
    block of code containing a DINS MIPS64r2 instruction conditionalized on
    MIPS_ISA_REV >= 2 within the scope of the downgrade.
    
    The assembly architecture override code pattern has been put there for
    LL/SC instructions, so that code compiles for configurations that select
    a processor to build for that does not support these instructions while
    still providing run-time support for processors that do, dynamically
    switched by non-constant `cpu_has_llsc'.  It went in with linux-mips.org
    commit aac8aa7 ("Enable a suitable ISA for the assembler around
    ll/sc so that code builds even for processors that don't support the
    instructions. Plus minor formatting fixes.") back in 2005.
    
    Fix the problem by wrapping these instructions along with the adjacent
    SYNC instructions only, following the practice established with commit
    cfd54de ("MIPS: Avoid move psuedo-instruction whilst using
    MIPS_ISA_LEVEL") and commit 378ed6f ("MIPS: Avoid using .set mips0
    to restore ISA").  Strictly speaking the SYNC instructions do not have
    to be wrapped as they are only used as a Loongson3 erratum workaround,
    so they will be enabled in the assembler by default, but do this so as
    to keep code consistent with other places.
    
    Reported-by: kernel test robot <[email protected]>
    Signed-off-by: Maciej W. Rozycki <[email protected]>
    Fixes: c7e2d71 ("MIPS: Fix set_pte() for Netlogic XLR using cmpxchg64()")
    Cc: [email protected] # v5.1+
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    maciej-w-rozycki authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3cd12b6 View commit details
    Browse the repository at this point in the history
  142. x86/mce: Add errata workaround for Skylake SKX37

    commit e629fc1 upstream.
    
    Errata SKX37 is word-for-word identical to the other errata listed in
    this workaround.   I happened to notice this after investigating a CMCI
    storm on a Skylake host.  While I can't confirm this was the root cause,
    spurious corrected errors does sound like a likely suspect.
    
    Fixes: 2976908 ("x86/mce: Do not log spurious corrected mce errors")
    Signed-off-by: Dave Jones <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Reviewed-by: Tony Luck <[email protected]>
    Cc: <[email protected]>
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kernelslacker authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    affa136 View commit details
    Browse the repository at this point in the history
  143. PCI/MSI: Move non-mask check back into low level accessors

    commit 9c8e9c9 upstream.
    
    The recent rework of PCI/MSI[X] masking moved the non-mask checks from the
    low level accessors into the higher level mask/unmask functions.
    
    This missed the fact that these accessors can be invoked from other places
    as well. The missing checks break XEN-PV which sets pci_msi_ignore_mask and
    also violates the virtual MSIX and the msi_attrib.maskbit protections.
    
    Instead of sprinkling checks all over the place, lift them back into the
    low level accessor functions. To avoid checking three different conditions
    combine them into one property of msi_desc::msi_attrib.
    
    [ josef: Fixed the missed conversion in the core code ]
    
    Fixes: fcacdfb ("PCI/MSI: Provide a new set of mask and unmask functions")
    Reported-by: Josef Johansson <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Tested-by: Josef Johansson <[email protected]>
    Cc: Bjorn Helgaas <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    KAGA-KOKO authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    ab40a2e View commit details
    Browse the repository at this point in the history
  144. PCI/MSI: Destroy sysfs before freeing entries

    commit 3735459 upstream.
    
    free_msi_irqs() frees the MSI entries before destroying the sysfs entries
    which are exposing them. Nothing prevents a concurrent free while a sysfs
    file is read and accesses the possibly freed entry.
    
    Move the sysfs release ahead of freeing the entries.
    
    Fixes: 1c51b50 ("PCI/MSI: Export MSI mode using attributes, not kobjects")
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Greg Kroah-Hartman <[email protected]>
    Cc: Bjorn Helgaas <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/87sfw5305m.ffs@tglx
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    KAGA-KOKO authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d5e79d8 View commit details
    Browse the repository at this point in the history
  145. KVM: x86: move guest_pv_has out of user_access section

    commit 3e067fd upstream.
    
    When UBSAN is enabled, the code emitted for the call to guest_pv_has
    includes a call to __ubsan_handle_load_invalid_value.  objtool
    complains that this call happens with UACCESS enabled; to avoid
    the warning, pull the calls to user_access_begin into both arms
    of the "if" statement, after the check for guest_pv_has.
    
    Reported-by: Stephen Rothwell <[email protected]>
    Cc: David Woodhouse <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bonzini authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    fb58e9a View commit details
    Browse the repository at this point in the history
  146. posix-cpu-timers: Clear task::posix_cputimers_work in copy_process()

    commit ca7752c upstream.
    
    copy_process currently copies task_struct.posix_cputimers_work as-is. If a
    timer interrupt arrives while handling clone and before dup_task_struct
    completes then the child task will have:
    
    1. posix_cputimers_work.scheduled = true
    2. posix_cputimers_work.work queued.
    
    copy_process clears task_struct.task_works, so (2) will have no effect and
    posix_cpu_timers_work will never run (not to mention it doesn't make sense
    for two tasks to share a common linked list).
    
    Since posix_cpu_timers_work never runs, posix_cputimers_work.scheduled is
    never cleared. Since scheduled is set, future timer interrupts will skip
    scheduling work, with the ultimate result that the task will never receive
    timer expirations.
    
    Together, the complete flow is:
    
    1. Task 1 calls clone(), enters kernel.
    2. Timer interrupt fires, schedules task work on Task 1.
       2a. task_struct.posix_cputimers_work.scheduled = true
       2b. task_struct.posix_cputimers_work.work added to
           task_struct.task_works.
    3. dup_task_struct() copies Task 1 to Task 2.
    4. copy_process() clears task_struct.task_works for Task 2.
    5. Future timer interrupts on Task 2 see
       task_struct.posix_cputimers_work.scheduled = true and skip scheduling
       work.
    
    Fix this by explicitly clearing contents of task_struct.posix_cputimers_work
    in copy_process(). This was never meant to be shared or inherited across
    tasks in the first place.
    
    Fixes: 1fb497d ("posix-cpu-timers: Provide mechanisms to defer timer handling to task_work")
    Reported-by: Rhys Hiltner <[email protected]>
    Signed-off-by: Michael Pratt <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    prattmic authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d5d2172 View commit details
    Browse the repository at this point in the history
  147. irqchip/sifive-plic: Fixup EOI failed when masked

    commit 69ea463 upstream.
    
    When using "devm_request_threaded_irq(,,,,IRQF_ONESHOT,,)" in a driver,
    only the first interrupt is handled, and following interrupts are never
    delivered (initially reported in [1]).
    
    That's because the RISC-V PLIC cannot EOI masked interrupts, as explained
    in the description of Interrupt Completion in the PLIC spec [2]:
    
    <quote>
    The PLIC signals it has completed executing an interrupt handler by
    writing the interrupt ID it received from the claim to the claim/complete
    register. The PLIC does not check whether the completion ID is the same
    as the last claim ID for that target. If the completion ID does not match
    an interrupt source that *is currently enabled* for the target, the
    completion is silently ignored.
    </quote>
    
    Re-enable the interrupt before completion if it has been masked during
    the handling, and remask it afterwards.
    
    [1] http://lists.infradead.org/pipermail/linux-riscv/2021-July/007441.html
    [2] https://github.com/riscv/riscv-plic-spec/blob/8bc15a35d07c9edf7b5d23fec9728302595ffc4d/riscv-plic.adoc
    
    Fixes: bb0fed1 ("irqchip/sifive-plic: Switch to fasteoi flow")
    Reported-by: Vincent Pelletier <[email protected]>
    Tested-by: Nikita Shubin <[email protected]>
    Signed-off-by: Guo Ren <[email protected]>
    Cc: [email protected]
    Cc: Thomas Gleixner <[email protected]>
    Cc: Palmer Dabbelt <[email protected]>
    Cc: Atish Patra <[email protected]>
    Reviewed-by: Anup Patel <[email protected]>
    [maz: amended commit message]
    Signed-off-by: Marc Zyngier <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    guoren83 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    910ea7d View commit details
    Browse the repository at this point in the history
  148. f2fs: should use GFP_NOFS for directory inodes

    commit 92d602b upstream.
    
    We use inline_dentry which requires to allocate dentry page when adding a link.
    If we allow to reclaim memory from filesystem, we do down_read(&sbi->cp_rwsem)
    twice by f2fs_lock_op(). I think this should be okay, but how about stopping
    the lockdep complaint [1]?
    
    f2fs_create()
     - f2fs_lock_op()
     - f2fs_do_add_link()
      - __f2fs_find_entry
       - f2fs_get_read_data_page()
       -> kswapd
        - shrink_node
         - f2fs_evict_inode
          - f2fs_lock_op()
    
    [1]
    
    fs_reclaim
    ){+.+.}-{0:0}
    :
    kswapd0:        lock_acquire+0x114/0x394
    kswapd0:        __fs_reclaim_acquire+0x40/0x50
    kswapd0:        prepare_alloc_pages+0x94/0x1ec
    kswapd0:        __alloc_pages_nodemask+0x78/0x1b0
    kswapd0:        pagecache_get_page+0x2e0/0x57c
    kswapd0:        f2fs_get_read_data_page+0xc0/0x394
    kswapd0:        f2fs_find_data_page+0xa4/0x23c
    kswapd0:        find_in_level+0x1a8/0x36c
    kswapd0:        __f2fs_find_entry+0x70/0x100
    kswapd0:        f2fs_do_add_link+0x84/0x1ec
    kswapd0:        f2fs_mkdir+0xe4/0x1e4
    kswapd0:        vfs_mkdir+0x110/0x1c0
    kswapd0:        do_mkdirat+0xa4/0x160
    kswapd0:        __arm64_sys_mkdirat+0x24/0x34
    kswapd0:        el0_svc_common.llvm.17258447499513131576+0xc4/0x1e8
    kswapd0:        do_el0_svc+0x28/0xa0
    kswapd0:        el0_svc+0x24/0x38
    kswapd0:        el0_sync_handler+0x88/0xec
    kswapd0:        el0_sync+0x1c0/0x200
    kswapd0:
    -> #1
    (
    &sbi->cp_rwsem
    ){++++}-{3:3}
    :
    kswapd0:        lock_acquire+0x114/0x394
    kswapd0:        down_read+0x7c/0x98
    kswapd0:        f2fs_do_truncate_blocks+0x78/0x3dc
    kswapd0:        f2fs_truncate+0xc8/0x128
    kswapd0:        f2fs_evict_inode+0x2b8/0x8b8
    kswapd0:        evict+0xd4/0x2f8
    kswapd0:        iput+0x1c0/0x258
    kswapd0:        do_unlinkat+0x170/0x2a0
    kswapd0:        __arm64_sys_unlinkat+0x4c/0x68
    kswapd0:        el0_svc_common.llvm.17258447499513131576+0xc4/0x1e8
    kswapd0:        do_el0_svc+0x28/0xa0
    kswapd0:        el0_svc+0x24/0x38
    kswapd0:        el0_sync_handler+0x88/0xec
    kswapd0:        el0_sync+0x1c0/0x200
    
    Cc: [email protected]
    Fixes: bdbc90f ("f2fs: don't put dentry page in pagecache into highmem")
    Reviewed-by: Chao Yu <[email protected]>
    Reviewed-by: Stanley Chu <[email protected]>
    Reviewed-by: Light Hsieh <[email protected]>
    Tested-by: Light Hsieh <[email protected]>
    Signed-off-by: Jaegeuk Kim <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Jaegeuk Kim authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    0353020 View commit details
    Browse the repository at this point in the history
  149. f2fs: include non-compressed blocks in compr_written_block

    commit 09631cf upstream.
    
    Need to include non-compressed blocks in compr_written_block to
    estimate average compression ratio more accurately.
    
    Fixes: 5ac443e ("f2fs: add sysfs nodes to get runtime compression stat")
    Cc: [email protected]
    Signed-off-by: Daeho Jeong <[email protected]>
    Signed-off-by: Jaegeuk Kim <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Daeho Jeong authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6fd5426 View commit details
    Browse the repository at this point in the history
  150. f2fs: fix UAF in f2fs_available_free_memory

    commit 5429c9d upstream.
    
    if2fs_fill_super
    -> f2fs_build_segment_manager
       -> create_discard_cmd_control
          -> f2fs_start_discard_thread
    
    It invokes kthread_run to create a thread and run issue_discard_thread.
    
    However, if f2fs_build_node_manager fails, the control flow goes to
    free_nm and calls f2fs_destroy_node_manager. This function will free
    sbi->nm_info. However, if issue_discard_thread accesses sbi->nm_info
    after the deallocation, but before the f2fs_stop_discard_thread, it will
    cause UAF(Use-after-free).
    
    -> f2fs_destroy_segment_manager
       -> destroy_discard_cmd_control
          -> f2fs_stop_discard_thread
    
    Fix this by stopping discard thread before f2fs_destroy_node_manager.
    
    Note that, the commit d6d2b49 introduces the call of
    f2fs_available_free_memory into issue_discard_thread.
    
    Cc: [email protected]
    Fixes: d6d2b49 ("f2fs: allow to change discard policy based on cached discard cmds")
    Signed-off-by: Dongliang Mu <[email protected]>
    Reviewed-by: Chao Yu <[email protected]>
    Signed-off-by: Jaegeuk Kim <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mudongliang authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5e1b901 View commit details
    Browse the repository at this point in the history
  151. ceph: fix mdsmap decode when there are MDS's beyond max_mds

    commit 0e24421 upstream.
    
    If the max_mds is decreased in a cephfs cluster, there is a window
    of time before the MDSs are removed. If a map goes out during this
    period, the mdsmap may show the decreased max_mds but still shows
    those MDSes as in or in the export target list.
    
    Ensure that we don't fail the map decode in that case.
    
    Cc: [email protected]
    URL: https://tracker.ceph.com/issues/52436
    Fixes: d517b39 ("ceph: reconnect to the export targets on new mdsmaps")
    Signed-off-by: Xiubo Li <[email protected]>
    Reviewed-by: Jeff Layton <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    lxbsz authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    11a102d View commit details
    Browse the repository at this point in the history
  152. erofs: fix unsafe pagevec reuse of hooked pclusters

    commit 86432a6 upstream.
    
    There are pclusters in runtime marked with Z_EROFS_PCLUSTER_TAIL
    before actual I/O submission. Thus, the decompression chain can be
    extended if the following pcluster chain hooks such tail pcluster.
    
    As the related comment mentioned, if some page is made of a hooked
    pcluster and another followed pcluster, it can be reused for in-place
    I/O (since I/O should be submitted anyway):
     _______________________________________________________________
    |  tail (partial) page |          head (partial) page           |
    |_____PRIMARY_HOOKED___|____________PRIMARY_FOLLOWED____________|
    
    However, it's by no means safe to reuse as pagevec since if such
    PRIMARY_HOOKED pclusters finally move into bypass chain without I/O
    submission. It's somewhat hard to reproduce with LZ4 and I just found
    it (general protection fault) by ro_fsstressing a LZMA image for long
    time.
    
    I'm going to actively clean up related code together with multi-page
    folio adaption in the next few months. Let's address it directly for
    easier backporting for now.
    
    Call trace for reference:
      z_erofs_decompress_pcluster+0x10a/0x8a0 [erofs]
      z_erofs_decompress_queue.isra.36+0x3c/0x60 [erofs]
      z_erofs_runqueue+0x5f3/0x840 [erofs]
      z_erofs_readahead+0x1e8/0x320 [erofs]
      read_pages+0x91/0x270
      page_cache_ra_unbounded+0x18b/0x240
      filemap_get_pages+0x10a/0x5f0
      filemap_read+0xa9/0x330
      new_sync_read+0x11b/0x1a0
      vfs_read+0xf1/0x190
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 3883a79 ("staging: erofs: introduce VLE decompression support")
    Cc: <[email protected]> # 4.19+
    Reviewed-by: Chao Yu <[email protected]>
    Signed-off-by: Gao Xiang <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hsiangkao authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f609789 View commit details
    Browse the repository at this point in the history
  153. drm/i915/guc: Fix blocked context accounting

    commit fc30a67 upstream.
    
    Prior to this patch the blocked context counter was cleared on
    init_sched_state (used during registering a context & resets) which is
    incorrect. This state needs to be persistent or the counter can read the
    incorrect value resulting in scheduling never getting enabled again.
    
    Fixes: 62eaf0a ("drm/i915/guc: Support request cancellation")
    Signed-off-by: Matthew Brost <[email protected]>
    Reviewed-by: Daniel Vetter <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: John Harrison <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mbrost05 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    876d624 View commit details
    Browse the repository at this point in the history
  154. block: Hold invalidate_lock in BLKDISCARD ioctl

    commit 7607c44 upstream.
    
    When BLKDISCARD ioctl and data read race, the data read leaves stale
    page cache. To avoid the stale page cache, hold invalidate_lock of the
    block device file mapping. The stale page cache is observed when
    blktests test case block/009 is repeated hundreds of times.
    
    This patch can be applied back to the stable kernel version v5.15.y
    with slight patch edit. Rework is required for older stable kernels.
    
    Fixes: 351499a ("block: Invalidate cache on discard v2")
    Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
    Cc: [email protected] # v5.15
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kawasaki authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f9bed86 View commit details
    Browse the repository at this point in the history
  155. block: Hold invalidate_lock in BLKZEROOUT ioctl

    commit 35e4c6c upstream.
    
    When BLKZEROOUT ioctl and data read race, the data read leaves stale
    page cache. To avoid the stale page cache, hold invalidate_lock of the
    block device file mapping. The stale page cache is observed when
    blktests test case block/009 is modified to call "blkdiscard -z" command
    and repeated hundreds of times.
    
    This patch can be applied back to the stable kernel version v5.15.y.
    Rework is required for older stable kernels.
    
    Fixes: 22dd6d3 ("block: invalidate the page cache when issuing BLKZEROOUT")
    Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
    Cc: [email protected] # v5.15
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kawasaki authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    373c2bf View commit details
    Browse the repository at this point in the history
  156. block: Hold invalidate_lock in BLKRESETZONE ioctl

    commit 86399ea upstream.
    
    When BLKRESETZONE ioctl and data read race, the data read leaves stale
    page cache. The commit e511350 ("block: Discard page cache of zone
    reset target range") added page cache truncation to avoid stale page
    cache after the ioctl. However, the stale page cache still can be read
    during the reset zone operation for the ioctl. To avoid the stale page
    cache completely, hold invalidate_lock of the block device file mapping.
    
    Fixes: e511350 ("block: Discard page cache of zone reset target range")
    Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
    Cc: [email protected] # v5.15
    Reviewed-by: Jan Kara <[email protected]>
    Reviewed-by: Ming Lei <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kawasaki authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5e84e9d View commit details
    Browse the repository at this point in the history
  157. ksmbd: Fix buffer length check in fsctl_validate_negotiate_info()

    commit 78f1688 upstream.
    
    The validate_negotiate_info_req struct definition includes an extra
    field to access the data coming after the header. This causes the check
    in fsctl_validate_negotiate_info() to count the first element of the
    array twice. This in turn makes some valid requests fail, depending on
    whether they include padding or not.
    
    Fixes: f7db8fd ("ksmbd: add validation in smb2_ioctl")
    Cc: [email protected] # v5.15
    Acked-by: Namjae Jeon <[email protected]>
    Acked-by: Hyunchul Lee <[email protected]>
    Signed-off-by: Marios Makassikis <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Marios Makassikis authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    aacb2dd View commit details
    Browse the repository at this point in the history
  158. ksmbd: don't need 8byte alignment for request length in ksmbd_check_m…

    …essage
    
    commit b53ad81 upstream.
    
    When validating request length in ksmbd_check_message, 8byte alignment
    is not needed for compound request. It can cause wrong validation
    of request length.
    
    Fixes: e2f3448 ("cifsd: add server-side procedures for SMB3")
    Cc: [email protected] # v5.15
    Acked-by: Hyunchul Lee <[email protected]>
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    namjaejeon authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    1dd578e View commit details
    Browse the repository at this point in the history
  159. dmaengine: ti: k3-udma: Set bchan to NULL if a channel request fail

    commit 5c6c6d6 upstream.
    
    bcdma_get_*() checks if bchan is already allocated by checking if it
    has a NON NULL value. For the error cases, bchan will have error value
    and bcdma_get_*() considers this as already allocated (PASS) since the
    error values are NON NULL. This results in NULL pointer dereference
    error while de-referencing bchan.
    
    Reset the value of bchan to NULL if a channel request fails.
    
    CC: [email protected]
    Acked-by: Peter Ujfalusi <[email protected]>
    Signed-off-by: Kishon Vijay Abraham I <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kishon authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    68ae6ae View commit details
    Browse the repository at this point in the history
  160. dmaengine: ti: k3-udma: Set r/tchan or rflow to NULL if request fail

    commit eb91224 upstream.
    
    udma_get_*() checks if rchan/tchan/rflow is already allocated by checking
    if it has a NON NULL value. For the error cases, rchan/tchan/rflow will
    have error value and udma_get_*() considers this as already allocated
    (PASS) since the error values are NON NULL. This results in NULL pointer
    dereference error while de-referencing rchan/tchan/rflow.
    
    Reset the value of rchan/tchan/rflow to NULL if a channel request fails.
    
    CC: [email protected]
    Acked-by: Peter Ujfalusi <[email protected]>
    Signed-off-by: Kishon Vijay Abraham I <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kishon authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    c4cd9e5 View commit details
    Browse the repository at this point in the history
  161. dmaengine: bestcomm: fix system boot lockups

    commit adec566 upstream.
    
    memset() and memcpy() on an MMIO region like here results in a
    lockup at startup on mpc5200 platform (since this first happens
    during probing of the ATA and Ethernet drivers). Use memset_io()
    and memcpy_toio() instead.
    
    Fixes: 2f9ea1b ("bestcomm: core bestcomm support for Freescale MPC5200")
    Cc: [email protected] # v5.14+
    Signed-off-by: Anatolij Gustschin <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vdsao authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6a85f01 View commit details
    Browse the repository at this point in the history
  162. net, neigh: Enable state migration between NUD_PERMANENT and NTF_USE

    [ Upstream commit 3dc20f4 ]
    
    Currently, it is not possible to migrate a neighbor entry between NUD_PERMANENT
    state and NTF_USE flag with a dynamic NUD state from a user space control plane.
    Similarly, it is not possible to add/remove NTF_EXT_LEARNED flag from an existing
    neighbor entry in combination with NTF_USE flag.
    
    This is due to the latter directly calling into neigh_event_send() without any
    meta data updates as happening in __neigh_update(). Thus, to enable this use
    case, extend the latter with a NEIGH_UPDATE_F_USE flag where we break the
    NUD_PERMANENT state in particular so that a latter neigh_event_send() is able
    to re-resolve a neighbor entry.
    
    Before fix, NUD_PERMANENT -> NUD_* & NTF_USE:
    
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a PERMANENT
      [...]
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 use extern_learn
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a PERMANENT
      [...]
    
    As can be seen, despite the admin-triggered replace, the entry remains in the
    NUD_PERMANENT state.
    
    After fix, NUD_PERMANENT -> NUD_* & NTF_USE:
    
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a PERMANENT
      [...]
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 use extern_learn
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a extern_learn REACHABLE
      [...]
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a extern_learn STALE
      [...]
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a PERMANENT
      [...]
    
    After the fix, the admin-triggered replace switches to a dynamic state from
    the NTF_USE flag which triggered a new neighbor resolution. Likewise, we can
    transition back from there, if needed, into NUD_PERMANENT.
    
    Similar before/after behavior can be observed for below transitions:
    
    Before fix, NTF_USE -> NTF_USE | NTF_EXT_LEARNED -> NTF_USE:
    
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 use
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a REACHABLE
      [...]
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 use extern_learn
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a REACHABLE
      [...]
    
    After fix, NTF_USE -> NTF_USE | NTF_EXT_LEARNED -> NTF_USE:
    
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 use
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a REACHABLE
      [...]
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 use extern_learn
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a extern_learn REACHABLE
      [...]
      # ./ip/ip n replace 192.168.178.30 dev enp5s0 use
      # ./ip/ip n
      192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a REACHABLE
      [..]
    
    Signed-off-by: Daniel Borkmann <[email protected]>
    Acked-by: Roopa Prabhu <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    borkmann authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    1f03911 View commit details
    Browse the repository at this point in the history
  163. 9p/net: fix missing error check in p9_check_errors

    commit 27eb4c3 upstream.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Reported-by: [email protected]
    Cc: [email protected]
    Signed-off-by: Dominique Martinet <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    martinetd authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6847c42 View commit details
    Browse the repository at this point in the history
  164. mm/filemap.c: remove bogus VM_BUG_ON

    commit d417b49 upstream.
    
    It is not safe to check page->index without holding the page lock.  It
    can be changed if the page is moved between the swap cache and the page
    cache for a shmem file, for example.  There is a VM_BUG_ON below which
    checks page->index is correct after taking the page lock.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 5c211ba ("mm: add and use find_lock_entries")
    Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
    Reported-by: <[email protected]>
    Cc: Hugh Dickins <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Matthew Wilcox (Oracle) authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6560e8c View commit details
    Browse the repository at this point in the history
  165. memcg: prohibit unconditional exceeding the limit of dying tasks

    commit a4ebf1b upstream.
    
    Memory cgroup charging allows killed or exiting tasks to exceed the hard
    limit.  It is assumed that the amount of the memory charged by those
    tasks is bound and most of the memory will get released while the task
    is exiting.  This is resembling a heuristic for the global OOM situation
    when tasks get access to memory reserves.  There is no global memory
    shortage at the memcg level so the memcg heuristic is more relieved.
    
    The above assumption is overly optimistic though.  E.g.  vmalloc can
    scale to really large requests and the heuristic would allow that.  We
    used to have an early break in the vmalloc allocator for killed tasks
    but this has been reverted by commit b8c8a33 ("Revert "vmalloc:
    back off when the current task is killed"").  There are likely other
    similar code paths which do not check for fatal signals in an
    allocation&charge loop.  Also there are some kernel objects charged to a
    memcg which are not bound to a process life time.
    
    It has been observed that it is not really hard to trigger these
    bypasses and cause global OOM situation.
    
    One potential way to address these runaways would be to limit the amount
    of excess (similar to the global OOM with limited oom reserves).  This
    is certainly possible but it is not really clear how much of an excess
    is desirable and still protects from global OOMs as that would have to
    consider the overall memcg configuration.
    
    This patch is addressing the problem by removing the heuristic
    altogether.  Bypass is only allowed for requests which either cannot
    fail or where the failure is not desirable while excess should be still
    limited (e.g.  atomic requests).  Implementation wise a killed or dying
    task fails to charge if it has passed the OOM killer stage.  That should
    give all forms of reclaim chance to restore the limit before the failure
    (ENOMEM) and tell the caller to back off.
    
    In addition, this patch renames should_force_charge() helper to
    task_is_dying() because now its use is not associated witch forced
    charging.
    
    This patch depends on pagefault_out_of_memory() to not trigger
    out_of_memory(), because then a memcg failure can unwind to VM_FAULT_OOM
    and cause a global OOM killer.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Vasily Averin <[email protected]>
    Suggested-by: Michal Hocko <[email protected]>
    Acked-by: Michal Hocko <[email protected]>
    Cc: Johannes Weiner <[email protected]>
    Cc: Vladimir Davydov <[email protected]>
    Cc: Roman Gushchin <[email protected]>
    Cc: Uladzislau Rezki <[email protected]>
    Cc: Vlastimil Babka <[email protected]>
    Cc: Shakeel Butt <[email protected]>
    Cc: Mel Gorman <[email protected]>
    Cc: Tetsuo Handa <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vaverin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f1e83db View commit details
    Browse the repository at this point in the history
  166. mm, oom: pagefault_out_of_memory: don't force global OOM for dying tasks

    commit 0b28179 upstream.
    
    Patch series "memcg: prohibit unconditional exceeding the limit of dying tasks", v3.
    
    Memory cgroup charging allows killed or exiting tasks to exceed the hard
    limit.  It can be misused and allowed to trigger global OOM from inside
    a memcg-limited container.  On the other hand if memcg fails allocation,
    called from inside #PF handler it triggers global OOM from inside
    pagefault_out_of_memory().
    
    To prevent these problems this patchset:
     (a) removes execution of out_of_memory() from
         pagefault_out_of_memory(), becasue nobody can explain why it is
         necessary.
     (b) allow memcg to fail allocation of dying/killed tasks.
    
    This patch (of 3):
    
    Any allocation failure during the #PF path will return with VM_FAULT_OOM
    which in turn results in pagefault_out_of_memory which in turn executes
    out_out_memory() and can kill a random task.
    
    An allocation might fail when the current task is the oom victim and
    there are no memory reserves left.  The OOM killer is already handled at
    the page allocator level for the global OOM and at the charging level
    for the memcg one.  Both have much more information about the scope of
    allocation/charge request.  This means that either the OOM killer has
    been invoked properly and didn't lead to the allocation success or it
    has been skipped because it couldn't have been invoked.  In both cases
    triggering it from here is pointless and even harmful.
    
    It makes much more sense to let the killed task die rather than to wake
    up an eternally hungry oom-killer and send him to choose a fatter victim
    for breakfast.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Vasily Averin <[email protected]>
    Suggested-by: Michal Hocko <[email protected]>
    Acked-by: Michal Hocko <[email protected]>
    Cc: Johannes Weiner <[email protected]>
    Cc: Mel Gorman <[email protected]>
    Cc: Roman Gushchin <[email protected]>
    Cc: Shakeel Butt <[email protected]>
    Cc: Tetsuo Handa <[email protected]>
    Cc: Uladzislau Rezki <[email protected]>
    Cc: Vladimir Davydov <[email protected]>
    Cc: Vlastimil Babka <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vaverin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    487a4c6 View commit details
    Browse the repository at this point in the history
  167. mm, oom: do not trigger out_of_memory from the #PF

    commit 60e2793 upstream.
    
    Any allocation failure during the #PF path will return with VM_FAULT_OOM
    which in turn results in pagefault_out_of_memory.  This can happen for 2
    different reasons.  a) Memcg is out of memory and we rely on
    mem_cgroup_oom_synchronize to perform the memcg OOM handling or b)
    normal allocation fails.
    
    The latter is quite problematic because allocation paths already trigger
    out_of_memory and the page allocator tries really hard to not fail
    allocations.  Anyway, if the OOM killer has been already invoked there
    is no reason to invoke it again from the #PF path.  Especially when the
    OOM condition might be gone by that time and we have no way to find out
    other than allocate.
    
    Moreover if the allocation failed and the OOM killer hasn't been invoked
    then we are unlikely to do the right thing from the #PF context because
    we have already lost the allocation context and restictions and
    therefore might oom kill a task from a different NUMA domain.
    
    This all suggests that there is no legitimate reason to trigger
    out_of_memory from pagefault_out_of_memory so drop it.  Just to be sure
    that no #PF path returns with VM_FAULT_OOM without allocation print a
    warning that this is happening before we restart the #PF.
    
    [VvS: #PF allocation can hit into limit of cgroup v1 kmem controller.
    This is a local problem related to memcg, however, it causes unnecessary
    global OOM kills that are repeated over and over again and escalate into a
    real disaster.  This has been broken since kmem accounting has been
    introduced for cgroup v1 (3.8).  There was no kmem specific reclaim for
    the separate limit so the only way to handle kmem hard limit was to return
    with ENOMEM.  In upstream the problem will be fixed by removing the
    outdated kmem limit, however stable and LTS kernels cannot do it and are
    still affected.  This patch fixes the problem and should be backported
    into stable/LTS.]
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Michal Hocko <[email protected]>
    Signed-off-by: Vasily Averin <[email protected]>
    Acked-by: Michal Hocko <[email protected]>
    Cc: Johannes Weiner <[email protected]>
    Cc: Mel Gorman <[email protected]>
    Cc: Roman Gushchin <[email protected]>
    Cc: Shakeel Butt <[email protected]>
    Cc: Tetsuo Handa <[email protected]>
    Cc: Uladzislau Rezki <[email protected]>
    Cc: Vladimir Davydov <[email protected]>
    Cc: Vlastimil Babka <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Michal Hocko authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    c15aeea View commit details
    Browse the repository at this point in the history
  168. mm, thp: lock filemap when truncating page cache

    commit 55fc0d9 upstream.
    
    Patch series "fix two bugs for file THP".
    
    This patch (of 2):
    
    Transparent huge page has supported read-only non-shmem files.  The
    file- backed THP is collapsed by khugepaged and truncated when written
    (for shared libraries).
    
    However, there is a race when multiple writers truncate the same page
    cache concurrently.
    
    In that case, subpage(s) of file THP can be revealed by find_get_entry
    in truncate_inode_pages_range, which will trigger PageTail BUG_ON in
    truncate_inode_page, as follows:
    
        page:000000009e420ff2 refcount:1 mapcount:0 mapping:0000000000000000 index:0x7ff pfn:0x50c3ff
        head:0000000075ff816d order:9 compound_mapcount:0 compound_pincount:0
        flags: 0x37fffe0000010815(locked|uptodate|lru|arch_1|head)
        raw: 37fffe0000000000 fffffe0013108001 dead000000000122 dead000000000400
        raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
        head: 37fffe0000010815 fffffe001066bd48 ffff000404183c20 0000000000000000
        head: 0000000000000600 0000000000000000 00000001ffffffff ffff000c0345a000
        page dumped because: VM_BUG_ON_PAGE(PageTail(page))
        ------------[ cut here ]------------
        kernel BUG at mm/truncate.c:213!
        Internal error: Oops - BUG: 0 [#1] SMP
        Modules linked in: xfs(E) libcrc32c(E) rfkill(E) ...
        CPU: 14 PID: 11394 Comm: check_madvise_d Kdump: ...
        Hardware name: ECS, BIOS 0.0.0 02/06/2015
        pstate: 60400005 (nZCv daif +PAN -UAO -TCO BTYPE=--)
        Call trace:
         truncate_inode_page+0x64/0x70
         truncate_inode_pages_range+0x550/0x7e4
         truncate_pagecache+0x58/0x80
         do_dentry_open+0x1e4/0x3c0
         vfs_open+0x38/0x44
         do_open+0x1f0/0x310
         path_openat+0x114/0x1dc
         do_filp_open+0x84/0x134
         do_sys_openat2+0xbc/0x164
         __arm64_sys_openat+0x74/0xc0
         el0_svc_common.constprop.0+0x88/0x220
         do_el0_svc+0x30/0xa0
         el0_svc+0x20/0x30
         el0_sync_handler+0x1a4/0x1b0
         el0_sync+0x180/0x1c0
        Code: aa0103e0 900061e1 910ec021 9400d300 (d4210000)
    
    This patch mainly to lock filemap when one enter truncate_pagecache(),
    avoiding truncating the same page cache concurrently.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: eb6ecbe ("mm, thp: relax the VM_DENYWRITE constraint on file-backed THPs")
    Signed-off-by: Xu Yu <[email protected]>
    Signed-off-by: Rongwei Wang <[email protected]>
    Suggested-by: Matthew Wilcox (Oracle) <[email protected]>
    Tested-by: Song Liu <[email protected]>
    Cc: Collin Fijalkovich <[email protected]>
    Cc: Hugh Dickins <[email protected]>
    Cc: Mike Kravetz <[email protected]>
    Cc: William Kucharski <[email protected]>
    Cc: Yang Shi <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    wangrongwei authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    fd8e972 View commit details
    Browse the repository at this point in the history
  169. mm, thp: fix incorrect unmap behavior for private pages

    commit 8468e93 upstream.
    
    When truncating pagecache on file THP, the private pages of a process
    should not be unmapped mapping.  This incorrect behavior on a dynamic
    shared libraries which will cause related processes to happen core dump.
    
    A simple test for a DSO (Prerequisite is the DSO mapped in file THP):
    
        int main(int argc, char *argv[])
        {
    	int fd;
    
    	fd = open(argv[1], O_WRONLY);
    	if (fd < 0) {
    		perror("open");
    	}
    
    	close(fd);
    	return 0;
        }
    
    The test only to open a target DSO, and do nothing.  But this operation
    will lead one or more process to happen core dump.  This patch mainly to
    fix this bug.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: eb6ecbe ("mm, thp: relax the VM_DENYWRITE constraint on file-backed THPs")
    Signed-off-by: Rongwei Wang <[email protected]>
    Tested-by: Xu Yu <[email protected]>
    Cc: Matthew Wilcox (Oracle) <[email protected]>
    Cc: Song Liu <[email protected]>
    Cc: William Kucharski <[email protected]>
    Cc: Hugh Dickins <[email protected]>
    Cc: Yang Shi <[email protected]>
    Cc: Mike Kravetz <[email protected]>
    Cc: Collin Fijalkovich <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    wangrongwei authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3ea871f View commit details
    Browse the repository at this point in the history
  170. mfd: dln2: Add cell for initializing DLN2 ADC

    commit 313c84b upstream.
    
    This patch extends the DLN2 driver; adding cell for adc_dln2 module.
    
    The original patch[1] fell through the cracks when the driver was added
    so ADC has never actually been usable. That patch did not have ACPI
    support which was added in v5.9, so the oldest supported version this
    current patch can be backported to is 5.10.
    
    [1] https://www.spinics.net/lists/linux-iio/msg33975.html
    
    Cc: <[email protected]> # 5.10+
    Signed-off-by: Jack Andersen <[email protected]>
    Signed-off-by: Noralf Trønnes <[email protected]>
    Signed-off-by: Lee Jones <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jackoalan authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d9dad32 View commit details
    Browse the repository at this point in the history
  171. video: backlight: Drop maximum brightness override for brightness zero

    commit 33a5471 upstream.
    
    The note in c2adda2 ("video: backlight: Add of_find_backlight helper
    in backlight.c") says that gpio-backlight uses brightness as power state.
    This has been fixed since in ec665b7 ("backlight: gpio-backlight:
    Correct initial power state handling") and other backlight drivers do not
    require this workaround. Drop the workaround.
    
    This fixes the case where e.g. pwm-backlight can perfectly well be set to
    brightness 0 on boot in DT, which without this patch leads to the display
    brightness to be max instead of off.
    
    Fixes: c2adda2 ("video: backlight: Add of_find_backlight helper in backlight.c")
    Cc: <[email protected]> # 5.4+
    Cc: <[email protected]> # 4.19.x: ec665b7: backlight: gpio-backlight: Correct initial power state handling
    Signed-off-by: Marek Vasut <[email protected]>
    Acked-by: Noralf Trønnes <[email protected]>
    Reviewed-by: Daniel Thompson <[email protected]>
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Marek Vasut authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    a958d14 View commit details
    Browse the repository at this point in the history
  172. bcache: fix use-after-free problem in bcache_device_free()

    commit 8468f45 upstream.
    
    In bcache_device_free(), pointer disk is referenced still in
    ida_simple_remove() after blk_cleanup_disk() gets called on this
    pointer. This may cause a potential panic by use-after-free on the
    disk pointer.
    
    This patch fixes the problem by calling blk_cleanup_disk() after
    ida_simple_remove().
    
    Fixes: bc70852 ("bcache: convert to blk_alloc_disk/blk_cleanup_disk")
    Signed-off-by: Coly Li <[email protected]>
    Cc: Christoph Hellwig <[email protected]>
    Cc: Hannes Reinecke <[email protected]>
    Cc: Ulf Hansson <[email protected]>
    Cc: [email protected] # v5.14+
    Reviewed-by: Christoph Hellwig <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Coly Li authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d6a3009 View commit details
    Browse the repository at this point in the history
  173. bcache: Revert "bcache: use bvec_virt"

    commit 2878fea upstream.
    
    This reverts commit 2fd3e5e.
    
    The above commit replaces page_address(bv->bv_page) by bvec_virt(bv) to
    avoid directly access to bv->bv_page, but in situation bv->bv_offset is
    not zero and page_address(bv->bv_page) is not equal to bvec_virt(bv). In
    such case a memory corruption may happen because memory in next page is
    tainted by following line in do_btree_node_write(),
    	memcpy(bvec_virt(bv), addr, PAGE_SIZE);
    
    This patch reverts the mentioned commit to avoid the memory corruption.
    
    Fixes: 2fd3e5e ("bcache: use bvec_virt")
    Signed-off-by: Coly Li <[email protected]>
    Cc: Christoph Hellwig <[email protected]>
    Cc: [email protected] # 5.15
    Signed-off-by: Christoph Hellwig <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Coly Li authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    ac8ffb5 View commit details
    Browse the repository at this point in the history
  174. PM: sleep: Avoid calling put_device() under dpm_list_mtx

    commit 2aa3660 upstream.
    
    It is generally unsafe to call put_device() with dpm_list_mtx held,
    because the given device's release routine may carry out an action
    depending on that lock which then may deadlock, so modify the
    system-wide suspend and resume of devices to always drop dpm_list_mtx
    before calling put_device() (and adjust white space somewhat while
    at it).
    
    For instance, this prevents the following splat from showing up in
    the kernel log after a system resume in certain configurations:
    
    [ 3290.969514] ======================================================
    [ 3290.969517] WARNING: possible circular locking dependency detected
    [ 3290.969519] 5.15.0+ #2420 Tainted: G S
    [ 3290.969523] ------------------------------------------------------
    [ 3290.969525] systemd-sleep/4553 is trying to acquire lock:
    [ 3290.969529] ffff888117ab1138 ((wq_completion)hci0#2){+.+.}-{0:0}, at: flush_workqueue+0x87/0x4a0
    [ 3290.969554]
                   but task is already holding lock:
    [ 3290.969556] ffffffff8280fca8 (dpm_list_mtx){+.+.}-{3:3}, at: dpm_resume+0x12e/0x3e0
    [ 3290.969571]
                   which lock already depends on the new lock.
    
    [ 3290.969573]
                   the existing dependency chain (in reverse order) is:
    [ 3290.969575]
                   -> #3 (dpm_list_mtx){+.+.}-{3:3}:
    [ 3290.969583]        __mutex_lock+0x9d/0xa30
    [ 3290.969591]        device_pm_add+0x2e/0xe0
    [ 3290.969597]        device_add+0x4d5/0x8f0
    [ 3290.969605]        hci_conn_add_sysfs+0x43/0xb0 [bluetooth]
    [ 3290.969689]        hci_conn_complete_evt.isra.71+0x124/0x750 [bluetooth]
    [ 3290.969747]        hci_event_packet+0xd6c/0x28a0 [bluetooth]
    [ 3290.969798]        hci_rx_work+0x213/0x640 [bluetooth]
    [ 3290.969842]        process_one_work+0x2aa/0x650
    [ 3290.969851]        worker_thread+0x39/0x400
    [ 3290.969859]        kthread+0x142/0x170
    [ 3290.969865]        ret_from_fork+0x22/0x30
    [ 3290.969872]
                   -> #2 (&hdev->lock){+.+.}-{3:3}:
    [ 3290.969881]        __mutex_lock+0x9d/0xa30
    [ 3290.969887]        hci_event_packet+0xba/0x28a0 [bluetooth]
    [ 3290.969935]        hci_rx_work+0x213/0x640 [bluetooth]
    [ 3290.969978]        process_one_work+0x2aa/0x650
    [ 3290.969985]        worker_thread+0x39/0x400
    [ 3290.969993]        kthread+0x142/0x170
    [ 3290.969999]        ret_from_fork+0x22/0x30
    [ 3290.970004]
                   -> #1 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}:
    [ 3290.970013]        process_one_work+0x27d/0x650
    [ 3290.970020]        worker_thread+0x39/0x400
    [ 3290.970028]        kthread+0x142/0x170
    [ 3290.970033]        ret_from_fork+0x22/0x30
    [ 3290.970038]
                   -> #0 ((wq_completion)hci0#2){+.+.}-{0:0}:
    [ 3290.970047]        __lock_acquire+0x15cb/0x1b50
    [ 3290.970054]        lock_acquire+0x26c/0x300
    [ 3290.970059]        flush_workqueue+0xae/0x4a0
    [ 3290.970066]        drain_workqueue+0xa1/0x130
    [ 3290.970073]        destroy_workqueue+0x34/0x1f0
    [ 3290.970081]        hci_release_dev+0x49/0x180 [bluetooth]
    [ 3290.970130]        bt_host_release+0x1d/0x30 [bluetooth]
    [ 3290.970195]        device_release+0x33/0x90
    [ 3290.970201]        kobject_release+0x63/0x160
    [ 3290.970211]        dpm_resume+0x164/0x3e0
    [ 3290.970215]        dpm_resume_end+0xd/0x20
    [ 3290.970220]        suspend_devices_and_enter+0x1a4/0xba0
    [ 3290.970229]        pm_suspend+0x26b/0x310
    [ 3290.970236]        state_store+0x42/0x90
    [ 3290.970243]        kernfs_fop_write_iter+0x135/0x1b0
    [ 3290.970251]        new_sync_write+0x125/0x1c0
    [ 3290.970257]        vfs_write+0x360/0x3c0
    [ 3290.970263]        ksys_write+0xa7/0xe0
    [ 3290.970269]        do_syscall_64+0x3a/0x80
    [ 3290.970276]        entry_SYSCALL_64_after_hwframe+0x44/0xae
    [ 3290.970284]
                   other info that might help us debug this:
    
    [ 3290.970285] Chain exists of:
                     (wq_completion)hci0#2 --> &hdev->lock --> dpm_list_mtx
    
    [ 3290.970297]  Possible unsafe locking scenario:
    
    [ 3290.970299]        CPU0                    CPU1
    [ 3290.970300]        ----                    ----
    [ 3290.970302]   lock(dpm_list_mtx);
    [ 3290.970306]                                lock(&hdev->lock);
    [ 3290.970310]                                lock(dpm_list_mtx);
    [ 3290.970314]   lock((wq_completion)hci0#2);
    [ 3290.970319]
                    *** DEADLOCK ***
    
    [ 3290.970321] 7 locks held by systemd-sleep/4553:
    [ 3290.970325]  #0: ffff888103bcd448 (sb_writers#4){.+.+}-{0:0}, at: ksys_write+0xa7/0xe0
    [ 3290.970341]  #1: ffff888115a14488 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x103/0x1b0
    [ 3290.970355]  #2: ffff888100f719e0 (kn->active#233){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x10c/0x1b0
    [ 3290.970369]  #3: ffffffff82661048 (autosleep_lock){+.+.}-{3:3}, at: state_store+0x12/0x90
    [ 3290.970384]  #4: ffffffff82658ac8 (system_transition_mutex){+.+.}-{3:3}, at: pm_suspend+0x9f/0x310
    [ 3290.970399]  #5: ffffffff827f2a48 (acpi_scan_lock){+.+.}-{3:3}, at: acpi_suspend_begin+0x4c/0x80
    [ 3290.970416]  #6: ffffffff8280fca8 (dpm_list_mtx){+.+.}-{3:3}, at: dpm_resume+0x12e/0x3e0
    [ 3290.970428]
                   stack backtrace:
    [ 3290.970431] CPU: 3 PID: 4553 Comm: systemd-sleep Tainted: G S                5.15.0+ #2420
    [ 3290.970438] Hardware name: Dell Inc. XPS 13 9380/0RYJWW, BIOS 1.5.0 06/03/2019
    [ 3290.970441] Call Trace:
    [ 3290.970446]  dump_stack_lvl+0x44/0x57
    [ 3290.970454]  check_noncircular+0x105/0x120
    [ 3290.970468]  ? __lock_acquire+0x15cb/0x1b50
    [ 3290.970474]  __lock_acquire+0x15cb/0x1b50
    [ 3290.970487]  lock_acquire+0x26c/0x300
    [ 3290.970493]  ? flush_workqueue+0x87/0x4a0
    [ 3290.970503]  ? __raw_spin_lock_init+0x3b/0x60
    [ 3290.970510]  ? lockdep_init_map_type+0x58/0x240
    [ 3290.970519]  flush_workqueue+0xae/0x4a0
    [ 3290.970526]  ? flush_workqueue+0x87/0x4a0
    [ 3290.970544]  ? drain_workqueue+0xa1/0x130
    [ 3290.970552]  drain_workqueue+0xa1/0x130
    [ 3290.970561]  destroy_workqueue+0x34/0x1f0
    [ 3290.970572]  hci_release_dev+0x49/0x180 [bluetooth]
    [ 3290.970624]  bt_host_release+0x1d/0x30 [bluetooth]
    [ 3290.970687]  device_release+0x33/0x90
    [ 3290.970695]  kobject_release+0x63/0x160
    [ 3290.970705]  dpm_resume+0x164/0x3e0
    [ 3290.970710]  ? dpm_resume_early+0x251/0x3b0
    [ 3290.970718]  dpm_resume_end+0xd/0x20
    [ 3290.970723]  suspend_devices_and_enter+0x1a4/0xba0
    [ 3290.970737]  pm_suspend+0x26b/0x310
    [ 3290.970746]  state_store+0x42/0x90
    [ 3290.970755]  kernfs_fop_write_iter+0x135/0x1b0
    [ 3290.970764]  new_sync_write+0x125/0x1c0
    [ 3290.970777]  vfs_write+0x360/0x3c0
    [ 3290.970785]  ksys_write+0xa7/0xe0
    [ 3290.970794]  do_syscall_64+0x3a/0x80
    [ 3290.970803]  entry_SYSCALL_64_after_hwframe+0x44/0xae
    [ 3290.970811] RIP: 0033:0x7f41b1328164
    [ 3290.970819] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 80 00 00 00 00 8b 05 4a d2 2c 00 48 63 ff 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 f3 c3 66 90 55 53 48 89 d5 48 89 f3 48 83
    [ 3290.970824] RSP: 002b:00007ffe6ae21b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
    [ 3290.970831] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f41b1328164
    [ 3290.970836] RDX: 0000000000000004 RSI: 000055965e651070 RDI: 0000000000000004
    [ 3290.970839] RBP: 000055965e651070 R08: 000055965e64f390 R09: 00007f41b1e3d1c0
    [ 3290.970843] R10: 000000000000000a R11: 0000000000000246 R12: 0000000000000004
    [ 3290.970846] R13: 0000000000000001 R14: 000055965e64f2b0 R15: 0000000000000004
    
    Cc: All applicable <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rafaeljw authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    051d89f View commit details
    Browse the repository at this point in the history
  175. s390/cpumf: cpum_cf PMU displays invalid value after hotplug remove

    commit 9d48c7a upstream.
    
    When a CPU is hotplugged while the perf stat -e cycles command is
    running, a wrong (very large) value is displayed immediately after the
    CPU removal:
    
      Check the values, shouldn't be too high as in
                time             counts unit events
         1.001101919           29261846      cycles
         2.002454499           17523405      cycles
         3.003659292           24361161      cycles
         4.004816983 18446744073638406144      cycles
         5.005671647      <not counted>      cycles
         ...
    
    The CPU hotplug off took place after 3 seconds.
    The issue is the read of the event count value after 4 seconds when
    the CPU is not available and the read of the counter returns an
    error. This is treated as a counter value of zero. This results
    in a very large value (0 - previous_value).
    
    Fix this by detecting the hotplugged off CPU and report 0 instead
    of a very large number.
    
    Cc: [email protected]
    Fixes: a029a4e ("s390/cpumf: Allow concurrent access for CPU Measurement Counter Facility")
    Reported-by: Sumanth Korikkar <[email protected]>
    Signed-off-by: Thomas Richter <[email protected]>
    Reviewed-by: Sumanth Korikkar <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Thomas Richter authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    32f71f3 View commit details
    Browse the repository at this point in the history
  176. s390/cio: check the subchannel validity for dev_busid

    commit a4751f1 upstream.
    
    Check the validity of subchanel before reading other fields in
    the schib.
    
    Fixes: d3683c0 ("s390/cio: add dev_busid sysfs entry for each subchannel")
    CC: <[email protected]>
    Reported-by: Cornelia Huck <[email protected]>
    Signed-off-by: Vineeth Vijayan <[email protected]>
    Reviewed-by: Cornelia Huck <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vasily Gorbik <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vneethv authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f33bf60 View commit details
    Browse the repository at this point in the history
  177. s390/tape: fix timer initialization in tape_std_assign()

    commit 213fca9 upstream.
    
    commit 9c6c273 ("timer: Remove init_timer_on_stack() in favor
    of timer_setup_on_stack()") changed the timer setup from
    init_timer_on_stack(() to timer_setup(), but missed to change the
    mod_timer() call. And while at it, use msecs_to_jiffies() instead
    of the open coded timeout calculation.
    
    Cc: [email protected]
    Fixes: 9c6c273 ("timer: Remove init_timer_on_stack() in favor of timer_setup_on_stack()")
    Signed-off-by: Sven Schnelle <[email protected]>
    Reviewed-by: Vasily Gorbik <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    svens-s390 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3134c31 View commit details
    Browse the repository at this point in the history
  178. s390/ap: Fix hanging ioctl caused by orphaned replies

    commit 3826350 upstream.
    
    When a queue is switched to soft offline during heavy load and later
    switched to soft online again and now used, it may be that the caller
    is blocked forever in the ioctl call.
    
    The failure occurs because there is a pending reply after the queue(s)
    have been switched to offline. This orphaned reply is received when
    the queue is switched to online and is accidentally counted for the
    outstanding replies. So when there was a valid outstanding reply and
    this orphaned reply is received it counts as the outstanding one thus
    dropping the outstanding counter to 0. Voila, with this counter the
    receive function is not called any more and the real outstanding reply
    is never received (until another request comes in...) and the ioctl
    blocks.
    
    The fix is simple. However, instead of readjusting the counter when an
    orphaned reply is detected, I check the queue status for not empty and
    compare this to the outstanding counter. So if the queue is not empty
    then the counter must not drop to 0 but at least have a value of 1.
    
    Signed-off-by: Harald Freudenberger <[email protected]>
    Cc: [email protected]
    Signed-off-by: Vasily Gorbik <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hfreude authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3ef2272 View commit details
    Browse the repository at this point in the history
  179. s390/cio: make ccw_device_dma_* more robust

    commit ad9a145 upstream.
    
    Since commit 48720ba ("virtio/s390: use DMA memory for ccw I/O and
    classic notifiers") we were supposed to make sure that
    virtio_ccw_release_dev() completes before the ccw device and the
    attached dma pool are torn down, but unfortunately we did not.  Before
    that commit it used to be OK to delay cleaning up the memory allocated
    by virtio-ccw indefinitely (which isn't really intuitive for guys used
    to destruction happens in reverse construction order), but now we
    trigger a BUG_ON if the genpool is destroyed before all memory allocated
    from it is deallocated. Which brings down the guest. We can observe this
    problem, when unregister_virtio_device() does not give up the last
    reference to the virtio_device (e.g. because a virtio-scsi attached scsi
    disk got removed without previously unmounting its previously mounted
    partition).
    
    To make sure that the genpool is only destroyed after all the necessary
    freeing is done let us take a reference on the ccw device on each
    ccw_device_dma_zalloc() and give it up on each ccw_device_dma_free().
    
    Actually there are multiple approaches to fixing the problem at hand
    that can work. The upside of this one is that it is the safest one while
    remaining simple. We don't crash the guest even if the driver does not
    pair allocations and frees. The downside is the reference counting
    overhead, that the reference counting for ccw devices becomes more
    complex, in a sense that we need to pair the calls to the aforementioned
    functions for it to be correct, and that if we happen to leak, we leak
    more than necessary (the whole ccw device instead of just the genpool).
    
    Some alternatives to this approach are taking a reference in
    virtio_ccw_online() and giving it up in virtio_ccw_release_dev() or
    making sure virtio_ccw_release_dev() completes its work before
    virtio_ccw_remove() returns. The downside of these approaches is that
    these are less safe against programming errors.
    
    Cc: <[email protected]> # v5.3
    Signed-off-by: Halil Pasic <[email protected]>
    Fixes: 48720ba ("virtio/s390: use DMA memory for ccw I/O and classic notifiers")
    Reported-by: [email protected]
    Reviewed-by: Vineeth Vijayan <[email protected]>
    Acked-by: Cornelia Huck <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    halil-pasic authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    ed8b06a View commit details
    Browse the repository at this point in the history
  180. remoteproc: elf_loader: Fix loading segment when is_iomem true

    commit 24acbd9 upstream.
    
    It seems luckliy work on i.MX platform, but it is wrong.
    Need use memcpy_toio, not memcpy_fromio.
    
    Fixes: 40df0a9 ("remoteproc: add is_iomem to da_to_va")
    Tested-by: Dong Aisheng <[email protected]> (i.MX8MQ)
    Reported-by: kernel test robot <[email protected]>
    Reported-by: Dong Aisheng <[email protected]>
    Signed-off-by: Peng Fan <[email protected]>
    Cc: stable <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mathieu Poirier <[email protected]>
    Signed-off-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    MrVan authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6b8ea5d View commit details
    Browse the repository at this point in the history
  181. remoteproc: Fix the wrong default value of is_iomem

    commit 970675f upstream.
    
    Currently the is_iomem is a random value in the stack which may
    be default to true even on those platforms that not use iomem to
    store firmware.
    
    Cc: Bjorn Andersson <[email protected]>
    Cc: Mathieu Poirier <[email protected]>
    Fixes: 40df0a9 ("remoteproc: add is_iomem to da_to_va")
    Reviewed-and-tested-by: Peng Fan <[email protected]>
    Signed-off-by: Dong Aisheng <[email protected]>
    Signed-off-by: Peng Fan <[email protected]>
    Cc: stable <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mathieu Poirier <[email protected]>
    Signed-off-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Dong Aisheng authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3ff5812 View commit details
    Browse the repository at this point in the history
  182. remoteproc: imx_rproc: Fix ignoring mapping vdev regions

    commit afe670e upstream.
    
    vdev regions are typically named vdev0buffer, vdev0ring0, vdev0ring1 and
    etc. Change to strncmp to cover them all.
    
    Fixes: 8f2d896 ("remoteproc: imx_rproc: ignore mapping vdev regions")
    Reviewed-and-tested-by: Peng Fan <[email protected]>
    Signed-off-by: Dong Aisheng <[email protected]>
    Signed-off-by: Peng Fan <[email protected]>
    Cc: stable <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mathieu Poirier <[email protected]>
    Signed-off-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Dong Aisheng authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    5cd8612 View commit details
    Browse the repository at this point in the history
  183. remoteproc: imx_rproc: Fix rsc-table name

    commit e90547d upstream.
    
    Usually the dash '-'  is preferred in node name.
    So far, not dts in upstream kernel, so we just update node name
    in driver.
    
    Cc: Bjorn Andersson <[email protected]>
    Cc: Mathieu Poirier <[email protected]>
    Fixes: 5e4c124 ("remoteproc: imx_rproc: support remote cores booted before Linux Kernel")
    Reviewed-and-tested-by: Peng Fan <[email protected]>
    Signed-off-by: Dong Aisheng <[email protected]>
    Signed-off-by: Peng Fan <[email protected]>
    Cc: stable <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mathieu Poirier <[email protected]>
    Signed-off-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Dong Aisheng authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    bcd526c View commit details
    Browse the repository at this point in the history
  184. mtd: rawnand: fsmc: Fix use of SM ORDER

    commit 9be1446 upstream.
    
    The introduction of the generic ECC engine API lead to a number of
    changes in various drivers which broke some of them. Here is a typical
    example: I expected the SM_ORDER option to be handled by the Hamming ECC
    engine internals. Problem: the fsmc driver does not instantiate (yet) a
    real ECC engine object so we had to use a 'bare' ECC helper instead of
    the shiny rawnand functions. However, when not intializing this engine
    properly and using the bare helpers, we do not get the SM ORDER feature
    handled automatically. It looks like this was lost in the process so
    let's ensure we use the right SM ORDER now.
    
    Fixes: ad9ffdc ("mtd: rawnand: fsmc: Fix external use of SW Hamming ECC helper")
    Cc: [email protected]
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    bedb039 View commit details
    Browse the repository at this point in the history
  185. mtd: rawnand: ams-delta: Keep the driver compatible with on-die ECC e…

    …ngines
    
    commit d707bb7 upstream.
    
    Following the introduction of the generic ECC engine infrastructure, it
    was necessary to reorganize the code and move the ECC configuration in
    the ->attach_chip() hook. Failing to do that properly lead to a first
    series of fixes supposed to stabilize the situation. Unfortunately, this
    only fixed the use of software ECC engines, preventing any other kind of
    engine to be used, including on-die ones.
    
    It is now time to (finally) fix the situation by ensuring that we still
    provide a default (eg. software ECC) but will still support different
    ECC engines such as on-die ECC engines if properly described in the
    device tree.
    
    There are no changes needed on the core side in order to do this, but we
    just need to leverage the logic there which allows:
    1- a subsystem default (set to Host engines in the raw NAND world)
    2- a driver specific default (here set to software ECC engines)
    3- any type of engine requested by the user (ie. described in the DT)
    
    As the raw NAND subsystem has not yet been fully converted to the ECC
    engine infrastructure, in order to provide a default ECC engine for this
    driver we need to set chip->ecc.engine_type *before* calling
    nand_scan(). During the initialization step, the core will consider this
    entry as the default engine for this driver. This value may of course
    be overloaded by the user if the usual DT properties are provided.
    
    Fixes: 59d9347 ("mtd: rawnand: ams-delta: Move the ECC initialization to ->attach_chip()")
    Cc: [email protected]
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9bfee3c View commit details
    Browse the repository at this point in the history
  186. mtd: rawnand: xway: Keep the driver compatible with on-die ECC engines

    commit 6bcd296 upstream.
    
    Following the introduction of the generic ECC engine infrastructure, it
    was necessary to reorganize the code and move the ECC configuration in
    the ->attach_chip() hook. Failing to do that properly lead to a first
    series of fixes supposed to stabilize the situation. Unfortunately, this
    only fixed the use of software ECC engines, preventing any other kind of
    engine to be used, including on-die ones.
    
    It is now time to (finally) fix the situation by ensuring that we still
    provide a default (eg. software ECC) but will still support different
    ECC engines such as on-die ECC engines if properly described in the
    device tree.
    
    There are no changes needed on the core side in order to do this, but we
    just need to leverage the logic there which allows:
    1- a subsystem default (set to Host engines in the raw NAND world)
    2- a driver specific default (here set to software ECC engines)
    3- any type of engine requested by the user (ie. described in the DT)
    
    As the raw NAND subsystem has not yet been fully converted to the ECC
    engine infrastructure, in order to provide a default ECC engine for this
    driver we need to set chip->ecc.engine_type *before* calling
    nand_scan(). During the initialization step, the core will consider this
    entry as the default engine for this driver. This value may of course
    be overloaded by the user if the usual DT properties are provided.
    
    Fixes: d525914 ("mtd: rawnand: xway: Move the ECC initialization to ->attach_chip()")
    Cc: [email protected]
    Cc: Jan Hoffmann <[email protected]>
    Cc: Kestrel seventyfour <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Tested-by: Jan Hoffmann <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    f7e59eb View commit details
    Browse the repository at this point in the history
  187. mtd: rawnand: mpc5121: Keep the driver compatible with on-die ECC eng…

    …ines
    
    commit f9d8570 upstream.
    
    Following the introduction of the generic ECC engine infrastructure, it
    was necessary to reorganize the code and move the ECC configuration in
    the ->attach_chip() hook. Failing to do that properly lead to a first
    series of fixes supposed to stabilize the situation. Unfortunately, this
    only fixed the use of software ECC engines, preventing any other kind of
    engine to be used, including on-die ones.
    
    It is now time to (finally) fix the situation by ensuring that we still
    provide a default (eg. software ECC) but will still support different
    ECC engines such as on-die ECC engines if properly described in the
    device tree.
    
    There are no changes needed on the core side in order to do this, but we
    just need to leverage the logic there which allows:
    1- a subsystem default (set to Host engines in the raw NAND world)
    2- a driver specific default (here set to software ECC engines)
    3- any type of engine requested by the user (ie. described in the DT)
    
    As the raw NAND subsystem has not yet been fully converted to the ECC
    engine infrastructure, in order to provide a default ECC engine for this
    driver we need to set chip->ecc.engine_type *before* calling
    nand_scan(). During the initialization step, the core will consider this
    entry as the default engine for this driver. This value may of course
    be overloaded by the user if the usual DT properties are provided.
    
    Fixes: 6dd09f7 ("mtd: rawnand: mpc5121: Move the ECC initialization to ->attach_chip()")
    Cc: [email protected]
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    365b3fe View commit details
    Browse the repository at this point in the history
  188. mtd: rawnand: gpio: Keep the driver compatible with on-die ECC engines

    commit b5b5b4d upstream.
    
    Following the introduction of the generic ECC engine infrastructure, it
    was necessary to reorganize the code and move the ECC configuration in
    the ->attach_chip() hook. Failing to do that properly lead to a first
    series of fixes supposed to stabilize the situation. Unfortunately, this
    only fixed the use of software ECC engines, preventing any other kind of
    engine to be used, including on-die ones.
    
    It is now time to (finally) fix the situation by ensuring that we still
    provide a default (eg. software ECC) but will still support different
    ECC engines such as on-die ECC engines if properly described in the
    device tree.
    
    There are no changes needed on the core side in order to do this, but we
    just need to leverage the logic there which allows:
    1- a subsystem default (set to Host engines in the raw NAND world)
    2- a driver specific default (here set to software ECC engines)
    3- any type of engine requested by the user (ie. described in the DT)
    
    As the raw NAND subsystem has not yet been fully converted to the ECC
    engine infrastructure, in order to provide a default ECC engine for this
    driver we need to set chip->ecc.engine_type *before* calling
    nand_scan(). During the initialization step, the core will consider this
    entry as the default engine for this driver. This value may of course
    be overloaded by the user if the usual DT properties are provided.
    
    Fixes: f6341f6 ("mtd: rawnand: gpio: Move the ECC initialization to ->attach_chip()")
    Cc: [email protected]
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d9d3d38 View commit details
    Browse the repository at this point in the history
  189. mtd: rawnand: pasemi: Keep the driver compatible with on-die ECC engines

    commit f16b7d2 upstream.
    
    Following the introduction of the generic ECC engine infrastructure, it
    was necessary to reorganize the code and move the ECC configuration in
    the ->attach_chip() hook. Failing to do that properly lead to a first
    series of fixes supposed to stabilize the situation. Unfortunately, this
    only fixed the use of software ECC engines, preventing any other kind of
    engine to be used, including on-die ones.
    
    It is now time to (finally) fix the situation by ensuring that we still
    provide a default (eg. software ECC) but will still support different
    ECC engines such as on-die ECC engines if properly described in the
    device tree.
    
    There are no changes needed on the core side in order to do this, but we
    just need to leverage the logic there which allows:
    1- a subsystem default (set to Host engines in the raw NAND world)
    2- a driver specific default (here set to software ECC engines)
    3- any type of engine requested by the user (ie. described in the DT)
    
    As the raw NAND subsystem has not yet been fully converted to the ECC
    engine infrastructure, in order to provide a default ECC engine for this
    driver we need to set chip->ecc.engine_type *before* calling
    nand_scan(). During the initialization step, the core will consider this
    entry as the default engine for this driver. This value may of course
    be overloaded by the user if the usual DT properties are provided.
    
    Fixes: 8fc6f1f ("mtd: rawnand: pasemi: Move the ECC initialization to ->attach_chip()")
    Cc: [email protected]
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    2b33e01 View commit details
    Browse the repository at this point in the history
  190. mtd: rawnand: orion: Keep the driver compatible with on-die ECC engines

    commit 194ac63 upstream.
    
    Following the introduction of the generic ECC engine infrastructure, it
    was necessary to reorganize the code and move the ECC configuration in
    the ->attach_chip() hook. Failing to do that properly lead to a first
    series of fixes supposed to stabilize the situation. Unfortunately, this
    only fixed the use of software ECC engines, preventing any other kind of
    engine to be used, including on-die ones.
    
    It is now time to (finally) fix the situation by ensuring that we still
    provide a default (eg. software ECC) but will still support different
    ECC engines such as on-die ECC engines if properly described in the
    device tree.
    
    There are no changes needed on the core side in order to do this, but we
    just need to leverage the logic there which allows:
    1- a subsystem default (set to Host engines in the raw NAND world)
    2- a driver specific default (here set to software ECC engines)
    3- any type of engine requested by the user (ie. described in the DT)
    
    As the raw NAND subsystem has not yet been fully converted to the ECC
    engine infrastructure, in order to provide a default ECC engine for this
    driver we need to set chip->ecc.engine_type *before* calling
    nand_scan(). During the initialization step, the core will consider this
    entry as the default engine for this driver. This value may of course
    be overloaded by the user if the usual DT properties are provided.
    
    Fixes: 553508c ("mtd: rawnand: orion: Move the ECC initialization to ->attach_chip()")
    Cc: [email protected]
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    768e8c3 View commit details
    Browse the repository at this point in the history
  191. mtd: rawnand: plat_nand: Keep the driver compatible with on-die ECC e…

    …ngines
    
    commit 325fd53 upstream.
    
    Following the introduction of the generic ECC engine infrastructure, it
    was necessary to reorganize the code and move the ECC configuration in
    the ->attach_chip() hook. Failing to do that properly lead to a first
    series of fixes supposed to stabilize the situation. Unfortunately, this
    only fixed the use of software ECC engines, preventing any other kind of
    engine to be used, including on-die ones.
    
    It is now time to (finally) fix the situation by ensuring that we still
    provide a default (eg. software ECC) but will still support different
    ECC engines such as on-die ECC engines if properly described in the
    device tree.
    
    There are no changes needed on the core side in order to do this, but we
    just need to leverage the logic there which allows:
    1- a subsystem default (set to Host engines in the raw NAND world)
    2- a driver specific default (here set to software ECC engines)
    3- any type of engine requested by the user (ie. described in the DT)
    
    As the raw NAND subsystem has not yet been fully converted to the ECC
    engine infrastructure, in order to provide a default ECC engine for this
    driver we need to set chip->ecc.engine_type *before* calling
    nand_scan(). During the initialization step, the core will consider this
    entry as the default engine for this driver. This value may of course
    be overloaded by the user if the usual DT properties are provided.
    
    Fixes: 612e048 ("mtd: rawnand: plat_nand: Move the ECC initialization to ->attach_chip()")
    Cc: [email protected]
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    ac4e55c View commit details
    Browse the repository at this point in the history
  192. mtd: rawnand: au1550nd: Keep the driver compatible with on-die ECC en…

    …gines
    
    commit 7e3cdba upstream.
    
    Following the introduction of the generic ECC engine infrastructure, it
    was necessary to reorganize the code and move the ECC configuration in
    the ->attach_chip() hook. Failing to do that properly lead to a first
    series of fixes supposed to stabilize the situation. Unfortunately, this
    only fixed the use of software ECC engines, preventing any other kind of
    engine to be used, including on-die ones.
    
    It is now time to (finally) fix the situation by ensuring that we still
    provide a default (eg. software ECC) but will still support different
    ECC engines such as on-die ECC engines if properly described in the
    device tree.
    
    There are no changes needed on the core side in order to do this, but we
    just need to leverage the logic there which allows:
    1- a subsystem default (set to Host engines in the raw NAND world)
    2- a driver specific default (here set to software ECC engines)
    3- any type of engine requested by the user (ie. described in the DT)
    
    As the raw NAND subsystem has not yet been fully converted to the ECC
    engine infrastructure, in order to provide a default ECC engine for this
    driver we need to set chip->ecc.engine_type *before* calling
    nand_scan(). During the initialization step, the core will consider this
    entry as the default engine for this driver. This value may of course
    be overloaded by the user if the usual DT properties are provided.
    
    Fixes: dbffc8c ("mtd: rawnand: au1550: Move the ECC initialization to ->attach_chip()")
    Cc: [email protected]
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    b75b27e View commit details
    Browse the repository at this point in the history
  193. powerpc/vas: Fix potential NULL pointer dereference

    commit 61cb9ac upstream.
    
    (!ptr && !ptr->foo) strikes again. :)
    
    The expression (!ptr && !ptr->foo) is bogus and in case ptr is NULL,
    it leads to a NULL pointer dereference: ptr->foo.
    
    Fix this by converting && to ||
    
    This issue was detected with the help of Coccinelle, and audited and
    fixed manually.
    
    Fixes: 1a0d0d5 ("powerpc/vas: Add platform specific user window operations")
    Cc: [email protected]
    Signed-off-by: Gustavo A. R. Silva <[email protected]>
    Reviewed-by: Tyrel Datwyler <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/20211015050345.GA1161918@embeddedor
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    GustavoARSilva authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    0356cc5 View commit details
    Browse the repository at this point in the history
  194. powerpc/bpf: Fix write protecting JIT code

    commit 44a8214 upstream.
    
    Running program with bpf-to-bpf function calls results in data access
    exception (0x300) with the below call trace:
    
      bpf_int_jit_compile+0x238/0x750 (unreliable)
      bpf_check+0x2008/0x2710
      bpf_prog_load+0xb00/0x13a0
      __sys_bpf+0x6f4/0x27c0
      sys_bpf+0x2c/0x40
      system_call_exception+0x164/0x330
      system_call_vectored_common+0xe8/0x278
    
    as bpf_int_jit_compile() tries writing to write protected JIT code
    location during the extra pass.
    
    Fix it by holding off write protection of JIT code until the extra
    pass, where branch target addresses fixup happens.
    
    Fixes: 62e3d42 ("powerpc/bpf: Write protect JIT code")
    Cc: [email protected] # v5.14+
    Signed-off-by: Hari Bathini <[email protected]>
    Reviewed-by: Naveen N. Rao <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hbathini authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6f657bb View commit details
    Browse the repository at this point in the history
  195. powerpc/32e: Ignore ESR in instruction storage interrupt handler

    commit 8129138 upstream.
    
    A e5500 machine running a 32-bit kernel sometimes hangs at boot,
    seemingly going into an infinite loop of instruction storage interrupts.
    
    The ESR (Exception Syndrome Register) has a value of 0x800000 (store)
    when this happens, which is likely set by a previous store. An
    instruction TLB miss interrupt would then leave ESR unchanged, and if no
    PTE exists it calls directly to the instruction storage interrupt
    handler without changing ESR.
    
    access_error() does not cause a segfault due to a store to a read-only
    vma because is_exec is true. Most subsequent fault handling does not
    check for a write fault on a read-only vma, and might do strange things
    like create a writeable PTE or call page_mkwrite on a read only vma or
    file. It's not clear what happens here to cause the infinite faulting in
    this case, a fault handler failure or low level PTE or TLB handling.
    
    In any case this can be fixed by having the instruction storage
    interrupt zero regs->dsisr rather than storing the ESR value to it.
    
    Fixes: a01a3f2 ("powerpc: remove arguments from fault handler functions")
    Cc: [email protected] # v5.12+
    Reported-by: Jacques de Laval <[email protected]>
    Signed-off-by: Nicholas Piggin <[email protected]>
    Tested-by: Jacques de Laval <[email protected]>
    Reviewed-by: Christophe Leroy <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    npiggin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    317cc5b View commit details
    Browse the repository at this point in the history
  196. powerpc/powernv/prd: Unregister OPAL_MSG_PRD2 notifier during module …

    …unload
    
    commit 52862ab upstream.
    
    Commit 587164c, introduced new opal message type (OPAL_MSG_PRD2) and
    added opal notifier. But I missed to unregister the notifier during
    module unload path. This results in below call trace if you try to
    unload and load opal_prd module.
    
    Also add new notifier_block for OPAL_MSG_PRD2 message.
    
    Sample calltrace (modprobe -r opal_prd; modprobe opal_prd)
      BUG: Unable to handle kernel data access on read at 0xc0080000192200e0
      Faulting instruction address: 0xc00000000018d1cc
      Oops: Kernel access of bad area, sig: 11 [#1]
      LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV
      CPU: 66 PID: 7446 Comm: modprobe Kdump: loaded Tainted: G            E     5.14.0prd torvalds#759
      NIP:  c00000000018d1cc LR: c00000000018d2a8 CTR: c0000000000cde10
      REGS: c0000003c4c0f0a0 TRAP: 0300   Tainted: G            E      (5.14.0prd)
      MSR:  9000000002009033 <SF,HV,VEC,EE,ME,IR,DR,RI,LE>  CR: 24224824  XER: 20040000
      CFAR: c00000000018d2a4 DAR: c0080000192200e0 DSISR: 40000000 IRQMASK: 1
      ...
      NIP notifier_chain_register+0x2c/0xc0
      LR  atomic_notifier_chain_register+0x48/0x80
      Call Trace:
        0xc000000002090610 (unreliable)
        atomic_notifier_chain_register+0x58/0x80
        opal_message_notifier_register+0x7c/0x1e0
        opal_prd_probe+0x84/0x150 [opal_prd]
        platform_probe+0x78/0x130
        really_probe+0x110/0x5d0
        __driver_probe_device+0x17c/0x230
        driver_probe_device+0x60/0x130
        __driver_attach+0xfc/0x220
        bus_for_each_dev+0xa8/0x130
        driver_attach+0x34/0x50
        bus_add_driver+0x1b0/0x300
        driver_register+0x98/0x1a0
        __platform_driver_register+0x38/0x50
        opal_prd_driver_init+0x34/0x50 [opal_prd]
        do_one_initcall+0x60/0x2d0
        do_init_module+0x7c/0x320
        load_module+0x3394/0x3650
        __do_sys_finit_module+0xd4/0x160
        system_call_exception+0x140/0x290
        system_call_common+0xf4/0x258
    
    Fixes: 587164c ("powerpc/powernv: Add new opal message type")
    Cc: [email protected] # v5.4+
    Signed-off-by: Vasant Hegde <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Vasant Hegde authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    7c8ad3f View commit details
    Browse the repository at this point in the history
  197. powerpc/security: Use a mutex for interrupt exit code patching

    commit 3c12b4d upstream.
    
    The mitigation-patching.sh script in the powerpc selftests toggles
    all mitigations on and off simultaneously, revealing that rfi_flush
    and stf_barrier cannot safely operate at the same time due to races
    in updating the static key.
    
    On some systems, the static key code throws a warning and the kernel
    remains functional.  On others, the kernel will hang or crash.
    
    Fix this by slapping on a mutex.
    
    Fixes: 1379974 ("powerpc/64: use interrupt restart table to speed up return from interrupt")
    Cc: [email protected] # v5.14+
    Signed-off-by: Russell Currey <[email protected]>
    Acked-by: Nicholas Piggin <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ruscur authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    02da363 View commit details
    Browse the repository at this point in the history
  198. powerpc/64s/interrupt: Fix check_return_regs_valid() false positive

    commit 4a5cb51 upstream.
    
    The check_return_regs_valid() can cause a false positive if the return
    regs are marked as norestart and they are an HSRR type interrupt,
    because the low bit in the bottom of regs->trap causes interrupt type
    matching to fail.
    
    This can occcur for example on bare metal with a HV privileged doorbell
    interrupt that causes a signal, but do_signal returns early because
    get_signal() fails, and takes the "No signal to deliver" path. In this
    case no signal was delivered so the return location is not changed so
    return SRRs are not invalidated, yet set_trap_norestart is called, which
    messes up the match. Building go-1.16.6 is known to reproduce this.
    
    Fix it by using the TRAP() accessor which masks out the low bit.
    
    Fixes: 6eaaf9d ("powerpc/64s/interrupt: Check and fix srr_valid without crashing")
    Cc: [email protected] # v5.14+
    Signed-off-by: Nicholas Piggin <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    npiggin authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d05dc4b View commit details
    Browse the repository at this point in the history
  199. powerpc/pseries/mobility: ignore ibm, platform-facilities updates

    commit 319fa1a upstream.
    
    On VMs with NX encryption, compression, and/or RNG offload, these
    capabilities are described by nodes in the ibm,platform-facilities device
    tree hierarchy:
    
      $ tree -d /sys/firmware/devicetree/base/ibm,platform-facilities/
      /sys/firmware/devicetree/base/ibm,platform-facilities/
      ├── ibm,compression-v1
      ├── ibm,random-v1
      └── ibm,sym-encryption-v1
    
      3 directories
    
    The acceleration functions that these nodes describe are not disrupted by
    live migration, not even temporarily.
    
    But the post-migration ibm,update-nodes sequence firmware always sends
    "delete" messages for this hierarchy, followed by an "add" directive to
    reconstruct it via ibm,configure-connector (log with debugging statements
    enabled in mobility.c):
    
      mobility: removing node /ibm,platform-facilities/ibm,random-v1:4294967285
      mobility: removing node /ibm,platform-facilities/ibm,compression-v1:4294967284
      mobility: removing node /ibm,platform-facilities/ibm,sym-encryption-v1:4294967283
      mobility: removing node /ibm,platform-facilities:4294967286
      ...
      mobility: added node /ibm,platform-facilities:4294967286
    
    Note we receive a single "add" message for the entire hierarchy, and what
    we receive from the ibm,configure-connector sequence is the top-level
    platform-facilities node along with its three children. The debug message
    simply reports the parent node and not the whole subtree.
    
    Also, significantly, the nodes added are almost completely equivalent to
    the ones removed; even phandles are unchanged. ibm,shared-interrupt-pool in
    the leaf nodes is the only property I've observed to differ, and Linux does
    not use that. So in practice, the sum of update messages Linux receives for
    this hierarchy is equivalent to minor property updates.
    
    We succeed in removing the original hierarchy from the device tree. But the
    vio bus code is ignorant of this, and does not unbind or relinquish its
    references. The leaf nodes, still reachable through sysfs, of course still
    refer to the now-freed ibm,platform-facilities parent node, which makes
    use-after-free possible:
    
      refcount_t: addition on 0; use-after-free.
      WARNING: CPU: 3 PID: 1706 at lib/refcount.c:25 refcount_warn_saturate+0x164/0x1f0
      refcount_warn_saturate+0x160/0x1f0 (unreliable)
      kobject_get+0xf0/0x100
      of_node_get+0x30/0x50
      of_get_parent+0x50/0xb0
      of_fwnode_get_parent+0x54/0x90
      fwnode_count_parents+0x50/0x150
      fwnode_full_name_string+0x30/0x110
      device_node_string+0x49c/0x790
      vsnprintf+0x1c0/0x4c0
      sprintf+0x44/0x60
      devspec_show+0x34/0x50
      dev_attr_show+0x40/0xa0
      sysfs_kf_seq_show+0xbc/0x200
      kernfs_seq_show+0x44/0x60
      seq_read_iter+0x2a4/0x740
      kernfs_fop_read_iter+0x254/0x2e0
      new_sync_read+0x120/0x190
      vfs_read+0x1d0/0x240
    
    Moreover, the "new" replacement subtree is not correctly added to the
    device tree, resulting in ibm,platform-facilities parent node without the
    appropriate leaf nodes, and broken symlinks in the sysfs device hierarchy:
    
      $ tree -d /sys/firmware/devicetree/base/ibm,platform-facilities/
      /sys/firmware/devicetree/base/ibm,platform-facilities/
    
      0 directories
    
      $ cd /sys/devices/vio ; find . -xtype l -exec file {} +
      ./ibm,sym-encryption-v1/of_node: broken symbolic link to
        ../../../firmware/devicetree/base/ibm,platform-facilities/ibm,sym-encryption-v1
      ./ibm,random-v1/of_node:         broken symbolic link to
        ../../../firmware/devicetree/base/ibm,platform-facilities/ibm,random-v1
      ./ibm,compression-v1/of_node:    broken symbolic link to
        ../../../firmware/devicetree/base/ibm,platform-facilities/ibm,compression-v1
    
    This is because add_dt_node() -> dlpar_attach_node() attaches only the
    parent node returned from configure-connector, ignoring any children. This
    should be corrected for the general case, but fixing that won't help with
    the stale OF node references, which is the more urgent problem.
    
    One way to address that would be to make the drivers respond to node
    removal notifications, so that node references can be dropped
    appropriately. But this would likely force the drivers to disrupt active
    clients for no useful purpose: equivalent nodes are immediately re-added.
    And recall that the acceleration capabilities described by the nodes remain
    available throughout the whole process.
    
    The solution I believe to be robust for this situation is to convert
    remove+add of a node with an unchanged phandle to an update of the node's
    properties in the Linux device tree structure. That would involve changing
    and adding a fair amount of code, and may take several iterations to land.
    
    Until that can be realized we have a confirmed use-after-free and the
    possibility of memory corruption. So add a limited workaround that
    discriminates on the node type, ignoring adds and removes. This should be
    amenable to backporting in the meantime.
    
    Fixes: 410bccf ("powerpc/pseries: Partition migration in the kernel")
    Cc: [email protected]
    Signed-off-by: Nathan Lynch <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    nathanlynch authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    310b6f9 View commit details
    Browse the repository at this point in the history
  200. powerpc/85xx: fix timebase sync issue when CONFIG_HOTPLUG_CPU=n

    commit c45361a upstream.
    
    When CONFIG_SMP=y, timebase synchronization is required when the second
    kernel is started.
    
    arch/powerpc/kernel/smp.c:
      int __cpu_up(unsigned int cpu, struct task_struct *tidle)
      {
      	...
      	if (smp_ops->give_timebase)
      		smp_ops->give_timebase();
      	...
      }
    
      void start_secondary(void *unused)
      {
      	...
      	if (smp_ops->take_timebase)
      		smp_ops->take_timebase();
      	...
      }
    
    When CONFIG_HOTPLUG_CPU=n and CONFIG_KEXEC_CORE=n,
     smp_85xx_ops.give_timebase is NULL,
     smp_85xx_ops.take_timebase is NULL,
    As a result, the timebase is not synchronized.
    
    Timebase  synchronization does not depend on CONFIG_HOTPLUG_CPU.
    
    Fixes: 56f1ba2 ("powerpc/mpc85xx: refactor the PM operations")
    Cc: [email protected] # v4.6+
    Signed-off-by: Xiaoming Ni <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    nixiaoming authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    0084aaa View commit details
    Browse the repository at this point in the history
  201. drm/sun4i: Fix macros in sun8i_csc.h

    commit c302c98 upstream.
    
    Macros SUN8I_CSC_CTRL() and SUN8I_CSC_COEFF() don't follow usual
    recommendation of having arguments enclosed in parenthesis. While that
    didn't change anything for quite sometime, it actually become important
    after CSC code rework with commit ea067ae ("drm/sun4i: de2/de3:
    Remove redundant CSC matrices").
    
    Without this fix, colours are completely off for supported YVU formats
    on SoCs with DE2 (A64, H3, R40, etc.).
    
    Fix the issue by enclosing macro arguments in parenthesis.
    
    Cc: [email protected] # 5.12+
    Fixes: 8830293 ("drm/sun4i: Add DE2 CSC library")
    Reported-by: Roman Stratiienko <[email protected]>
    Signed-off-by: Jernej Skrabec <[email protected]>
    Reviewed-by: Chen-Yu Tsai <[email protected]>
    Signed-off-by: Maxime Ripard <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jernejsk authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    dfc6f0b View commit details
    Browse the repository at this point in the history
  202. PCI: Add PCI_EXP_DEVCTL_PAYLOAD_* macros

    commit 460275f upstream.
    
    Define a macro PCI_EXP_DEVCTL_PAYLOAD_* for every possible Max Payload
    Size in linux/pci_regs.h, in the same style as PCI_EXP_DEVCTL_READRQ_*.
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Marek Behún <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Reviewed-by: Marek Behún <[email protected]>
    Reviewed-by: Bjorn Helgaas <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pali authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    0b86872 View commit details
    Browse the repository at this point in the history
  203. PCI: aardvark: Fix PCIe Max Payload Size setting

    commit a4e17d6 upstream.
    
    Change PCIe Max Payload Size setting in PCIe Device Control register to 512
    bytes to align with PCIe Link Initialization sequence as defined in Marvell
    Armada 3700 Functional Specification. According to the specification,
    maximal Max Payload Size supported by this device is 512 bytes.
    
    Without this kernel prints suspicious line:
    
        pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 256 (was 16384, max 512)
    
    With this change it changes to:
    
        pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 256 (was 512, max 512)
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 8c39d71 ("PCI: aardvark: Add Aardvark PCI host controller driver")
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Marek Behún <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Reviewed-by: Marek Behún <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pali authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    7f83710 View commit details
    Browse the repository at this point in the history
  204. SUNRPC: Partial revert of commit 6f9f172

    commit ea7a101 upstream.
    
    The premise of commit 6f9f172 ("SUNRPC: Mitigate cond_resched() in
    xprt_transmit()") was that cond_resched() is expensive and unnecessary
    when there has been just a single send.
    The point of cond_resched() is to ensure that tasks that should pre-empt
    this one get a chance to do so when it is safe to do so. The code prior
    to commit 6f9f172 failed to take into account that it was keeping a
    rpc_task pinned for longer than it needed to, and so rather than doing a
    full revert, let's just move the cond_resched.
    
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Trond Myklebust authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3e1e7e4 View commit details
    Browse the repository at this point in the history
  205. drm/amd/display: Look at firmware version to determine using dmub on …

    …dcn21
    
    commit 91adec9 upstream.
    
    commit 652de07 ("drm/amd/display: Fully switch to dmub for all dcn21
    asics") switched over to using dmub on Renoir to fix Gitlab 1735, but this
    implied a new dependency on newer firmware which might not be met on older
    kernel versions.
    
    Since sw_init runs before hw_init, there is an opportunity to determine
    whether or not the firmware version is new to adjust the behavior.
    
    Cc: [email protected]
    BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1772
    BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1735
    Fixes: 652de07 ("drm/amd/display: Fully switch to dmub for all dcn21 asics")
    Signed-off-by: Mario Limonciello <[email protected]>
    Acked-by: Alex Deucher <[email protected]>
    Reviewed-by: Roman Li <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    bb7e50b View commit details
    Browse the repository at this point in the history
  206. media: vidtv: move kfree(dvb) to vidtv_bridge_dev_release()

    commit 112024a upstream.
    
    Adding kfree(dvb) to vidtv_bridge_remove() will remove the memory
    too soon: if an application still has an open filehandle to the device
    when the driver is unloaded, then when that filehandle is closed, a
    use-after-free access takes place to the freed memory.
    
    Move the kfree(dvb) to vidtv_bridge_dev_release() instead.
    
    Signed-off-by: Hans Verkuil <[email protected]>
    Fixes: 76e21bb ("media: vidtv: Fix memory leak in remove")
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Hans Verkuil authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    855eba6 View commit details
    Browse the repository at this point in the history
  207. cifs: fix memory leak of smb3_fs_context_dup::server_hostname

    commit 869da64 upstream.
    
    Fix memory leak of smb3_fs_context_dup::server_hostname when parsing
    and duplicating fs contexts during mount(2) as reported by kmemleak:
    
      unreferenced object 0xffff888125715c90 (size 16):
        comm "mount.cifs", pid 3832, jiffies 4304535868 (age 190.094s)
        hex dump (first 16 bytes):
          7a 65 6c 64 61 2e 74 65 73 74 00 6b 6b 6b 6b a5  zelda.test.kkkk.
        backtrace:
          [<ffffffff8168106e>] kstrdup+0x2e/0x60
          [<ffffffffa027a362>] smb3_fs_context_dup+0x392/0x8d0 [cifs]
          [<ffffffffa0136353>] cifs_smb3_do_mount+0x143/0x1700 [cifs]
          [<ffffffffa02795e8>] smb3_get_tree+0x2e8/0x520 [cifs]
          [<ffffffff817a19aa>] vfs_get_tree+0x8a/0x2d0
          [<ffffffff8181e3e3>] path_mount+0x423/0x1a10
          [<ffffffff8181fbca>] __x64_sys_mount+0x1fa/0x270
          [<ffffffff83ae364b>] do_syscall_64+0x3b/0x90
          [<ffffffff83c0007c>] entry_SYSCALL_64_after_hwframe+0x44/0xae
      unreferenced object 0xffff888111deed20 (size 32):
        comm "mount.cifs", pid 3832, jiffies 4304536044 (age 189.918s)
        hex dump (first 32 bytes):
          44 46 53 52 4f 4f 54 31 2e 5a 45 4c 44 41 2e 54  DFSROOT1.ZELDA.T
          45 53 54 00 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5  EST.kkkkkkkkkkk.
        backtrace:
          [<ffffffff8168118d>] kstrndup+0x2d/0x90
          [<ffffffffa027ab2e>] smb3_parse_devname+0x9e/0x360 [cifs]
          [<ffffffffa01870c8>] cifs_setup_volume_info+0xa8/0x470 [cifs]
          [<ffffffffa018c469>] connect_dfs_target+0x309/0xc80 [cifs]
          [<ffffffffa018d6cb>] cifs_mount+0x8eb/0x17f0 [cifs]
          [<ffffffffa0136475>] cifs_smb3_do_mount+0x265/0x1700 [cifs]
          [<ffffffffa02795e8>] smb3_get_tree+0x2e8/0x520 [cifs]
          [<ffffffff817a19aa>] vfs_get_tree+0x8a/0x2d0
          [<ffffffff8181e3e3>] path_mount+0x423/0x1a10
          [<ffffffff8181fbca>] __x64_sys_mount+0x1fa/0x270
          [<ffffffff83ae364b>] do_syscall_64+0x3b/0x90
          [<ffffffff83c0007c>] entry_SYSCALL_64_after_hwframe+0x44/0xae
    
    Fixes: 7be3248 ("cifs: To match file servers, make sure the server hostname matches")
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9ebaafe View commit details
    Browse the repository at this point in the history
  208. ath10k: fix invalid dma_addr_t token assignment

    commit 937e79c upstream.
    
    Using a kernel pointer in place of a dma_addr_t token can
    lead to undefined behavior if that makes it into cache
    management functions. The compiler caught one such attempt
    in a cast:
    
    drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_add_interface':
    drivers/net/wireless/ath/ath10k/mac.c:5586:47: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
     5586 |                         arvif->beacon_paddr = (dma_addr_t)arvif->beacon_buf;
          |                                               ^
    
    Looking through how this gets used down the way, I'm fairly
    sure that beacon_paddr is never accessed again for ATH10K_DEV_TYPE_HL
    devices, and if it was accessed, that would be a bug.
    
    Change the assignment to use a known-invalid address token
    instead, which avoids the warning and makes it easier to catch
    bugs if it does end up getting used.
    
    Fixes: e263bda ("ath10k: high latency fixes for beacon buffer")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Kalle Valo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    arndb authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6f11f20 View commit details
    Browse the repository at this point in the history
  209. mmc: moxart: Fix null pointer dereference on pointer host

    commit 0eab756 upstream.
    
    There are several error return paths that dereference the null pointer
    host because the pointer has not yet been set to a valid value.
    Fix this by adding a new out_mmc label and exiting via this label
    to avoid the host clean up and hence the null pointer dereference.
    
    Addresses-Coverity: ("Explicit null dereference")
    Fixes: 8105c2a ("mmc: moxart: Fix reference count leaks in moxart_probe")
    Signed-off-by: Colin Ian King <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Colin Ian King authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    32d126a View commit details
    Browse the repository at this point in the history
  210. selftests/x86/iopl: Adjust to the faked iopl CLI/STI usage

    commit a72fdfd upstream.
    
    Commit in Fixes changed the iopl emulation to not #GP on CLI and STI
    because it would break some insane luserspace tools which would toggle
    interrupts.
    
    The corresponding selftest would rely on the fact that executing CLI/STI
    would trigger a #GP and thus detect it this way but since that #GP is
    not happening anymore, the detection is now wrong too.
    
    Extend the test to actually look at the IF flag and whether executing
    those insns had any effect on it. The STI detection needs to have the
    fact that interrupts were previously disabled, passed in so do that from
    the previous CLI test, i.e., STI test needs to follow a previous CLI one
    for it to make sense.
    
    Fixes: b968e84 ("x86/iopl: Fake iopl(3) CLI/STI usage")
    Suggested-by: Thomas Gleixner <[email protected]>
    Signed-off-by: Borislav Petkov <[email protected]>
    Acked-by: Thomas Gleixner <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    suryasaimadhu authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    60e73f7 View commit details
    Browse the repository at this point in the history
  211. selftests/bpf: Fix also no-alu32 strobemeta selftest

    commit a20eac0 upstream.
    
    Previous fix aded bpf_clamp_umax() helper use to re-validate boundaries.
    While that works correctly, it introduces more branches, which blows up
    past 1 million instructions in no-alu32 variant of strobemeta selftests.
    
    Switching len variable from u32 to u64 also fixes the issue and reduces
    the number of validated instructions, so use that instead. Fix this
    patch and bpf_clamp_umax() removed, both alu32 and no-alu32 selftests
    pass.
    
    Fixes: 0133c20 ("selftests/bpf: Fix strobemeta selftest regression")
    Signed-off-by: Andrii Nakryiko <[email protected]>
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    anakryiko authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    03fbc93 View commit details
    Browse the repository at this point in the history
  212. arch/cc: Introduce a function to check for confidential computing fea…

    …tures
    
    commit 46b49b1 upstream.
    
    In preparation for other confidential computing technologies, introduce
    a generic helper function, cc_platform_has(), that can be used to
    check for specific active confidential computing attributes, like
    memory encryption. This is intended to eliminate having to add multiple
    technology-specific checks to the code (e.g. if (sev_active() ||
    tdx_active() || ... ).
    
     [ bp: s/_CC_PLATFORM_H/_LINUX_CC_PLATFORM_H/g ]
    
    Co-developed-by: Andi Kleen <[email protected]>
    Signed-off-by: Andi Kleen <[email protected]>
    Co-developed-by: Kuppuswamy Sathyanarayanan <[email protected]>
    Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]>
    Signed-off-by: Tom Lendacky <[email protected]>
    Signed-off-by: Borislav Petkov <[email protected]>
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tlendacky authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d156834 View commit details
    Browse the repository at this point in the history
  213. x86/sev: Add an x86 version of cc_platform_has()

    commit aa5a461 upstream.
    
    Introduce an x86 version of the cc_platform_has() function. This will be
    used to replace vendor specific calls like sme_active(), sev_active(),
    etc.
    
    Signed-off-by: Tom Lendacky <[email protected]>
    Signed-off-by: Borislav Petkov <[email protected]>
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tlendacky authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    411d939 View commit details
    Browse the repository at this point in the history
  214. x86/sev: Make the #VC exception stacks part of the default stacks sto…

    …rage
    
    commit 541ac97 upstream.
    
    The size of the exception stacks was increased by the commit in Fixes,
    resulting in stack sizes greater than a page in size. The #VC exception
    handling was only mapping the first (bottom) page, resulting in an
    SEV-ES guest failing to boot.
    
    Make the #VC exception stacks part of the default exception stacks
    storage and allocate them with a CONFIG_AMD_MEM_ENCRYPT=y .config. Map
    them only when a SEV-ES guest has been detected.
    
    Rip out the custom VC stacks mapping and storage code.
    
     [ bp: Steal and adapt Tom's commit message. ]
    
    Fixes: 7fae4c2 ("x86: Increase exception stack sizes")
    Signed-off-by: Borislav Petkov <[email protected]>
    Tested-by: Tom Lendacky <[email protected]>
    Tested-by: Brijesh Singh <[email protected]>
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    suryasaimadhu authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6c087b0 View commit details
    Browse the repository at this point in the history
  215. media: videobuf2: always set buffer vb2 pointer

    commit 67f8513 upstream.
    
    We need to always link allocated vb2_dc_buf back to vb2_buffer because
    we dereference vb2 in prepare() and finish() callbacks.
    
    Signed-off-by: Sergey Senozhatsky <[email protected]>
    Tested-by: Chen-Yu Tsai <[email protected]>
    Acked-by: Tomasz Figa <[email protected]>
    Signed-off-by: Hans Verkuil <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sergey-senozhatsky authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    c8b0f8b View commit details
    Browse the repository at this point in the history
  216. media: videobuf2-dma-sg: Fix buf->vb NULL pointer dereference

    commit d55c3ee upstream.
    
    Commit a4b83de ("media: videobuf2: rework vb2_mem_ops API")
    added a new vb member to struct vb2_dma_sg_buf, but it only added
    code setting this to the vb2_dma_sg_alloc() function and not to the
    vb2_dma_sg_get_userptr() and vb2_dma_sg_attach_dmabuf() which also
    create vb2_dma_sg_buf objects.
    
    This is causing a crash due to a NULL pointer deref when using
    libcamera on devices with an Intel IPU3 (qcam app).
    
    Fix these crashes by assigning buf->vb in the other 2 functions too,
    note libcamera tests the vb2_dma_sg_get_userptr() path, the change
    to the vb2_dma_sg_attach_dmabuf() path is untested.
    
    Fixes: a4b83de ("media: videobuf2: rework vb2_mem_ops API")
    Cc: Sergey Senozhatsky <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans Verkuil <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jwrdegoede authored and gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    712cb7e View commit details
    Browse the repository at this point in the history
  217. Linux 5.15.3

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Fox Chen <[email protected]>
    Tested-by: Salvatore Bonaccorso <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Fox Chen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Fox Chen <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Fox Chen <[email protected]>
    Tested-by: Rudi Heitbaum <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Tested-By: Scott Bruce <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    3b17187 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2021

  1. string: uninline memcpy_and_pad

    commit 5c4e0a2 upstream.
    
    When building m68k:allmodconfig, recent versions of gcc generate the
    following error if the length of UTS_RELEASE is less than 8 bytes.
    
      In function 'memcpy_and_pad',
        inlined from 'nvmet_execute_disc_identify' at
          drivers/nvme/target/discovery.c:268:2: arch/m68k/include/asm/string.h:72:25: error:
    	'__builtin_memcpy' reading 8 bytes from a region of size 7
    
    Discussions around the problem suggest that this only happens if an
    architecture does not provide strlen(), if -ffreestanding is provided as
    compiler option, and if CONFIG_FORTIFY_SOURCE=n. All of this is the case
    for m68k. The exact reasons are unknown, but seem to be related to the
    ability of the compiler to evaluate the return value of strlen() and
    the resulting execution flow in memcpy_and_pad(). It would be possible
    to work around the problem by using sizeof(UTS_RELEASE) instead of
    strlen(UTS_RELEASE), but that would only postpone the problem until the
    function is called in a similar way. Uninline memcpy_and_pad() instead
    to solve the problem for good.
    
    Suggested-by: Linus Torvalds <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    groeck authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    d27b2dc View commit details
    Browse the repository at this point in the history
  2. Revert "drm: fb_helper: improve CONFIG_FB dependency"

    This reverts commit 94e18f5 which is
    commit 9d6366e upstream.
    
    It causes some build problems as reported by Jiri.
    
    Link: https://lore.kernel.org/r/[email protected]
    Reported-by: Jiri Slaby <[email protected]>
    Cc: Jani Nikula <[email protected]>
    Cc: Javier Martinez Canillas <[email protected]>
    Cc: Arnd Bergmann <[email protected]>
    Cc: Kees Cook <[email protected]>
    Cc: Daniel Vetter <[email protected]>
    Cc: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    3256c84 View commit details
    Browse the repository at this point in the history
  3. Revert "drm: fb_helper: fix CONFIG_FB dependency"

    This reverts commit c95380b which is
    commit 606b102 upstream.
    
    It causes some build problems as reported by Jiri.
    
    Link: https://lore.kernel.org/r/[email protected]
    Reported-by: Jiri Slaby <[email protected]>
    Cc: Arnd Bergmann <[email protected]>
    Cc: Kees Cook <[email protected]>
    Cc: Daniel Vetter <[email protected]>
    Cc: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    b069624 View commit details
    Browse the repository at this point in the history
  4. KVM: Fix steal time asm constraints

    commit 964b7aa upstream.
    
    In 64-bit mode, x86 instruction encoding allows us to use the low 8 bits
    of any GPR as an 8-bit operand. In 32-bit mode, however, we can only use
    the [abcd] registers. For which, GCC has the "q" constraint instead of
    the less restrictive "r".
    
    Also fix st->preempted, which is an input/output operand rather than an
    input.
    
    Fixes: 7e2175e ("KVM: x86: Fix recording of guest steal time / preempted status")
    Reported-by: kernel test robot <[email protected]>
    Signed-off-by: David Woodhouse <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dwmw2 authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    19e32bd View commit details
    Browse the repository at this point in the history
  5. btrfs: introduce btrfs_is_data_reloc_root

    commit 37f00a6 upstream
    
    There are several places in our codebase where we check if a root is the
    root of the data reloc tree and subsequent patches will introduce more.
    
    Factor out the check into a small helper function instead of open coding
    it multiple times.
    
    Reviewed-by: Naohiro Aota <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    morbidrsa authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    02c5e9e View commit details
    Browse the repository at this point in the history
  6. btrfs: zoned: add a dedicated data relocation block group

    commit c2707a2 upstream
    
    Relocation in a zoned filesystem can fail with a transaction abort with
    error -22 (EINVAL). This happens because the relocation code assumes that
    the extents we relocated the data to have the same size the source extents
    had and ensures this by preallocating the extents.
    
    But in a zoned filesystem we currently can't preallocate the extents as
    this would break the sequential write required rule. Therefore it can
    happen that the writeback process kicks in while we're still adding pages
    to a delalloc range and starts writing out dirty pages.
    
    This then creates destination extents that are smaller than the source
    extents, triggering the following safety check in get_new_location():
    
     1034         if (num_bytes != btrfs_file_extent_disk_num_bytes(leaf, fi)) {
     1035                 ret = -EINVAL;
     1036                 goto out;
     1037         }
    
    Temporarily create a dedicated block group for the relocation process, so
    no non-relocation data writes can interfere with the relocation writes.
    
    This is needed that we can switch the relocation process on a zoned
    filesystem from the REQ_OP_ZONE_APPEND writing we use for data to a scheme
    like in a non-zoned filesystem using REQ_OP_WRITE and preallocation.
    
    Fixes: 32430c6 ("btrfs: zoned: enable relocation on a zoned filesystem")
    Reviewed-by: Naohiro Aota <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    morbidrsa authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    d282dd7 View commit details
    Browse the repository at this point in the history
  7. btrfs: zoned: only allow one process to add pages to a relocation inode

    commit 35156d8 upstream
    
    Don't allow more than one process to add pages to a relocation inode on
    a zoned filesystem, otherwise we cannot guarantee the sequential write
    rule once we're filling preallocated extents on a zoned filesystem.
    
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    morbidrsa authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    f716e98 View commit details
    Browse the repository at this point in the history
  8. btrfs: zoned: use regular writes for relocation

    commit e6d261e upstream
    
    Now that we have a dedicated block group for relocation, we can use
    REQ_OP_WRITE instead of  REQ_OP_ZONE_APPEND for writing out the data on
    relocation.
    
    Reviewed-by: Naohiro Aota <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    morbidrsa authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    080f457 View commit details
    Browse the repository at this point in the history
  9. btrfs: check for relocation inodes on zoned btrfs in should_nocow

    commit 2adada8 upstream
    
    Prepare for allowing preallocation for relocation inodes.
    
    Reviewed-by: Naohiro Aota <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    morbidrsa authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    d0fdafa View commit details
    Browse the repository at this point in the history
  10. btrfs: zoned: allow preallocation for relocation inodes

    commit 960a316 upstream
    
    Now that we use a dedicated block group and regular writes for data
    relocation, we can preallocate the space needed for a relocated inode,
    just like we do in regular mode.
    
    Essentially this reverts commit 32430c6 ("btrfs: zoned: enable
    relocation on a zoned filesystem") as it is not needed anymore.
    
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    morbidrsa authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    0fc2241 View commit details
    Browse the repository at this point in the history
  11. fortify: Explicitly disable Clang support

    commit a52f8a5 upstream.
    
    Clang has never correctly compiled the FORTIFY_SOURCE defenses due to
    a couple bugs:
    
    	Eliding inlines with matching __builtin_* names
    	https://bugs.llvm.org/show_bug.cgi?id=50322
    
    	Incorrect __builtin_constant_p() of some globals
    	https://bugs.llvm.org/show_bug.cgi?id=41459
    
    In the process of making improvements to the FORTIFY_SOURCE defenses, the
    first (silent) bug (coincidentally) becomes worked around, but exposes
    the latter which breaks the build. As such, Clang must not be used with
    CONFIG_FORTIFY_SOURCE until at least latter bug is fixed (in Clang 13),
    and the fortify routines have been rearranged.
    
    Update the Kconfig to reflect the reality of the current situation.
    
    Signed-off-by: Kees Cook <[email protected]>
    Acked-by: Nick Desaulniers <[email protected]>
    Link: https://lore.kernel.org/lkml/CAKwvOd=A+ueGV2ihdy5GtgR2fQbcXjjAtVxv3=cPjffpebZB7A@mail.gmail.com
    Cc: Nathan Chancellor <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kees authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    8d09564 View commit details
    Browse the repository at this point in the history
  12. block: Add a helper to validate the block size

    commit 570b1ca upstream.
    
    There are some duplicated codes to validate the block
    size in block drivers. This limitation actually comes
    from block layer, so this patch tries to add a new block
    layer helper for that.
    
    Signed-off-by: Xie Yongji <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Cc: Tadeusz Struk <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    YongjiXie authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    1f124a6 View commit details
    Browse the repository at this point in the history
  13. loop: Use blk_validate_block_size() to validate block size

    commit af3c570 upstream.
    
    Remove loop_validate_block_size() and use the block layer helper
    to validate block size.
    
    Signed-off-by: Xie Yongji <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Cc: Tadeusz Struk <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    YongjiXie authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    c099118 View commit details
    Browse the repository at this point in the history
  14. Bluetooth: btusb: Add support for TP-Link UB500 Adapter

    commit 4fd6d49 upstream.
    
    Add support for TP-Link UB500 Adapter (RTL8761B)
    
    * /sys/kernel/debug/usb/devices
    T:  Bus=01 Lev=02 Prnt=05 Port=01 Cnt=01 Dev#= 78 Spd=12   MxCh= 0
    D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
    P:  Vendor=2357 ProdID=0604 Rev= 2.00
    S:  Manufacturer=
    S:  Product=TP-Link UB500 Adapter
    S:  SerialNumber=E848B8C82000
    C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
    E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
    E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
    I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
    E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
    I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
    E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
    I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
    E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
    I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
    E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
    I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
    E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
    
    Signed-off-by: Nicholas Flintham <[email protected]>
    Signed-off-by: Marcel Holtmann <[email protected]>
    Cc: Szabolcs Sipos <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Flinny authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    73f1e74 View commit details
    Browse the repository at this point in the history
  15. parisc/entry: fix trace test in syscall exit path

    commit 3ec18fc upstream.
    
    commit 8779e05 ("parisc: Fix ptrace check on syscall return")
    fixed testing of TI_FLAGS. This uncovered a bug in the test mask.
    syscall_restore_rfi is only used when the kernel needs to exit to
    usespace with single or block stepping and the recovery counter
    enabled. The test however used _TIF_SYSCALL_TRACE_MASK, which
    includes a lot of bits that shouldn't be tested here.
    
    Fix this by using TIF_SINGLESTEP and TIF_BLOCKSTEP directly.
    
    I encountered this bug by enabling syscall tracepoints. Both in qemu and
    on real hardware. As soon as i enabled the tracepoint (sys_exit_read,
    but i guess it doesn't really matter which one), i got random page
    faults in userspace almost immediately.
    
    Signed-off-by: Sven Schnelle <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    svenschnelle authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    a912418 View commit details
    Browse the repository at this point in the history
  16. PCI/MSI: Deal with devices lying about their MSI mask capability

    commit 2226667 upstream.
    
    It appears that some devices are lying about their mask capability,
    pretending that they don't have it, while they actually do.
    The net result is that now that we don't enable MSIs on such
    endpoint.
    
    Add a new per-device flag to deal with this. Further patches will
    make use of it, sadly.
    
    Signed-off-by: Marc Zyngier <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Thomas Gleixner <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: Bjorn Helgaas <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Marc Zyngier authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    06ce633 View commit details
    Browse the repository at this point in the history
  17. PCI: Add MSI masking quirk for Nvidia ION AHCI

    commit f21082f upstream.
    
    The ION AHCI device pretends that MSI masking isn't a thing, while it
    actually implements it and needs MSIs to be unmasked to work. Add a quirk
    to that effect.
    
    Reported-by: Rui Salvaterra <[email protected]>
    Signed-off-by: Marc Zyngier <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Tested-by: Rui Salvaterra <[email protected]>
    Reviewed-by: Thomas Gleixner <[email protected]>
    Cc: Bjorn Helgaas <[email protected]>
    Link: https://lore.kernel.org/r/CALjTZvbzYfBuLB+H=fj2J+9=DxjQ2Uqcy0if_PvmJ-nU-qEgkg@mail.gmail.com
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Marc Zyngier authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    7931b7e View commit details
    Browse the repository at this point in the history
  18. perf/core: Avoid put_page() when GUP fails

    commit 4716023 upstream.
    
    PEBS PERF_SAMPLE_PHYS_ADDR events use perf_virt_to_phys() to convert PMU
    sampled virtual addresses to physical using get_user_page_fast_only()
    and page_to_phys().
    
    Some get_user_page_fast_only() error cases return false, indicating no
    page reference, but still initialize the output page pointer with an
    unreferenced page. In these error cases perf_virt_to_phys() calls
    put_page(). This causes page reference count underflow, which can lead
    to unintentional page sharing.
    
    Fix perf_virt_to_phys() to only put_page() if get_user_page_fast_only()
    returns a referenced page.
    
    Fixes: fc7ce9c ("perf/core, x86: Add PERF_SAMPLE_PHYS_ADDR")
    Signed-off-by: Greg Thelen <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gthelen authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    bd378dc View commit details
    Browse the repository at this point in the history
  19. thermal: Fix NULL pointer dereferences in of_thermal_ functions

    commit 96cfe05 upstream.
    
    of_parse_thermal_zones() parses the thermal-zones node and registers a
    thermal_zone device for each subnode. However, if a thermal zone is
    consuming a thermal sensor and that thermal sensor device hasn't probed
    yet, an attempt to set trip_point_*_temp for that thermal zone device
    can cause a NULL pointer dereference. Fix it.
    
     console:/sys/class/thermal/thermal_zone87 # echo 120000 > trip_point_0_temp
     ...
     Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020
     ...
     Call trace:
      of_thermal_set_trip_temp+0x40/0xc4
      trip_point_temp_store+0xc0/0x1dc
      dev_attr_store+0x38/0x88
      sysfs_kf_write+0x64/0xc0
      kernfs_fop_write_iter+0x108/0x1d0
      vfs_write+0x2f4/0x368
      ksys_write+0x7c/0xec
      __arm64_sys_write+0x20/0x30
      el0_svc_common.llvm.7279915941325364641+0xbc/0x1bc
      do_el0_svc+0x28/0xa0
      el0_svc+0x14/0x24
      el0_sync_handler+0x88/0xec
      el0_sync+0x1c0/0x200
    
    While at it, fix the possible NULL pointer dereference in other
    functions as well: of_thermal_get_temp(), of_thermal_set_emul_temp(),
    of_thermal_get_trend().
    
    Suggested-by: David Collins <[email protected]>
    Signed-off-by: Subbaraman Narayanamurthy <[email protected]>
    Acked-by: Daniel Lezcano <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Subbaraman Narayanamurthy authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    ef2590a View commit details
    Browse the repository at this point in the history
  20. Revert "ACPI: scan: Release PM resources blocked by unused objects"

    commit 3b2b49e upstream.
    
    Revert commit c10383e ("ACPI: scan: Release PM resources blocked
    by unused objects"), because it causes boot issues to appear on some
    platforms.
    
    Reported-by: Kyle D. Pelton <[email protected]>
    Reported-by: Saranya Gopal <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rafaeljw authored and gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    1af7386 View commit details
    Browse the repository at this point in the history
  21. Linux 5.15.4

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Fox Chen <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Rudi Heitbaum <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Tested-By: Scott Bruce <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    9ac77cf View commit details
    Browse the repository at this point in the history
  22. base packaging

    Kernel Builder (kathleen) committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    5b854a5 View commit details
    Browse the repository at this point in the history
  23. UBUNTU: SAUCE: kbuild: add -fcf-protection=none when using retpoline …

    …flags
    
    BugLink: [Replace -fcf-protection=none patch with new version]
    
    The gcc -fcf-protection=branch option is not compatible with
    -mindirect-branch=thunk-extern. The latter is used when
    CONFIG_RETPOLINE is selected, and this will fail to build with
    a gcc which has -fcf-protection=branch enabled by default. Adding
    -fcf-protection=none when building with retpoline support to
    prevents such build failures.
    
    Signed-off-by: Seth Forshee <[email protected]>
    Seth Forshee authored and Kernel Builder (kathleen) committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    3dd8858 View commit details
    Browse the repository at this point in the history
  24. UBUNTU: SAUCE: add vmlinux.strip to BOOT_TARGETS1 on powerpc

    Signed-off-by: Andy Whitcroft <[email protected]>
    Andy Whitcroft authored and Kernel Builder (kathleen) committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    d6e7758 View commit details
    Browse the repository at this point in the history
  25. UBUNTU: SAUCE: tools/hv/lsvmbus -- add manual page

    BugLink: http://bugs.launchpad.net/bugs/1585311
    
    Signed-off-by: Andy Whitcroft <[email protected]>
    Acked-by: Tim Gardner <[email protected]>
    Acked-by: Brad Figg <[email protected]>
    Signed-off-by: Kamal Mostafa <[email protected]>
    Andy Whitcroft authored and Kernel Builder (kathleen) committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    babc1e2 View commit details
    Browse the repository at this point in the history
  26. debian changelog

    Kernel Builder (kathleen) committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    1968afa View commit details
    Browse the repository at this point in the history
  27. configs (based on Ubuntu-5.15.0-11.11)

    Kernel Builder (kathleen) committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    db8a07b View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2021

  1. System76 Linux

    jackpot51 committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    be10191 View commit details
    Browse the repository at this point in the history
  2. ALSA: hda/realtek - Reapply pin fixup for oryp5

    The pin fixup is required to detect headset microphones on the oryp5.
    
    Fixes: 80690a2 ("ALSA: hda/realtek - Add quirk for Tuxedo XC 1509")
    Signed-off-by: Tim Crawford <[email protected]>
    crawfxrd authored and jackpot51 committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    77e3d7d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bf697d8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4ff10c1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    64df0c7 View commit details
    Browse the repository at this point in the history
  6. DROP ON REBASE: 5.15.4-76051504.202111211331 based on 5.15.4-051504.2…

    …02111211331
    
    Signed-off-by: Jeremy Soller <[email protected]>
    jackpot51 committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    aa760c8 View commit details
    Browse the repository at this point in the history