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

ACPICA: Fix operand resolution #165

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

Commits on Jun 14, 2022

  1. blk-mq: don't touch ->tagset in blk_mq_get_sq_hctx

    [ Upstream commit 5d05426 ]
    
    blk_mq_run_hw_queues() could be run when there isn't queued request and
    after queue is cleaned up, at that time tagset is freed, because tagset
    lifetime is covered by driver, and often freed after blk_cleanup_queue()
    returns.
    
    So don't touch ->tagset for figuring out current default hctx by the mapping
    built in request queue, so use-after-free on tagset can be avoided. Meantime
    this way should be fast than retrieving mapping from tagset.
    
    Cc: "yukuai (C)" <[email protected]>
    Cc: Jan Kara <[email protected]>
    Fixes: b6e68ee ("blk-mq: Improve performance of non-mq IO schedulers with multiple HW queues")
    Signed-off-by: Ming Lei <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ming Lei authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b140bac View commit details
    Browse the repository at this point in the history
  2. ASoC: fsl_sai: Fix FSL_SAI_xDR/xFR definition

    [ Upstream commit e4dd748 ]
    
    There are multiple xDR and xFR registers, the index is
    from 0 to 7. FSL_SAI_xDR and FSL_SAI_xFR is abandoned,
    replace them with FSL_SAI_xDR0 and FSL_SAI_xFR0.
    
    Fixes: 4f7a072 ("ASoC: fsl_sai: Add support for SAI new version")
    Signed-off-by: Shengjiu Wang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    TE-N-ShengjiuWang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    a5be674 View commit details
    Browse the repository at this point in the history
  3. clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value

    [ Upstream commit 9c04a8f ]
    
    The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
    
    Fixes: 8935527 ("clocksource/drivers/oxnas-rps: Add Oxford Semiconductor RPS Dual Timer")
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Reviewed-by: Neil Armstrong <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Daniel Lezcano <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    krzk authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    a95d03c View commit details
    Browse the repository at this point in the history
  4. s390/crypto: fix scatterwalk_unmap() callers in AES-GCM

    [ Upstream commit bd52cd5 ]
    
    The argument of scatterwalk_unmap() is supposed to be the void* that was
    returned by the previous scatterwalk_map() call.
    The s390 AES-GCM implementation was instead passing the pointer to the
    struct scatter_walk.
    
    This doesn't actually break anything because scatterwalk_unmap() only uses
    its argument under CONFIG_HIGHMEM and ARCH_HAS_FLUSH_ON_KUNMAP.
    
    Fixes: bf7fa03 ("s390/crypto: add s390 platform specific aes gcm support.")
    Signed-off-by: Jann Horn <[email protected]>
    Acked-by: Harald Freudenberger <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Heiko Carstens <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    thejh authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    61f26d0 View commit details
    Browse the repository at this point in the history
  5. amt: fix return value of amt_update_handler()

    [ Upstream commit ac1dbf5 ]
    
    If a relay receives an update message, it lookup a tunnel.
    and if there is no tunnel for that message, it should be treated
    as an error, not a success.
    But amt_update_handler() returns false, which means success.
    
    Fixes: cbc21dc ("amt: add data plane of amt interface")
    Signed-off-by: Taehee Yoo <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    TaeheeYoo authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    ec6feb1 View commit details
    Browse the repository at this point in the history
  6. amt: fix possible memory leak in amt_rcv()

    [ Upstream commit 1a1a0e8 ]
    
    If an amt receives packets and it finds socket.
    If it can't find a socket, it should free a received skb.
    But it doesn't.
    So, a memory leak would possibly occur.
    
    Fixes: cbc21dc ("amt: add data plane of amt interface")
    Signed-off-by: Taehee Yoo <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    TaeheeYoo authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    60d9c02 View commit details
    Browse the repository at this point in the history
  7. net/smc: set ini->smcrv2.ib_dev_v2 to NULL if SMC-Rv2 is unavailable

    [ Upstream commit b3b1a17 ]
    
    In the process of checking whether RDMAv2 is available, the current
    implementation first sets ini->smcrv2.ib_dev_v2, and then allocates
    smc buf desc and register rmb, but the latter may fail. In this case,
    the pointer should be reset.
    
    Fixes: e49300a ("net/smc: add listen processing for SMC-Rv2")
    Signed-off-by: liuyacan <[email protected]>
    Reviewed-by: Karsten Graul <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    liuyacan authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d405780 View commit details
    Browse the repository at this point in the history
  8. spi: fsi: Fix spurious timeout

    [ Upstream commit 61bf40e ]
    
    The driver may return a timeout error even if the status register
    indicates that the transfer may proceed. Fix this by restructuring
    the polling loop.
    
    Fixes: 89b35e3 ("spi: fsi: Implement a timeout for polling status")
    Signed-off-by: Eddie James <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Eddie James authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    7dbe011 View commit details
    Browse the repository at this point in the history
  9. drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq()

    [ Upstream commit a35faec ]
    
    The > ARRAY_SIZE() should be >= ARRAY_SIZE() to prevent an out of bounds
    access.
    
    Fixes: e27c41d ("drm/amd/display: Support for DMUB HPD interrupt handling")
    Reviewed-by: Harry Wentland <[email protected]>
    Signed-off-by: Dan Carpenter <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dan Carpenter authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b0808b7 View commit details
    Browse the repository at this point in the history
  10. net: lan966x: check devm_of_phy_get() for -EDEFER_PROBE

    [ Upstream commit b58cdd4 ]
    
    At the moment, if devm_of_phy_get() returns an error the serdes
    simply isn't set. While it is bad to ignore an error in general, there
    is a particular bug that network isn't working if the serdes driver is
    compiled as a module. In that case, devm_of_phy_get() returns
    -EDEFER_PROBE and the error is silently ignored.
    
    The serdes is optional, it is not there if the port is using RGMII, in
    which case devm_of_phy_get() returns -ENODEV. Rearrange the error
    handling so that -ENODEV will be handled but other error codes will
    abort the probing.
    
    Fixes: d28d6d2 ("net: lan966x: add port module support")
    Signed-off-by: Michael Walle <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mwalle authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    73337dd View commit details
    Browse the repository at this point in the history
  11. net: sched: fixed barrier to prevent skbuff sticking in qdisc backlog

    [ Upstream commit a54ce37 ]
    
    In qdisc_run_begin(), smp_mb__before_atomic() used before test_bit()
    does not provide any ordering guarantee as test_bit() is not an atomic
    operation. This, added to the fact that the spin_trylock() call at
    the beginning of qdisc_run_begin() does not guarantee acquire
    semantics if it does not grab the lock, makes it possible for the
    following statement :
    
    if (test_bit(__QDISC_STATE_MISSED, &qdisc->state))
    
    to be executed before an enqueue operation called before
    qdisc_run_begin().
    
    As a result the following race can happen :
    
               CPU 1                             CPU 2
    
          qdisc_run_begin()               qdisc_run_begin() /* true */
            set(MISSED)                            .
          /* returns false */                      .
              .                            /* sees MISSED = 1 */
              .                            /* so qdisc not empty */
              .                            __qdisc_run()
              .                                    .
              .                              pfifo_fast_dequeue()
     ----> /* may be done here */                  .
    |         .                                clear(MISSED)
    |         .                                    .
    |         .                                smp_mb __after_atomic();
    |         .                                    .
    |         .                                /* recheck the queue */
    |         .                                /* nothing => exit   */
    |   enqueue(skb1)
    |         .
    |   qdisc_run_begin()
    |         .
    |     spin_trylock() /* fail */
    |         .
    |     smp_mb__before_atomic() /* not enough */
    |         .
     ---- if (test_bit(MISSED))
            return false;   /* exit */
    
    In the above scenario, CPU 1 and CPU 2 both try to grab the
    qdisc->seqlock at the same time. Only CPU 2 succeeds and enters the
    bypass code path, where it emits its skb then calls __qdisc_run().
    
    CPU1 fails, sets MISSED and goes down the traditionnal enqueue() +
    dequeue() code path. But when executing qdisc_run_begin() for the
    second time, after enqueuing its skbuff, it sees the MISSED bit still
    set (by itself) and consequently chooses to exit early without setting
    it again nor trying to grab the spinlock again.
    
    Meanwhile CPU2 has seen MISSED = 1, cleared it, checked the queue
    and found it empty, so it returned.
    
    At the end of the sequence, we end up with skb1 enqueued in the
    backlog, both CPUs out of __dev_xmit_skb(), the MISSED bit not set,
    and no __netif_schedule() called made. skb1 will now linger in the
    qdisc until somebody later performs a full __qdisc_run(). Associated
    to the bypass capacity of the qdisc, and the ability of the TCP layer
    to avoid resending packets which it knows are still in the qdisc, this
    can lead to serious traffic "holes" in a TCP connection.
    
    We fix this by replacing the smp_mb__before_atomic() / test_bit() /
    set_bit() / smp_mb__after_atomic() sequence inside qdisc_run_begin()
    by a single test_and_set_bit() call, which is more concise and
    enforces the needed memory barriers.
    
    Fixes: 89837eb ("net: sched: add barrier to ensure correct ordering for lockless qdisc")
    Signed-off-by: Vincent Ray <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Vincent Ray authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    0db2dcc View commit details
    Browse the repository at this point in the history
  12. net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_…

    …entry()
    
    [ Upstream commit e7e7104 ]
    
    The "fsp->location" variable comes from user via ethtool_get_rxnfc().
    Check that it is valid to prevent an out of bounds read.
    
    Fixes: 7aab747 ("net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO")
    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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    4cde554 View commit details
    Browse the repository at this point in the history
  13. net: ethernet: ti: am65-cpsw-nuss: Fix some refcount leaks

    [ Upstream commit 5dd89d2 ]
    
    of_get_child_by_name() returns a node pointer with refcount
    incremented, we should use of_node_put() on it when not need anymore.
    am65_cpsw_init_cpts() and am65_cpsw_nuss_probe() don't release
    the refcount in error case.
    Add missing of_node_put() to avoid refcount leak.
    
    Fixes: b1f66a5 ("net: ethernet: ti: am65-cpsw-nuss: enable packet timestamping support")
    Fixes: 93a7653 ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
    Signed-off-by: Miaoqian Lin <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yuuoniy authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    78aca10 View commit details
    Browse the repository at this point in the history
  14. net: dsa: mv88e6xxx: Fix refcount leak in mv88e6xxx_mdios_register

    [ Upstream commit 02ded5a ]
    
    of_get_child_by_name() returns a node pointer with refcount
    incremented, we should use of_node_put() on it when done.
    
    mv88e6xxx_mdio_register() pass the device node to of_mdiobus_register().
    We don't need the device node after it.
    
    Add missing of_node_put() to avoid refcount leak.
    
    Fixes: a3c53be ("net: dsa: mv88e6xxx: Support multiple MDIO busses")
    Signed-off-by: Miaoqian Lin <[email protected]>
    Reviewed-by: Marek Behún <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yuuoniy authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    e0d763d View commit details
    Browse the repository at this point in the history
  15. modpost: fix removing numeric suffixes

    [ Upstream commit b5beffa ]
    
    With the `-z unique-symbol` linker flag or any similar mechanism,
    it is possible to trigger the following:
    
    ERROR: modpost: "param_set_uint.0" [vmlinux] is a static EXPORT_SYMBOL
    
    The reason is that for now the condition from remove_dot():
    
    if (m && (s[n + m] == '.' || s[n + m] == 0))
    
    which was designed to test if it's a dot or a '\0' after the suffix
    is never satisfied.
    This is due to that `s[n + m]` always points to the last digit of a
    numeric suffix, not on the symbol next to it (from a custom debug
    print added to modpost):
    
    param_set_uint.0, s[n + m] is '0', s[n + m + 1] is '\0'
    
    So it's off-by-one and was like that since 2014.
    
    Fix this for the sake of any potential upcoming features, but don't
    bother stable-backporting, as it's well hidden -- apart from that
    LD flag, it can be triggered only with GCC LTO which never landed
    upstream.
    
    Fixes: fcd38ed ("scripts: modpost: fix compilation warning")
    Signed-off-by: Alexander Lobakin <[email protected]>
    Reviewed-by: Petr Mladek <[email protected]>
    Signed-off-by: Masahiro Yamada <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    alobakin authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    a00a6c7 View commit details
    Browse the repository at this point in the history
  16. ep93xx: clock: Do not return the address of the freed memory

    [ Upstream commit 8a7322a ]
    
    Avoid return freed memory addresses,Modified to the actual error
    return value of clk_register().
    
    Fixes: 9645ccc ("ep93xx: clock: convert in-place to COMMON_CLK")
    Signed-off-by: Genjian Zhang <[email protected]>
    Acked-by: Alexander Sverdlin <[email protected]>
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Genjian Zhang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    044118d View commit details
    Browse the repository at this point in the history
  17. jffs2: fix memory leak in jffs2_do_fill_super

    [ Upstream commit c14adb1 ]
    
    If jffs2_iget() or d_make_root() in jffs2_do_fill_super() returns
    an error, we can observe the following kmemleak report:
    
    --------------------------------------------
    unreferenced object 0xffff888105a65340 (size 64):
      comm "mount", pid 710, jiffies 4302851558 (age 58.239s)
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace:
        [<ffffffff859c45e5>] kmem_cache_alloc_trace+0x475/0x8a0
        [<ffffffff86160146>] jffs2_sum_init+0x96/0x1a0
        [<ffffffff86140e25>] jffs2_do_mount_fs+0x745/0x2120
        [<ffffffff86149fec>] jffs2_do_fill_super+0x35c/0x810
        [<ffffffff8614aae9>] jffs2_fill_super+0x2b9/0x3b0
        [...]
    unreferenced object 0xffff8881bd7f0000 (size 65536):
      comm "mount", pid 710, jiffies 4302851558 (age 58.239s)
      hex dump (first 32 bytes):
        bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
        bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
      backtrace:
        [<ffffffff858579ba>] kmalloc_order+0xda/0x110
        [<ffffffff85857a11>] kmalloc_order_trace+0x21/0x130
        [<ffffffff859c2ed1>] __kmalloc+0x711/0x8a0
        [<ffffffff86160189>] jffs2_sum_init+0xd9/0x1a0
        [<ffffffff86140e25>] jffs2_do_mount_fs+0x745/0x2120
        [<ffffffff86149fec>] jffs2_do_fill_super+0x35c/0x810
        [<ffffffff8614aae9>] jffs2_fill_super+0x2b9/0x3b0
        [...]
    --------------------------------------------
    
    This is because the resources allocated in jffs2_sum_init() are not
    released. Call jffs2_sum_exit() to release these resources to solve
    the problem.
    
    Fixes: e631ddb ("[JFFS2] Add erase block summary support (mount time improvement)")
    Signed-off-by: Baokun Li <[email protected]>
    Signed-off-by: Richard Weinberger <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    LiBaokun96 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    cf9db01 View commit details
    Browse the repository at this point in the history
  18. ubi: fastmap: Fix high cpu usage of ubi_bgt by making sure wl_pool no…

    …t empty
    
    [ Upstream commit d09e9a2 ]
    
    There at least 6 PEBs reserved on UBI device:
    1. EBA_RESERVED_PEBS[1]
    2. WL_RESERVED_PEBS[1]
    3. UBI_LAYOUT_VOLUME_EBS[2]
    4. MIN_FASTMAP_RESERVED_PEBS[2]
    
    When all ubi volumes take all their PEBs, there are 3 (EBA_RESERVED_PEBS +
    WL_RESERVED_PEBS + MIN_FASTMAP_RESERVED_PEBS - MIN_FASTMAP_TAKEN_PEBS[1])
    free PEBs. Since commit f9c34bb ("ubi: Fix producing anchor PEBs")
    and commit 4b68bf9 ("ubi: Select fastmap anchor PEBs considering
    wear level rules") applied, there is only 1 (3 - FASTMAP_ANCHOR_PEBS[1] -
    FASTMAP_NEXT_ANCHOR_PEBS[1]) free PEB to fill pool and wl_pool, after
    filling pool, wl_pool is always empty. So, UBI could be stuck in an
    infinite loop:
    
    	ubi_thread	   system_wq
    wear_leveling_worker <--------------------------------------------------
      get_peb_for_wl							|
        // fm_wl_pool, used = size = 0					|
        schedule_work(&ubi->fm_work)					|
    									|
    		    update_fastmap_work_fn				|
    		      ubi_update_fastmap				|
    			ubi_refill_pools				|
    			// ubi->free_count - ubi->beb_rsvd_pebs < 5	|
    			// wl_pool is not filled with any PEBs		|
    			schedule_erase(old_fm_anchor)			|
    			ubi_ensure_anchor_pebs				|
    			  __schedule_ubi_work(wear_leveling_worker)	|
    									|
    __erase_worker								|
      ensure_wear_leveling							|
        __schedule_ubi_work(wear_leveling_worker) --------------------------
    
    , which cause high cpu usage of ubi_bgt:
    top - 12:10:42 up 5 min,  2 users,  load average: 1.76, 0.68, 0.27
    Tasks: 123 total,   3 running,  54 sleeping,   0 stopped,   0 zombie
    
      PID USER PR   NI VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
     1589 root 20   0   0      0      0 R  45.0  0.0   0:38.86 ubi_bgt0d
      319 root 20   0   0      0      0 I  15.2  0.0   0:15.29 kworker/0:3-eve
      371 root 20   0   0      0      0 I  14.9  0.0   0:12.85 kworker/3:3-eve
       20 root 20   0   0      0      0 I  11.3  0.0   0:05.33 kworker/1:0-eve
      202 root 20   0   0      0      0 I  11.3  0.0   0:04.93 kworker/2:3-eve
    
    In commit 4b68bf9 ("ubi: Select fastmap anchor PEBs considering
    wear level rules"), there are three key changes:
      1) Choose the fastmap anchor when the most free PEBs are available.
      2) Enable anchor move within the anchor area again as it is useful
         for distributing wear.
      3) Import a candidate fm anchor and check this PEB's erase count during
         wear leveling. If the wear leveling limit is exceeded, use the used
         anchor area PEB with the lowest erase count to replace it.
    
    The anchor candidate can be removed, we can check fm_anchor PEB's erase
    count during wear leveling. Fix it by:
      1) Removing 'fm_next_anchor' and check 'fm_anchor' during wear leveling.
      2) Preferentially filling one free peb into fm_wl_pool in condition of
         ubi->free_count > ubi->beb_rsvd_pebs, then try to reserve enough
         free count for fastmap non anchor pebs after the above prerequisites
         are met.
    Then, there are at least 1 PEB in pool and 1 PEB in wl_pool after calling
    ubi_refill_pools() with all erase works done.
    
    Fetch a reproducer in [Link].
    
    Fixes: 4b68bf9 ("ubi: Select fastmap anchor PEBs ... rules")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215407
    Signed-off-by: Zhihao Cheng <[email protected]>
    Signed-off-by: Richard Weinberger <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Zhihao Cheng authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    794c698 View commit details
    Browse the repository at this point in the history
  19. ubi: ubi_create_volume: Fix use-after-free when volume creation failed

    [ Upstream commit 8c03a1c ]
    
    There is an use-after-free problem for 'eba_tbl' in ubi_create_volume()'s
    error handling path:
    
      ubi_eba_replace_table(vol, eba_tbl)
        vol->eba_tbl = tbl
    out_mapping:
      ubi_eba_destroy_table(eba_tbl)   // Free 'eba_tbl'
    out_unlock:
      put_device(&vol->dev)
        vol_release
          kfree(tbl->entries)	  // UAF
    
    Fix it by removing redundant 'eba_tbl' releasing.
    Fetch a reproducer in [Link].
    
    Fixes: 493cfae ("mtd: utilize new cdev_device_add helper function")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215965
    Signed-off-by: Zhihao Cheng <[email protected]>
    Signed-off-by: Richard Weinberger <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Zhihao Cheng authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    e27ecf3 View commit details
    Browse the repository at this point in the history
  20. selftests/bpf: fix selftest after random: Urandom_read tracepoint rem…

    …oval
    
    [ Upstream commit 99dea2c ]
    
    14c1746 ("random: remove unused tracepoints") removed all the
    tracepoints from drivers/char/random.c, one of which,
    random:urandom_read, was used by stacktrace_build_id selftest to trigger
    stack trace capture.
    
    Fix breakage by switching to kprobing urandom_read() function.
    
    Suggested-by: Yonghong Song <[email protected]>
    Signed-off-by: Andrii Nakryiko <[email protected]>
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Acked-by: Yonghong Song <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    anakryiko authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    44b9a9b View commit details
    Browse the repository at this point in the history
  21. selftests/bpf: fix stacktrace_build_id with missing kprobe/urandom_read

    [ Upstream commit 59ed76f ]
    
    Kernel function urandom_read is replaced with urandom_read_iter.
    Therefore, kprobe on urandom_read is not working any more:
    
    [root@eth50-1 bpf]# ./test_progs -n 161
    test_stacktrace_build_id:PASS:skel_open_and_load 0 nsec
    libbpf: kprobe perf_event_open() failed: No such file or directory
    libbpf: prog 'oncpu': failed to create kprobe 'urandom_read+0x0' \
            perf event: No such file or directory
    libbpf: prog 'oncpu': failed to auto-attach: -2
    test_stacktrace_build_id:FAIL:attach_tp err -2
    161     stacktrace_build_id:FAIL
    
    Fix this by replacing urandom_read with urandom_read_iter in the test.
    
    Fixes: 1b388e7 ("random: convert to using fops->read_iter()")
    Reported-by: Mykola Lysenko <[email protected]>
    Signed-off-by: Song Liu <[email protected]>
    Acked-by: David Vernet <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    liu-song-6 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6307ce6 View commit details
    Browse the repository at this point in the history
  22. bpf: Fix probe read error in ___bpf_prog_run()

    [ Upstream commit caff1fa ]
    
    I think there is something wrong with BPF_PROBE_MEM in ___bpf_prog_run()
    in big-endian machine. Let's make a test and see what will happen if we
    want to load a 'u16' with BPF_PROBE_MEM.
    
    Let's make the src value '0x0001', the value of dest register will become
    0x0001000000000000, as the value will be loaded to the first 2 byte of
    DST with following code:
    
      bpf_probe_read_kernel(&DST, SIZE, (const void *)(long) (SRC + insn->off));
    
    Obviously, the value in DST is not correct. In fact, we can compare
    BPF_PROBE_MEM with LDX_MEM_H:
    
      DST = *(SIZE *)(unsigned long) (SRC + insn->off);
    
    If the memory load is done by LDX_MEM_H, the value in DST will be 0x1 now.
    
    And I think this error results in the test case 'test_bpf_sk_storage_map'
    failing:
    
      test_bpf_sk_storage_map:PASS:bpf_iter_bpf_sk_storage_map__open_and_load 0 nsec
      test_bpf_sk_storage_map:PASS:socket 0 nsec
      test_bpf_sk_storage_map:PASS:map_update 0 nsec
      test_bpf_sk_storage_map:PASS:socket 0 nsec
      test_bpf_sk_storage_map:PASS:map_update 0 nsec
      test_bpf_sk_storage_map:PASS:socket 0 nsec
      test_bpf_sk_storage_map:PASS:map_update 0 nsec
      test_bpf_sk_storage_map:PASS:attach_iter 0 nsec
      test_bpf_sk_storage_map:PASS:create_iter 0 nsec
      test_bpf_sk_storage_map:PASS:read 0 nsec
      test_bpf_sk_storage_map:FAIL:ipv6_sk_count got 0 expected 3
      $10/26 bpf_iter/bpf_sk_storage_map:FAIL
    
    The code of the test case is simply, it will load sk->sk_family to the
    register with BPF_PROBE_MEM and check if it is AF_INET6. With this patch,
    now the test case 'bpf_iter' can pass:
    
      $10  bpf_iter:OK
    
    Fixes: 2a02759 ("bpf: Add support for BTF pointers to interpreter")
    Signed-off-by: Menglong Dong <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Reviewed-by: Jiang Biao <[email protected]>
    Reviewed-by: Hao Peng <[email protected]>
    Cc: Ilya Leoshkevich <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    menglongdong authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5f53d4b View commit details
    Browse the repository at this point in the history
  23. block: take destination bvec offsets into account in bio_copy_data_iter

    [ Upstream commit 403d503 ]
    
    Appartly bcache can copy into bios that do not just contain fresh
    pages but can have offsets into the bio_vecs.  Restore support for tht
    in bio_copy_data_iter.
    
    Fixes: f8b679a ("block: rewrite bio_copy_data_iter to use bvec_kmap_local and memcpy_to_bvec")
    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: Sasha Levin <[email protected]>
    Christoph Hellwig authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    42451da View commit details
    Browse the repository at this point in the history
  24. nbd: don't clear 'NBD_CMD_INFLIGHT' flag if request is not completed

    [ Upstream commit 2895f18 ]
    
    Otherwise io will hung because request will only be completed if the
    cmd has the flag 'NBD_CMD_INFLIGHT'.
    
    Fixes: 07175cb ("nbd: make sure request completion won't concurrent")
    Signed-off-by: Yu Kuai <[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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    cdf62c5 View commit details
    Browse the repository at this point in the history
  25. riscv: read-only pages should not be writable

    [ Upstream commit 630f972 ]
    
    If EFI pages are marked as read-only,
    we should remove the _PAGE_WRITE flag.
    
    The current code overwrites an unused value.
    
    Fixes: b91540d ("RISC-V: Add EFI runtime services")
    Signed-off-by: Heinrich Schuchardt <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ard Biesheuvel <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    xypron authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    4e58636 View commit details
    Browse the repository at this point in the history
  26. net/smc: fixes for converting from "struct smc_cdc_tx_pend **" to "st…

    …ruct smc_wr_tx_pend_priv *"
    
    [ Upstream commit e225c9a ]
    
    "struct smc_cdc_tx_pend **" can not directly convert
    to "struct smc_wr_tx_pend_priv *".
    
    Fixes: 2bced6a ("net/smc: put slot when connection is killed")
    Signed-off-by: Guangguan Wang <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Guangguan Wang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    8d9cc78 View commit details
    Browse the repository at this point in the history
  27. tcp: add accessors to read/set tp->snd_cwnd

    [ Upstream commit 4057037 ]
    
    We had various bugs over the years with code
    breaking the assumption that tp->snd_cwnd is greater
    than zero.
    
    Lately, syzbot reported the WARN_ON_ONCE(!tp->prior_cwnd) added
    in commit 8b8a321 ("tcp: fix zero cwnd in tcp_cwnd_reduction")
    can trigger, and without a repro we would have to spend
    considerable time finding the bug.
    
    Instead of complaining too late, we want to catch where
    and when tp->snd_cwnd is set to an illegal value.
    
    Signed-off-by: Eric Dumazet <[email protected]>
    Suggested-by: Yuchung Cheng <[email protected]>
    Cc: Neal Cardwell <[email protected]>
    Acked-by: Yuchung Cheng <[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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5aba0ad View commit details
    Browse the repository at this point in the history
  28. nfp: only report pause frame configuration for physical device

    [ Upstream commit 0649e4d ]
    
    Only report pause frame configuration for physical device. Logical
    port of both PCI PF and PCI VF do not support it.
    
    Fixes: 9fdc5d8 ("nfp: update ethtool reporting of pauseframe control")
    Signed-off-by: Yu Xiao <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    macris-xiao authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    1ad1c25 View commit details
    Browse the repository at this point in the history
  29. block: use bio_queue_enter instead of blk_queue_enter in bio_poll

    [ Upstream commit ebd076b ]
    
    We want to have a valid live gendisk to call ->poll and not just a
    request_queue, so call the right helper.
    
    Fixes: 3e08773 ("block: switch polling to be bio based")
    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: Sasha Levin <[email protected]>
    Christoph Hellwig authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6e848ff View commit details
    Browse the repository at this point in the history
  30. sfc: fix considering that all channels have TX queues

    [ Upstream commit 2e102b5 ]
    
    Normally, all channels have RX and TX queues, but this is not true if
    modparam efx_separate_tx_channels=1 is used. In that cases, some
    channels only have RX queues and others only TX queues (or more
    preciselly, they have them allocated, but not initialized).
    
    Fix efx_channel_has_tx_queues to return the correct value for this case
    too.
    
    Messages shown at probe time before the fix:
     sfc 0000:03:00.0 ens6f0np0: MC command 0x82 inlen 544 failed rc=-22 (raw=0) arg=0
     ------------[ cut here ]------------
     netdevice: ens6f0np0: failed to initialise TXQ -1
     WARNING: CPU: 1 PID: 626 at drivers/net/ethernet/sfc/ef10.c:2393 efx_ef10_tx_init+0x201/0x300 [sfc]
     [...] stripped
     RIP: 0010:efx_ef10_tx_init+0x201/0x300 [sfc]
     [...] stripped
     Call Trace:
      efx_init_tx_queue+0xaa/0xf0 [sfc]
      efx_start_channels+0x49/0x120 [sfc]
      efx_start_all+0x1f8/0x430 [sfc]
      efx_net_open+0x5a/0xe0 [sfc]
      __dev_open+0xd0/0x190
      __dev_change_flags+0x1b3/0x220
      dev_change_flags+0x21/0x60
     [...] stripped
    
    Messages shown at remove time before the fix:
     sfc 0000:03:00.0 ens6f0np0: failed to flush 10 queues
     sfc 0000:03:00.0 ens6f0np0: failed to flush queues
    
    Fixes: 8700aff ("sfc: fix channel allocation with brute force")
    Reported-by: Tianhao Zhao <[email protected]>
    Signed-off-by: Martin Habets <[email protected]>
    Tested-by: Íñigo Huguet <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Martin Habets authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    e7e8d5e View commit details
    Browse the repository at this point in the history
  31. sfc: fix wrong tx channel offset with efx_separate_tx_channels

    [ Upstream commit c308dfd ]
    
    tx_channel_offset is calculated in efx_allocate_msix_channels, but it is
    also calculated again in efx_set_channels because it was originally done
    there, and when efx_allocate_msix_channels was introduced it was
    forgotten to be removed from efx_set_channels.
    
    Moreover, the old calculation is wrong when using
    efx_separate_tx_channels because now we can have XDP channels after the
    TX channels, so n_channels - n_tx_channels doesn't point to the first TX
    channel.
    
    Remove the old calculation from efx_set_channels, and add the
    initialization of this variable if MSI or legacy interrupts are used,
    next to the initialization of the rest of the related variables, where
    it was missing.
    
    Fixes: 3990a8f ("sfc: allocate channels for XDP tx queues")
    Reported-by: Tianhao Zhao <[email protected]>
    Signed-off-by: Íñigo Huguet <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ihuguet authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    1a7c0b3 View commit details
    Browse the repository at this point in the history
  32. block: make bioset_exit() fully resilient against being called twice

    [ Upstream commit 605f741 ]
    
    Most of bioset_exit() is fine being called twice, as it clears the
    various allocations etc when they are freed. The exception is
    bio_alloc_cache_destroy(), which does not clear ->cache when it has
    freed it.
    
    This isn't necessarily a bug, but can be if buggy users does call the
    exit path more then once, or with just a memset() bioset which has
    never been initialized. dm appears to be one such user.
    
    Fixes: be4d234 ("bio: add allocation cache abstraction")
    Link: https://lore.kernel.org/linux-block/[email protected]/
    Reported-by: Matthew Wilcox <[email protected]>
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    axboe authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2094fe0 View commit details
    Browse the repository at this point in the history
  33. blk-mq: do not update io_ticks with passthrough requests

    [ Upstream commit b81c14c ]
    
    Flush or passthrough requests are not accounted as normal IO in completion.
    To reflect iostat for slow IO, io_ticks is updated when stat show called
    based on inflight numbers.
    It may cause inconsistent io_ticks calculation result.
    
    So do not account non-passthrough request when check inflight.
    
    Fixes: 86d7331 ("block: update io_ticks when io hang")
    Signed-off-by: Haisu Wang <[email protected]>
    Reviewed-by: samuelliao <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Haisu Wang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    601c908 View commit details
    Browse the repository at this point in the history
  34. vdpa: Fix error logic in vdpa_nl_cmd_dev_get_doit

    [ Upstream commit 7a6691f ]
    
    In vdpa_nl_cmd_dev_get_doit(), if the call to genlmsg_reply() fails we
    must not call nlmsg_free() since this is done inside genlmsg_reply().
    
    Fix it.
    
    Fixes: bc0d90e ("vdpa: Enable user to query vdpa device info")
    Reviewed-by: Si-Wei Liu <[email protected]>
    Acked-by: Jason Wang <[email protected]>
    Signed-off-by: Eli Cohen <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    elic307i authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    bfc70ac View commit details
    Browse the repository at this point in the history
  35. virtio: pci: Fix an error handling path in vp_modern_probe()

    [ Upstream commit 7a836a2 ]
    
    If an error occurs after a successful pci_request_selected_regions() call,
    it should be undone by a corresponding pci_release_selected_regions() call,
    as already done in vp_modern_remove().
    
    Fixes: fd50272 ("virtio-pci: introduce modern device module")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Message-Id: <237109725aad2c3c03d14549f777b1927c84b045.1648977064.git.christophe.jaillet@wanadoo.fr>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tititiou36 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6efb552 View commit details
    Browse the repository at this point in the history
  36. net/mlx5: Don't use already freed action pointer

    [ Upstream commit 80b2bd7 ]
    
    The call to mlx5dr_action_destroy() releases "action" memory. That
    pointer is set to miss_action later and generates the following smatch
    error:
    
     drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c:53 set_miss_action()
     warn: 'action' was already freed.
    
    Make sure that the pointer is always valid by setting NULL after destroy.
    
    Fixes: 6a48fae ("net/mlx5: Add direct rule fs_cmd implementation")
    Reported-by: Dan Carpenter <[email protected]>
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rleon authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c3c8a86 View commit details
    Browse the repository at this point in the history
  37. net/mlx5e: TC NIC mode, fix tc chains miss table

    [ Upstream commit 66cb64e ]
    
    The cited commit changed promisc table to be created on demand with the
    highest priority in the NIC table replacing the vlan table, this caused
    tc NIC tables miss flow to skip the prmoisc table because it use vlan
    table as miss table.
    
    OVS offload in NIC mode use promisc by default so any unicast packet
    which will be handled by tc NIC tables miss flow will skip the promisc
    rule and will be dropped.
    
    Fix this by adding new empty table in new tc level with low priority and
    point the nic tc chain miss to it, the new table is managed so it will
    point to vlan table if promisc is disabled and to promisc table if enabled.
    
    Fixes: 1c46d74 ("net/mlx5e: Optimize promiscuous mode")
    Signed-off-by: Maor Dickman <[email protected]>
    Reviewed-by: Paul Blakey <[email protected]>
    Reviewed-by: Ariel Levkovich <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dickmanmaor authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    18d1864 View commit details
    Browse the repository at this point in the history
  38. net/mlx5: CT: Fix header-rewrite re-use for tupels

    [ Upstream commit 1f2856c ]
    
    Tuple entries that don't have nat configured for them
    which are added to the ct nat table will always create
    a new modify header, as we don't check for possible
    re-use on them. The same for tuples that have nat configured
    for them but are added to ct table.
    
    Fix the above by only avoiding wasteful re-use lookup
    for actually natted entries in ct nat table.
    
    Fixes: 7fac5c2 ("net/mlx5: CT: Avoid reusing modify header context for natted entries")
    Signed-off-by: Paul Blakey <[email protected]>
    Reviewed-by: Ariel Levkovich <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Paul Blakey authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    cdd1d5c View commit details
    Browse the repository at this point in the history
  39. net/mlx5e: Disable softirq in mlx5e_activate_rq to avoid race condition

    [ Upstream commit 2e642af ]
    
    When the driver activates the channels, it assumes NAPI isn't running
    yet. mlx5e_activate_rq posts a NOP WQE to ICOSQ to trigger a hardware
    interrupt and start NAPI, which will run mlx5e_alloc_rx_mpwqe and post
    UMR WQEs to ICOSQ to be able to receive packets with striding RQ.
    
    Unfortunately, a race condition is possible if NAPI is triggered by
    something else (for example, TX) at a bad timing, before
    mlx5e_activate_rq finishes. In this case, mlx5e_alloc_rx_mpwqe may post
    UMR WQEs to ICOSQ, and with the bad timing, the wqe_info of the first
    UMR may be overwritten by the wqe_info of the NOP posted by
    mlx5e_activate_rq.
    
    The consequence is that icosq->db.wqe_info[0].num_wqebbs will be changed
    from MLX5E_UMR_WQEBBS to 1, disrupting the integrity of the array-based
    linked list in wqe_info[]. mlx5e_poll_ico_cq will hang in an infinite
    loop after processing wqe_info[0], because after the corruption, the
    next item to be processed will be wqe_info[1], which is filled with
    zeros, and `sqcc += wi->num_wqebbs` will never move further.
    
    This commit fixes this race condition by using async_icosq to post the
    NOP and trigger the interrupt. async_icosq is always protected with a
    spinlock, eliminating the race condition.
    
    Fixes: bc77b24 ("net/mlx5e: Add fragmented memory support for RX multi packet WQE")
    Signed-off-by: Maxim Mikityanskiy <[email protected]>
    Reported-by: Karsten Nielsen <[email protected]>
    Reviewed-by: Tariq Toukan <[email protected]>
    Reviewed-by: Gal Pressman <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    nvmmax authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    bea6bd8 View commit details
    Browse the repository at this point in the history
  40. net/mlx5: correct ECE offset in query qp output

    [ Upstream commit 3fc2a9e ]
    
    ECE field should be after opt_param_mask in query qp output.
    
    Fixes: 6b646a7 ("net/mlx5: Add ability to read and write ECE options")
    Signed-off-by: Changcheng Liu <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    changchengx authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    68f16c8 View commit details
    Browse the repository at this point in the history
  41. net/mlx5e: Update netdev features after changing XDP state

    [ Upstream commit f6279f1 ]
    
    Some features (LRO, HW GRO) conflict with XDP. If there is an attempt to
    enable such features while XDP is active, they will be set to `off
    [requested on]`. In order to activate these features after XDP is turned
    off, the driver needs to call netdev_update_features(). This commit adds
    this missing call after XDP state changes.
    
    Fixes: cf6e34c ("net/mlx5e: Properly block LRO when XDP is enabled")
    Fixes: b0617e7 ("net/mlx5e: Properly block HW GRO when XDP is enabled")
    Signed-off-by: Maxim Mikityanskiy <[email protected]>
    Reviewed-by: Tariq Toukan <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    nvmmax authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    bcf5e89 View commit details
    Browse the repository at this point in the history
  42. net: sched: add barrier to fix packet stuck problem for lockless qdisc

    [ Upstream commit 2e8728c ]
    
    In qdisc_run_end(), the spin_unlock() only has store-release semantic,
    which guarantees all earlier memory access are visible before it. But
    the subsequent test_bit() has no barrier semantics so may be reordered
    ahead of the spin_unlock(). The store-load reordering may cause a packet
    stuck problem.
    
    The concurrent operations can be described as below,
             CPU 0                      |          CPU 1
       qdisc_run_end()                  |     qdisc_run_begin()
              .                         |           .
     ----> /* may be reorderd here */   |           .
    |         .                         |           .
    |     spin_unlock()                 |         set_bit()
    |         .                         |         smp_mb__after_atomic()
     ---- test_bit()                    |         spin_trylock()
              .                         |          .
    
    Consider the following sequence of events:
        CPU 0 reorder test_bit() ahead and see MISSED = 0
        CPU 1 calls set_bit()
        CPU 1 calls spin_trylock() and return fail
        CPU 0 executes spin_unlock()
    
    At the end of the sequence, CPU 0 calls spin_unlock() and does nothing
    because it see MISSED = 0. The skb on CPU 1 has beed enqueued but no one
    take it, until the next cpu pushing to the qdisc (if ever ...) will
    notice and dequeue it.
    
    This patch fix this by adding one explicit barrier. As spin_unlock() and
    test_bit() ordering is a store-load ordering, a full memory barrier
    smp_mb() is needed here.
    
    Fixes: a90c57f ("net: sched: fix packet stuck problem for lockless qdisc")
    Signed-off-by: Guoju Fang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    goldhorn authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d311991 View commit details
    Browse the repository at this point in the history
  43. tcp: tcp_rtx_synack() can be called from process context

    [ Upstream commit 0a375c8 ]
    
    Laurent reported the enclosed report [1]
    
    This bug triggers with following coditions:
    
    0) Kernel built with CONFIG_DEBUG_PREEMPT=y
    
    1) A new passive FastOpen TCP socket is created.
       This FO socket waits for an ACK coming from client to be a complete
       ESTABLISHED one.
    2) A socket operation on this socket goes through lock_sock()
       release_sock() dance.
    3) While the socket is owned by the user in step 2),
       a retransmit of the SYN is received and stored in socket backlog.
    4) At release_sock() time, the socket backlog is processed while
       in process context.
    5) A SYNACK packet is cooked in response of the SYN retransmit.
    6) -> tcp_rtx_synack() is called in process context.
    
    Before blamed commit, tcp_rtx_synack() was always called from BH handler,
    from a timer handler.
    
    Fix this by using TCP_INC_STATS() & NET_INC_STATS()
    which do not assume caller is in non preemptible context.
    
    [1]
    BUG: using __this_cpu_add() in preemptible [00000000] code: epollpep/2180
    caller is tcp_rtx_synack.part.0+0x36/0xc0
    CPU: 10 PID: 2180 Comm: epollpep Tainted: G           OE     5.16.0-0.bpo.4-amd64 pop-os#1  Debian 5.16.12-1~bpo11+1
    Hardware name: Supermicro SYS-5039MC-H8TRF/X11SCD-F, BIOS 1.7 11/23/2021
    Call Trace:
     <TASK>
     dump_stack_lvl+0x48/0x5e
     check_preemption_disabled+0xde/0xe0
     tcp_rtx_synack.part.0+0x36/0xc0
     tcp_rtx_synack+0x8d/0xa0
     ? kmem_cache_alloc+0x2e0/0x3e0
     ? apparmor_file_alloc_security+0x3b/0x1f0
     inet_rtx_syn_ack+0x16/0x30
     tcp_check_req+0x367/0x610
     tcp_rcv_state_process+0x91/0xf60
     ? get_nohz_timer_target+0x18/0x1a0
     ? lock_timer_base+0x61/0x80
     ? preempt_count_add+0x68/0xa0
     tcp_v4_do_rcv+0xbd/0x270
     __release_sock+0x6d/0xb0
     release_sock+0x2b/0x90
     sock_setsockopt+0x138/0x1140
     ? __sys_getsockname+0x7e/0xc0
     ? aa_sk_perm+0x3e/0x1a0
     __sys_setsockopt+0x198/0x1e0
     __x64_sys_setsockopt+0x21/0x30
     do_syscall_64+0x38/0xc0
     entry_SYSCALL_64_after_hwframe+0x44/0xae
    
    Fixes: 168a8f5 ("tcp: TCP Fast Open Server - main code path")
    Signed-off-by: Eric Dumazet <[email protected]>
    Reported-by: Laurent Fasnacht <[email protected]>
    Acked-by: Neal Cardwell <[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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    bdc28a8 View commit details
    Browse the repository at this point in the history
  44. vdpa: ifcvf: set pci driver data in probe

    [ Upstream commit bd8bb9a ]
    
    We should set the pci driver data in probe instead of the vdpa device
    adding callback. Otherwise if no vDPA device is created we will lose
    the pointer to the management device.
    
    Fixes: 6b5df34 ("vDPA/ifcvf: implement management netlink framework for ifcvf")
    Tested-by: Zheyu Ma <[email protected]>
    Signed-off-by: Jason Wang <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jasowang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9901e67 View commit details
    Browse the repository at this point in the history
  45. octeontx2-af: fix error code in is_valid_offset()

    [ Upstream commit f3d671c ]
    
    The is_valid_offset() function returns success/true if the call to
    validate_and_get_cpt_blkaddr() fails.
    
    Fixes: ecad2ce ("octeontx2-af: cn10k: Add mailbox to configure reassembly timeout")
    Signed-off-by: Dan Carpenter <[email protected]>
    Link: https://lore.kernel.org/r/YpXDrTPb8qV01JSP@kili
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dan Carpenter authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    96edf98 View commit details
    Browse the repository at this point in the history
  46. macsec: fix UAF bug for real_dev

    [ Upstream commit 196a888 ]
    
    Create a new macsec device but not get reference to real_dev. That can
    not ensure that real_dev is freed after macsec. That will trigger the
    UAF bug for real_dev as following:
    
    ==================================================================
    BUG: KASAN: use-after-free in macsec_get_iflink+0x5f/0x70 drivers/net/macsec.c:3662
    Call Trace:
     ...
     macsec_get_iflink+0x5f/0x70 drivers/net/macsec.c:3662
     dev_get_iflink+0x73/0xe0 net/core/dev.c:637
     default_operstate net/core/link_watch.c:42 [inline]
     rfc2863_policy+0x233/0x2d0 net/core/link_watch.c:54
     linkwatch_do_dev+0x2a/0x150 net/core/link_watch.c:161
    
    Allocated by task 22209:
     ...
     alloc_netdev_mqs+0x98/0x1100 net/core/dev.c:10549
     rtnl_create_link+0x9d7/0xc00 net/core/rtnetlink.c:3235
     veth_newlink+0x20e/0xa90 drivers/net/veth.c:1748
    
    Freed by task 8:
     ...
     kfree+0xd6/0x4d0 mm/slub.c:4552
     kvfree+0x42/0x50 mm/util.c:615
     device_release+0x9f/0x240 drivers/base/core.c:2229
     kobject_cleanup lib/kobject.c:673 [inline]
     kobject_release lib/kobject.c:704 [inline]
     kref_put include/linux/kref.h:65 [inline]
     kobject_put+0x1c8/0x540 lib/kobject.c:721
     netdev_run_todo+0x72e/0x10b0 net/core/dev.c:10327
    
    After commit faab39f ("net: allow out-of-order netdev unregistration")
    and commit e5f80fc ("ipv6: give an IPv6 dev to blackhole_netdev"), we
    can add dev_hold_track() in macsec_dev_init() and dev_put_track() in
    macsec_free_netdev() to fix the problem.
    
    Fixes: 2bce1eb ("macsec: fix refcnt leak in module exit routine")
    Reported-by: [email protected]
    Signed-off-by: Ziyang Xuan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ziyang Xuan authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    78933cb View commit details
    Browse the repository at this point in the history
  47. s390/mcck: isolate SIE instruction when setting CIF_MCCK_GUEST flag

    [ Upstream commit 29ccaa4 ]
    
    Commit d768bd8 ("s390: add options to change branch prediction
    behaviour for the kernel") introduced .Lsie_exit label - supposedly
    to fence off SIE instruction. However, the corresponding address
    range length .Lsie_crit_mcck_length was not updated, which led to
    BPON code potentionally marked with CIF_MCCK_GUEST flag.
    
    Both .Lsie_exit and .Lsie_crit_mcck_length were removed with commit
    0b0ed65 ("s390: remove critical section cleanup from entry.S"),
    but the issue persisted - currently BPOFF and BPENTER macros might
    get wrongly considered by the machine check handler as a guest.
    
    Fixes: d768bd8 ("s390: add options to change branch prediction behaviour for the kernel")
    Reviewed-by: Sven Schnelle <[email protected]>
    Reviewed-by: Christian Borntraeger <[email protected]>
    Signed-off-by: Alexander Gordeev <[email protected]>
    Signed-off-by: Heiko Carstens <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Alexander Gordeev authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d14c1eb View commit details
    Browse the repository at this point in the history
  48. regulator: mt6315-regulator: fix invalid allowed mode

    [ Upstream commit 28cbc2d ]
    
    In the binding example, the regulator mode 4 is shown as a valid mode,
    but the driver actually only support mode 0 to 2:
    
    This generates an error in dmesg when copy/pasting the binding example:
    [    0.306080] vbuck1: invalid regulator-allowed-modes element 4
    [    0.307290] vbuck2: invalid regulator-allowed-modes element 4
    
    This commit fixes this error by removing the invalid mode from the
    examples.
    
    Fixes: 977fb5b ("regulator: document binding for MT6315 regulator")
    Signed-off-by: Fabien Parent <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Fabo authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c3a88fe View commit details
    Browse the repository at this point in the history
  49. gpio: pca953x: use the correct register address to do regcache sync

    [ Upstream commit 43624ed ]
    
    For regcache_sync_region, need to use pca953x_recalc_addr() to get
    the real register address.
    
    Fixes: b765743 ("gpio: pca953x: Restore registers after suspend/resume cycle")
    Signed-off-by: Haibo Chen <[email protected]>
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Haibo Chen authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d7c3b48 View commit details
    Browse the repository at this point in the history
  50. afs: Fix infinite loop found by xfstest generic/676

    [ Upstream commit 17eabd4 ]
    
    In AFS, a directory is handled as a file that the client downloads and
    parses locally for the purposes of performing lookup and getdents
    operations.  The in-kernel afs filesystem has a number of functions that
    do this.
    
    A directory file is arranged as a series of 2K blocks divided into
    32-byte slots, where a directory entry occupies one or more slots, plus
    each block starts with one or more metadata blocks.
    
    When parsing a block, if the last slots are occupied by a dirent that
    occupies more than a single slot and the file position points at a slot
    that's not the initial one, the logic in afs_dir_iterate_block() that
    skips over it won't advance the file pointer to the end of it.  This
    will cause an infinite loop in getdents() as it will keep retrying that
    block and failing to advance beyond the final entry.
    
    Fix this by advancing the file pointer if the next entry will be beyond
    it when we skip a block.
    
    This was found by the generic/676 xfstest but can also be triggered with
    something like:
    
    	~/xfstests-dev/src/t_readdir_3 /xfstest.test/z 4000 1
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: David Howells <[email protected]>
    Reviewed-by: Marc Dionne <[email protected]>
    Tested-by: Marc Dionne <[email protected]>
    cc: [email protected]
    Link: http://lore.kernel.org/r/165391973497.110268.2939296942213894166.stgit@warthog.procyon.org.uk/
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dhowells authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6c46fa5 View commit details
    Browse the repository at this point in the history
  51. drm/msm/dp: Always clear mask bits to disable interrupts at dp_ctrl_r…

    …eset_irq_ctrl()
    
    [ Upstream commit 993a2ad ]
    
    dp_catalog_ctrl_reset() will software reset DP controller. But it will
    not reset programmable registers to default value. DP driver still have
    to clear mask bits to interrupt status registers to disable interrupts
    after software reset of controller.
    
    At current implementation, dp_ctrl_reset_irq_ctrl() will software reset dp
    controller but did not call dp_catalog_ctrl_enable_irq(false) to clear hpd
    related interrupt mask bits to disable hpd related interrupts due to it
    mistakenly think hpd related interrupt mask bits will be cleared by software
    reset of dp controller automatically. This mistake may cause system to crash
    during suspending procedure due to unexpected irq fired and trigger event
    thread to access dp controller registers with controller clocks are disabled.
    
    This patch fixes system crash during suspending problem by removing "enable"
    flag condition checking at dp_ctrl_reset_irq_ctrl() so that hpd related
    interrupt mask bits are cleared to prevent unexpected from happening.
    
    Changes in v2:
    -- add more details commit text
    
    Changes in v3:
    -- add synchrons_irq()
    -- add atomic_t suspended
    
    Changes in v4:
    -- correct Fixes's commit ID
    -- remove synchrons_irq()
    
    Changes in v5:
    -- revise commit text
    
    Changes in v6:
    -- add event_lock to protect "suspended"
    
    Changes in v7:
    -- delete "suspended" flag
    
    Fixes: 989ebe7 ("drm/msm/dp: do not initialize phy until plugin interrupt received")
    Signed-off-by: Kuogee Hsieh <[email protected]>
    Reviewed-by: Stephen Boyd <[email protected]>
    Patchwork: https://patchwork.freedesktop.org/patch/486591/
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Abhinav Kumar <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Kuogee Hsieh authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5ebcece View commit details
    Browse the repository at this point in the history
  52. scsi: sd: Fix potential NULL pointer dereference

    [ Upstream commit 05fbde3 ]
    
    If sd_probe() sees an early error before sdkp->device is initialized,
    sd_zbc_release_disk() is called. This causes a NULL pointer dereference
    when sd_is_zoned() is called inside that function. Avoid this by removing
    the call to sd_zbc_release_disk() in sd_probe() error path.
    
    This change is safe and does not result in zone information memory leakage
    because the zone information for a zoned disk is allocated only when
    sd_revalidate_disk() is called, at which point sdkp->disk_dev is fully set,
    resulting in sd_disk_release() being called when needed to cleanup a disk
    zone information using sd_zbc_release_disk().
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 89d9475 ("sd: Implement support for ZBC devices")
    Reported-by: Dongliang Mu <[email protected]>
    Suggested-by: Christoph Hellwig <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Damien Le Moal authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    78f8e96 View commit details
    Browse the repository at this point in the history
  53. ax25: Fix ax25 session cleanup problems

    [ Upstream commit 7d8a3a4 ]
    
    There are session cleanup problems in ax25_release() and
    ax25_disconnect(). If we setup a session and then disconnect,
    the disconnected session is still in "LISTENING" state that
    is shown below.
    
    Active AX.25 sockets
    Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q
    DL9SAU-4   DL9SAU-3   ???     LISTENING    000/000  0       0
    DL9SAU-3   DL9SAU-4   ???     LISTENING    000/000  0       0
    
    The first reason is caused by del_timer_sync() in ax25_release().
    The timers of ax25 are used for correct session cleanup. If we use
    ax25_release() to close ax25 sessions and ax25_dev is not null,
    the del_timer_sync() functions in ax25_release() will execute.
    As a result, the sessions could not be cleaned up correctly,
    because the timers have stopped.
    
    In order to solve this problem, this patch adds a device_up flag
    in ax25_dev in order to judge whether the device is up. If there
    are sessions to be cleaned up, the del_timer_sync() in
    ax25_release() will not execute. What's more, we add ax25_cb_del()
    in ax25_kill_by_device(), because the timers have been stopped
    and there are no functions that could delete ax25_cb if we do not
    call ax25_release(). Finally, we reorder the position of
    ax25_list_lock in ax25_cb_del() in order to synchronize among
    different functions that call ax25_cb_del().
    
    The second reason is caused by improper check in ax25_disconnect().
    The incoming ax25 sessions which ax25->sk is null will close
    heartbeat timer, because the check "if(!ax25->sk || ..)" is
    satisfied. As a result, the session could not be cleaned up properly.
    
    In order to solve this problem, this patch changes the improper
    check to "if(ax25->sk && ..)" in ax25_disconnect().
    
    What`s more, the ax25_disconnect() may be called twice, which is
    not necessary. For example, ax25_kill_by_device() calls
    ax25_disconnect() and sets ax25->state to AX25_STATE_0, but
    ax25_release() calls ax25_disconnect() again.
    
    In order to solve this problem, this patch add a check in
    ax25_release(). If the flag of ax25->sk equals to SOCK_DEAD,
    the ax25_disconnect() in ax25_release() should not be executed.
    
    Fixes: 82e3175 ("ax25: Fix UAF bugs in ax25 timers")
    Fixes: 8a367e7 ("ax25: Fix segfault after sock connection timeout")
    Reported-and-tested-by: Thomas Osterried <[email protected]>
    Signed-off-by: Duoming Zhou <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    stonezdm authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d6b3e4d View commit details
    Browse the repository at this point in the history
  54. tipc: check attribute length for bearer name

    [ Upstream commit 7f36f79 ]
    
    syzbot reported uninit-value:
    =====================================================
    BUG: KMSAN: uninit-value in string_nocheck lib/vsprintf.c:644 [inline]
    BUG: KMSAN: uninit-value in string+0x4f9/0x6f0 lib/vsprintf.c:725
     string_nocheck lib/vsprintf.c:644 [inline]
     string+0x4f9/0x6f0 lib/vsprintf.c:725
     vsnprintf+0x2222/0x3650 lib/vsprintf.c:2806
     vprintk_store+0x537/0x2150 kernel/printk/printk.c:2158
     vprintk_emit+0x28b/0xab0 kernel/printk/printk.c:2256
     vprintk_default+0x86/0xa0 kernel/printk/printk.c:2283
     vprintk+0x15f/0x180 kernel/printk/printk_safe.c:50
     _printk+0x18d/0x1cf kernel/printk/printk.c:2293
     tipc_enable_bearer net/tipc/bearer.c:371 [inline]
     __tipc_nl_bearer_enable+0x2022/0x22a0 net/tipc/bearer.c:1033
     tipc_nl_bearer_enable+0x6c/0xb0 net/tipc/bearer.c:1042
     genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline]
    
    - Do sanity check the attribute length for TIPC_NLA_BEARER_NAME.
    - Do not use 'illegal name' in printing message.
    
    Reported-by: [email protected]
    Fixes: cb30a63 ("tipc: refactor function tipc_enable_bearer()")
    Acked-by: Jon Maloy <[email protected]>
    Signed-off-by: Hoang Le <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Hoang Le authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    292be63 View commit details
    Browse the repository at this point in the history
  55. driver core: Fix wait_for_device_probe() & deferred_probe_timeout int…

    …eraction
    
    [ Upstream commit 5ee76c2 ]
    
    Mounting NFS rootfs was timing out when deferred_probe_timeout was
    non-zero [1].  This was because ip_auto_config() initcall times out
    waiting for the network interfaces to show up when
    deferred_probe_timeout was non-zero. While ip_auto_config() calls
    wait_for_device_probe() to make sure any currently running deferred
    probe work or asynchronous probe finishes, that wasn't sufficient to
    account for devices being deferred until deferred_probe_timeout.
    
    Commit 35a6723 ("driver core: Ensure wait_for_device_probe() waits
    until the deferred_probe_timeout fires") tried to fix that by making
    sure wait_for_device_probe() waits for deferred_probe_timeout to expire
    before returning.
    
    However, if wait_for_device_probe() is called from the kernel_init()
    context:
    
    - Before deferred_probe_initcall() [2], it causes the boot process to
      hang due to a deadlock.
    
    - After deferred_probe_initcall() [3], it blocks kernel_init() from
      continuing till deferred_probe_timeout expires and beats the point of
      deferred_probe_timeout that's trying to wait for userspace to load
      modules.
    
    Neither of this is good. So revert the changes to
    wait_for_device_probe().
    
    [1] - https://lore.kernel.org/lkml/TYAPR01MB45443DF63B9EF29054F7C41FD8C60@TYAPR01MB4544.jpnprd01.prod.outlook.com/
    [2] - https://lore.kernel.org/lkml/[email protected]/
    [3] - https://lore.kernel.org/lkml/[email protected]/
    
    Fixes: 35a6723 ("driver core: Ensure wait_for_device_probe() waits until the deferred_probe_timeout fires")
    Cc: John Stultz <[email protected]>
    Cc: "David S. Miller" <[email protected]>
    Cc: Alexey Kuznetsov <[email protected]>
    Cc: Hideaki YOSHIFUJI <[email protected]>
    Cc: Jakub Kicinski <[email protected]>
    Cc: Rob Herring <[email protected]>
    Cc: Geert Uytterhoeven <[email protected]>
    Cc: Yoshihiro Shimoda <[email protected]>
    Cc: Robin Murphy <[email protected]>
    Cc: Andy Shevchenko <[email protected]>
    Cc: Sudeep Holla <[email protected]>
    Cc: Andy Shevchenko <[email protected]>
    Cc: Naresh Kamboju <[email protected]>
    Cc: Basil Eljuse <[email protected]>
    Cc: Ferry Toth <[email protected]>
    Cc: Arnd Bergmann <[email protected]>
    Cc: Anders Roxell <[email protected]>
    Cc: [email protected]
    Reported-by: Nathan Chancellor <[email protected]>
    Reported-by: Sebastian Andrzej Siewior <[email protected]>
    Tested-by: Geert Uytterhoeven <[email protected]>
    Acked-by: John Stultz <[email protected]>
    Signed-off-by: Saravana Kannan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Reviewed-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Saravana Kannan authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5282294 View commit details
    Browse the repository at this point in the history
  56. perf evsel: Fixes topdown events in a weak group for the hybrid platform

    [ Upstream commit 39d5f41 ]
    
    The patch ("perf evlist: Keep topdown counters in weak group") fixes the
    perf metrics topdown event issue when the topdown events are in a weak
    group on a non-hybrid platform. However, it doesn't work for the hybrid
    platform.
    
      $./perf stat -e '{cpu_core/slots/,cpu_core/topdown-bad-spec/,
      cpu_core/topdown-be-bound/,cpu_core/topdown-fe-bound/,
      cpu_core/topdown-retiring/,cpu_core/branch-instructions/,
      cpu_core/branch-misses/,cpu_core/bus-cycles/,cpu_core/cache-misses/,
      cpu_core/cache-references/,cpu_core/cpu-cycles/,cpu_core/instructions/,
      cpu_core/mem-loads/,cpu_core/mem-stores/,cpu_core/ref-cycles/,
      cpu_core/cache-misses/,cpu_core/cache-references/}:W' -a sleep 1
    
      Performance counter stats for 'system wide':
    
           751,765,068      cpu_core/slots/                        (84.07%)
       <not supported>      cpu_core/topdown-bad-spec/
       <not supported>      cpu_core/topdown-be-bound/
       <not supported>      cpu_core/topdown-fe-bound/
       <not supported>      cpu_core/topdown-retiring/
            12,398,197      cpu_core/branch-instructions/          (84.07%)
             1,054,218      cpu_core/branch-misses/                (84.24%)
           539,764,637      cpu_core/bus-cycles/                   (84.64%)
                14,683      cpu_core/cache-misses/                 (84.87%)
             7,277,809      cpu_core/cache-references/             (77.30%)
           222,299,439      cpu_core/cpu-cycles/                   (77.28%)
            63,661,714      cpu_core/instructions/                 (84.85%)
                     0      cpu_core/mem-loads/                    (77.29%)
            12,271,725      cpu_core/mem-stores/                   (77.30%)
           542,241,102      cpu_core/ref-cycles/                   (84.85%)
                 8,854      cpu_core/cache-misses/                 (76.71%)
             7,179,013      cpu_core/cache-references/             (76.31%)
    
             1.003245250 seconds time elapsed
    
    A hybrid platform has a different PMU name for the core PMUs, while
    the current perf hard code the PMU name "cpu".
    
    The evsel->pmu_name can be used to replace the "cpu" to fix the issue.
    For a hybrid platform, the pmu_name must be non-NULL. Because there are
    at least two core PMUs. The PMU has to be specified.
    For a non-hybrid platform, the pmu_name may be NULL. Because there is
    only one core PMU, "cpu". For a NULL pmu_name, we can safely assume that
    it is a "cpu" PMU.
    
    In case other PMUs also define the "slots" event, checking the PMU type
    as well.
    
    With the patch,
    
      $ perf stat -e '{cpu_core/slots/,cpu_core/topdown-bad-spec/,
      cpu_core/topdown-be-bound/,cpu_core/topdown-fe-bound/,
      cpu_core/topdown-retiring/,cpu_core/branch-instructions/,
      cpu_core/branch-misses/,cpu_core/bus-cycles/,cpu_core/cache-misses/,
      cpu_core/cache-references/,cpu_core/cpu-cycles/,cpu_core/instructions/,
      cpu_core/mem-loads/,cpu_core/mem-stores/,cpu_core/ref-cycles/,
      cpu_core/cache-misses/,cpu_core/cache-references/}:W' -a sleep 1
    
      Performance counter stats for 'system wide':
    
         766,620,266   cpu_core/slots/                                        (84.06%)
          73,172,129   cpu_core/topdown-bad-spec/ #    9.5% bad speculation   (84.06%)
         193,443,341   cpu_core/topdown-be-bound/ #    25.0% backend bound    (84.06%)
         403,940,929   cpu_core/topdown-fe-bound/ #    52.3% frontend bound   (84.06%)
         102,070,237   cpu_core/topdown-retiring/ #    13.2% retiring         (84.06%)
          12,364,429   cpu_core/branch-instructions/                          (84.03%)
           1,080,124   cpu_core/branch-misses/                                (84.24%)
         564,120,383   cpu_core/bus-cycles/                                   (84.65%)
              36,979   cpu_core/cache-misses/                                 (84.86%)
           7,298,094   cpu_core/cache-references/                             (77.30%)
         227,174,372   cpu_core/cpu-cycles/                                   (77.31%)
          63,886,523   cpu_core/instructions/                                 (84.87%)
                   0   cpu_core/mem-loads/                                    (77.31%)
          12,208,782   cpu_core/mem-stores/                                   (77.31%)
         566,409,738   cpu_core/ref-cycles/                                   (84.87%)
              23,118   cpu_core/cache-misses/                                 (76.71%)
           7,212,602   cpu_core/cache-references/                             (76.29%)
    
           1.003228667 seconds time elapsed
    
    Signed-off-by: Kan Liang <[email protected]>
    Acked-by: Ian Rogers <[email protected]>
    Cc: Adrian Hunter <[email protected]>
    Cc: Andi Kleen <[email protected]>
    Cc: Ingo Molnar <[email protected]>
    Cc: Jiri Olsa <[email protected]>
    Cc: Namhyung Kim <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Stephane Eranian <[email protected]>
    Cc: Xing Zhengjun <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Kan Liang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    bde1c93 View commit details
    Browse the repository at this point in the history
  57. perf parse-events: Move slots event for the hybrid platform too

    [ Upstream commit e0e14cd ]
    
    The commit 94dbfd6 ("perf parse-events: Architecture specific
    leader override") introduced a feature to reorder the slots event to
    fulfill the restriction of the perf metrics topdown group. But the
    feature doesn't work on the hybrid machine.
    
      $ perf stat -e "{cpu_core/instructions/,cpu_core/slots/,cpu_core/topdown-retiring/}" -a sleep 1
    
       Performance counter stats for 'system wide':
    
           <not counted>      cpu_core/instructions/
           <not counted>      cpu_core/slots/
         <not supported>      cpu_core/topdown-retiring/
    
             1.002871801 seconds time elapsed
    
    A hybrid platform has a different PMU name for the core PMUs, while
    current perf hard code the PMU name "cpu".
    
    Introduce a new function to check whether the system supports the perf
    metrics feature. The result is cached for the future usage.
    
    For X86, the core PMU name always has "cpu" prefix.
    
    With the patch:
    
      $ perf stat -e "{cpu_core/instructions/,cpu_core/slots/,cpu_core/topdown-retiring/}" -a sleep 1
    
       Performance counter stats for 'system wide':
    
              76,337,010      cpu_core/slots/
              10,416,809      cpu_core/instructions/
              11,692,372      cpu_core/topdown-retiring/
    
             1.002805453 seconds time elapsed
    
    Reviewed-by: Ian Rogers <[email protected]>
    Signed-off-by: Kan Liang <[email protected]>
    Cc: Adrian Hunter <[email protected]>
    Cc: Andi Kleen <[email protected]>
    Cc: Ingo Molnar <[email protected]>
    Cc: Jiri Olsa <[email protected]>
    Cc: Namhyung Kim <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Stephane Eranian <[email protected]>
    Cc: Xing Zhengjun <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Kan Liang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6384ace View commit details
    Browse the repository at this point in the history
  58. perf record: Support sample-read topdown metric group for hybrid plat…

    …forms
    
    [ Upstream commit 151e7d7 ]
    
    With the hardware TopDown metrics feature, the sample-read feature should
    be supported for a TopDown group, e.g., sample a non-topdown event and read
    a Topdown metric group. But the current perf record code errors are out.
    
    For a TopDown metric group,the slots event must be the leader of the group,
    but the leader slots event doesn't support sampling. To support sample-read
    the TopDown metric group, uses the 2nd event of the group as the "leader"
    for the purposes of sampling.
    
    Only the platform with the TopDown metric feature supports sample-read the
    topdown group. In commit acb6515 ("perf record: Support sample-read
    topdown metric group"), it adds arch_topdown_sample_read() to indicate
    whether the TopDown group supports sample-read, it should only work on the
    non-hybrid systems, this patch extends the support for hybrid platforms.
    
    Before:
    
      # ./perf record -e "{cpu_core/slots/,cpu_core/cycles/,cpu_core/topdown-retiring/}:S" -a sleep 1
      Error:
      The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cpu_core/topdown-retiring/).
      /bin/dmesg | grep -i perf may provide additional information.
    
    After:
    
      # ./perf record -e "{cpu_core/slots/,cpu_core/cycles/,cpu_core/topdown-retiring/}:S" -a sleep 1
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.238 MB perf.data (369 samples) ]
    
    Fixes: acb6515 ("perf record: Support sample-read topdown metric group")
    Reviewed-by: Kan Liang <[email protected]>
    Signed-off-by: Zhengjun Xing <[email protected]>
    Acked-by: Ian Rogers <[email protected]>
    Cc: Adrian Hunter <[email protected]>
    Cc: Alexander Shishkin <[email protected]>
    Cc: Andi Kleen <[email protected]>
    Cc: Ingo Molnar <[email protected]>
    Cc: Jiri Olsa <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ZhengjunXing authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    93fc86e View commit details
    Browse the repository at this point in the history
  59. perf c2c: Fix sorting in percent_rmt_hitm_cmp()

    [ Upstream commit b24192a ]
    
    The function percent_rmt_hitm_cmp() wrongly uses local HITMs for
    sorting remote HITMs.
    
    Since this function is to sort cache lines for remote HITMs, this patch
    changes to use 'rmt_hitm' field for correct sorting.
    
    Fixes: 9cb3500 ("perf c2c report: Add hitm/store percent related sort keys")
    Signed-off-by: Leo Yan <[email protected]>
    Acked-by: Namhyung Kim <[email protected]>
    Cc: Alexander Shishkin <[email protected]>
    Cc: Ingo Molnar <[email protected]>
    Cc: Jiri Olsa <[email protected]>
    Cc: Joe Mario <[email protected]>
    Cc: Mark Rutland <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Leo Yan authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    3267c0e View commit details
    Browse the repository at this point in the history
  60. Bluetooth: MGMT: Add conditions for setting HCI_CONN_FLAG_REMOTE_WAKEUP

    [ Upstream commit a9a3476 ]
    
    HCI_CONN_FLAG_REMOTE_WAKEUP can only be set if device can be programmed
    in the allowlist which in case of device using RPA requires LL Privacy
    support to be enabled.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215768
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Marcel Holtmann <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Vudentz authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    60c465c View commit details
    Browse the repository at this point in the history
  61. Bluetooth: hci_sync: Fix attempting to suspend with unfiltered passiv…

    …e scan
    
    [ Upstream commit 3b42055 ]
    
    When suspending the passive scanning _must_ have its filter_policy set
    to 0x01 to use the accept list otherwise _any_ advertise report would
    end up waking up the system.
    
    In order to fix the filter_policy the code now checks for
    hdev->suspended && HCI_CONN_FLAG_REMOTE_WAKEUP
    first, since the MGMT_OP_SET_DEVICE_FLAGS will reject any attempt to
    set HCI_CONN_FLAG_REMOTE_WAKEUP when it cannot be programmed in the
    acceptlist, so it can return success causing the proper filter_policy
    to be used.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215768
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Marcel Holtmann <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Vudentz authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2ebc130 View commit details
    Browse the repository at this point in the history
  62. bluetooth: don't use bitmaps for random flag accesses

    [ Upstream commit e1cff70 ]
    
    The bluetooth code uses our bitmap infrastructure for the two bits (!)
    of connection setup flags, and in the process causes odd problems when
    it converts between a bitmap and just the regular values of said bits.
    
    It's completely pointless to do things like bitmap_to_arr32() to convert
    a bitmap into a u32.  It shoudln't have been a bitmap in the first
    place.  The reason to use bitmaps is if you have arbitrary number of
    bits you want to manage (not two!), or if you rely on the atomicity
    guarantees of the bitmap setting and clearing.
    
    The code could use an "atomic_t" and use "atomic_or/andnot()" to set and
    clear the bit values, but considering that it then copies the bitmaps
    around with "bitmap_to_arr32()" and friends, there clearly cannot be a
    lot of atomicity requirements.
    
    So just use a regular integer.
    
    In the process, this avoids the warnings about erroneous use of
    bitmap_from_u64() which were triggered on 32-bit architectures when
    conversion from a u64 would access two words (and, surprise, surprise,
    only one word is needed - and indeed overkill - for a 2-bit bitmap).
    
    That was always problematic, but the compiler seems to notice it and
    warn about the invalid pattern only after commit 0a97953 ("lib: add
    bitmap_{from,to}_arr64") changed the exact implementation details of
    'bitmap_from_u64()', as reported by Sudip Mukherjee and Stephen Rothwell.
    
    Fixes: fe92ee6 ("Bluetooth: hci_core: Rework hci_conn_params flags")
    Link: https://lore.kernel.org/all/YpyJ9qTNHJzz0FHY@debian/
    Link: https://lore.kernel.org/all/[email protected]/
    Link: https://lore.kernel.org/all/[email protected]/
    Reported-by: Stephen Rothwell <[email protected]>
    Reported-by: Sudip Mukherjee <[email protected]>
    Reviewed-by: Yury Norov <[email protected]>
    Cc: Luiz Augusto von Dentz <[email protected]>
    Cc: Marcel Holtmann <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    torvalds authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    8926dd7 View commit details
    Browse the repository at this point in the history
  63. dmaengine: idxd: set DMA_INTERRUPT cap bit

    [ Upstream commit 4e5a4eb ]
    
    Even though idxd driver has always supported interrupt, it never actually
    set the DMA_INTERRUPT cap bit. Rectify this mistake so the interrupt
    capability is advertised.
    
    Reported-by: Ben Walker <[email protected]>
    Signed-off-by: Dave Jiang <[email protected]>
    Link: https://lore.kernel.org/r/164971497859.2201379.17925303210723708961.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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6e9a90e View commit details
    Browse the repository at this point in the history
  64. mips: cpc: Fix refcount leak in mips_cpc_default_phys_base

    [ Upstream commit 4107fa7 ]
    
    Add the missing of_node_put() to release the refcount incremented
    by of_find_compatible_node().
    
    Signed-off-by: Gong Yuanjun <[email protected]>
    Reviewed-by: Serge Semin <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    AnnYugawa authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    8f843cd View commit details
    Browse the repository at this point in the history
  65. bootconfig: Make the bootconfig.o as a normal object file

    [ Upstream commit 6014a23 ]
    
    Since the APIs defined in the bootconfig.o are not individually used,
    it is meaningless to build it as library by lib-y. Use obj-y for that.
    
    Link: https://lkml.kernel.org/r/164921225875.1090670.15565363126983098971.stgit@devnote2
    
    Cc: Padmanabha Srinivasaiah <[email protected]>
    Cc: Jonathan Corbet <[email protected]>
    Cc: Randy Dunlap <[email protected]>
    Cc: Nick Desaulniers <[email protected]>
    Cc: Sami Tolvanen <[email protected]>
    Cc: Nathan Chancellor <[email protected]>
    Cc: Linux Kbuild mailing list <[email protected]>
    Reported-by: Masahiro Yamada <[email protected]>
    Signed-off-by: Masami Hiramatsu <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mhiramat authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d7a72ac View commit details
    Browse the repository at this point in the history
  66. tracing: Make tp_printk work on syscall tracepoints

    [ Upstream commit cb1c45f ]
    
    Currently the tp_printk option has no effect on syscall tracepoint.
    When adding the kernel option parameter tp_printk, then:
    
    echo 1 > /sys/kernel/debug/tracing/events/syscalls/enable
    
    When running any application, no trace information is printed on the
    terminal.
    
    Now added printk for syscall tracepoints.
    
    Link: https://lkml.kernel.org/r/[email protected]
    
    Signed-off-by: Jeff Xie <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jeff Xie authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    67093fb View commit details
    Browse the repository at this point in the history
  67. tracing: Fix sleeping function called from invalid context on RT kernel

    [ Upstream commit 12025ab ]
    
    When setting bootparams="trace_event=initcall:initcall_start tp_printk=1" in the
    cmdline, the output_printk() was called, and the spin_lock_irqsave() was called in the
    atomic and irq disable interrupt context suitation. On the PREEMPT_RT kernel,
    these locks are replaced with sleepable rt-spinlock, so the stack calltrace will
    be triggered.
    Fix it by raw_spin_lock_irqsave when PREEMPT_RT and "trace_event=initcall:initcall_start
    tp_printk=1" enabled.
    
     BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46
     in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0
     preempt_count: 2, expected: 0
     RCU nest depth: 0, expected: 0
     Preemption disabled at:
     [<ffffffff8992303e>] try_to_wake_up+0x7e/0xba0
     CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.17.1-rt17+ pop-os#19 34c5812404187a875f32bee7977f7367f9679ea7
     Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
     Call Trace:
      <TASK>
      dump_stack_lvl+0x60/0x8c
      dump_stack+0x10/0x12
      __might_resched.cold+0x11d/0x155
      rt_spin_lock+0x40/0x70
      trace_event_buffer_commit+0x2fa/0x4c0
      ? map_vsyscall+0x93/0x93
      trace_event_raw_event_initcall_start+0xbe/0x110
      ? perf_trace_initcall_finish+0x210/0x210
      ? probe_sched_wakeup+0x34/0x40
      ? ttwu_do_wakeup+0xda/0x310
      ? trace_hardirqs_on+0x35/0x170
      ? map_vsyscall+0x93/0x93
      do_one_initcall+0x217/0x3c0
      ? trace_event_raw_event_initcall_level+0x170/0x170
      ? push_cpu_stop+0x400/0x400
      ? cblist_init_generic+0x241/0x290
      kernel_init_freeable+0x1ac/0x347
      ? _raw_spin_unlock_irq+0x65/0x80
      ? rest_init+0xf0/0xf0
      kernel_init+0x1e/0x150
      ret_from_fork+0x22/0x30
      </TASK>
    
    Link: https://lkml.kernel.org/r/[email protected]
    
    Signed-off-by: Jun Miao <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jmiao2018 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    43bfc4d View commit details
    Browse the repository at this point in the history
  68. tracing: Avoid adding tracer option before update_tracer_options

    [ Upstream commit ef9188b ]
    
    To prepare for support asynchronous tracer_init_tracefs initcall,
    avoid calling create_trace_option_files before __update_tracer_options.
    Otherwise, create_trace_option_files will show warning because
    some tracers in trace_types list are already in tr->topts.
    
    For example, hwlat_tracer call register_tracer in late_initcall,
    and global_trace.dir is already created in tracing_init_dentry,
    hwlat_tracer will be put into tr->topts.
    Then if the __update_tracer_options is executed after hwlat_tracer
    registered, create_trace_option_files find that hwlat_tracer is
    already in tr->topts.
    
    Link: https://lkml.kernel.org/r/[email protected]
    
    Link: https://lore.kernel.org/lkml/20220322133339.GA32582@xsang-OptiPlex-9020/
    Reported-by: kernel test robot <[email protected]>
    Signed-off-by: Mark-PK Tsai <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    PeikanTsai authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    a8b5c42 View commit details
    Browse the repository at this point in the history
  69. iommu/arm-smmu: fix possible null-ptr-deref in arm_smmu_device_probe()

    [ Upstream commit d9ed8af ]
    
    It will cause null-ptr-deref when using 'res', if platform_get_resource()
    returns NULL, so move using 'res' after devm_ioremap_resource() that
    will check it to avoid null-ptr-deref.
    And use devm_platform_get_and_ioremap_resource() to simplify code.
    
    Signed-off-by: Yang Yingliang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Will Deacon <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yang Yingliang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    80776a7 View commit details
    Browse the repository at this point in the history
  70. iommu/arm-smmu-v3: check return value after calling platform_get_reso…

    …urce()
    
    [ Upstream commit b131fa8 ]
    
    It will cause null-ptr-deref if platform_get_resource() returns NULL,
    we need check the return value.
    
    Signed-off-by: Yang Yingliang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Will Deacon <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yang Yingliang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    db728a8 View commit details
    Browse the repository at this point in the history
  71. f2fs: remove WARN_ON in f2fs_is_valid_blkaddr

    [ Upstream commit dc2f78e ]
    
    Syzbot triggers two WARNs in f2fs_is_valid_blkaddr and
    __is_bitmap_valid. For example, in f2fs_is_valid_blkaddr,
    if type is DATA_GENERIC_ENHANCE or DATA_GENERIC_ENHANCE_READ,
    it invokes WARN_ON if blkaddr is not in the right range.
    The call trace is as follows:
    
     f2fs_get_node_info+0x45f/0x1070
     read_node_page+0x577/0x1190
     __get_node_page.part.0+0x9e/0x10e0
     __get_node_page
     f2fs_get_node_page+0x109/0x180
     do_read_inode
     f2fs_iget+0x2a5/0x58b0
     f2fs_fill_super+0x3b39/0x7ca0
    
    Fix these two WARNs by replacing WARN_ON with dump_stack.
    
    Reported-by: [email protected]
    Signed-off-by: Dongliang Mu <[email protected]>
    Reviewed-by: Chao Yu <[email protected]>
    Signed-off-by: Jaegeuk Kim <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mudongliang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    cd6374a View commit details
    Browse the repository at this point in the history
  72. i2c: cadence: Increase timeout per message if necessary

    [ Upstream commit 96789dc ]
    
    Timeout as 1 second sets an upper limit on the length
    of the transfer executed, but there is no maximum length
    of a write or read message set in i2c_adapter_quirks for
    this controller.
    
    This upper limit affects devices that require sending
    large firmware blobs over I2C.
    
    To remove that limitation, calculate the minimal time
    necessary, plus some wiggle room, for every message and
    use it instead of the default one second, if more than
    one second.
    
    Signed-off-by: Lucas Tanure <[email protected]>
    Acked-by: Michal Simek <[email protected]>
    Signed-off-by: Wolfram Sang <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Lucas Tanure authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d8741f7 View commit details
    Browse the repository at this point in the history
  73. m68knommu: set ZERO_PAGE() to the allocated zeroed page

    [ Upstream commit dc068f4 ]
    
    The non-MMU m68k pagetable ZERO_PAGE() macro is being set to the
    somewhat non-sensical value of "virt_to_page(0)". The zeroth page
    is not in any way guaranteed to be a page full of "0". So the result
    is that ZERO_PAGE() will almost certainly contain random values.
    
    We already allocate a real "empty_zero_page" in the mm setup code shared
    between MMU m68k and non-MMU m68k. It is just not hooked up to the
    ZERO_PAGE() macro for the non-MMU m68k case.
    
    Fix ZERO_PAGE() to use the allocated "empty_zero_page" pointer.
    
    I am not aware of any specific issues caused by the old code.
    
    Link: https://lore.kernel.org/linux-m68k/[email protected]/T/#t
    Reported-by: Hugh Dickens <[email protected]>
    Signed-off-by: Greg Ungerer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Greg Ungerer authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c1af404 View commit details
    Browse the repository at this point in the history
  74. m68knommu: fix undefined reference to `_init_sp'

    [ Upstream commit a71b9e6 ]
    
    When configuring a nommu classic m68k system enabling the uboot parameter
    passing support (CONFIG_UBOOT) will produce the following compile error:
    
       m68k-linux-ld: arch/m68k/kernel/uboot.o: in function `process_uboot_commandline':
       uboot.c:(.init.text+0x32): undefined reference to `_init_sp'
    
    The logic to support this option is only used on ColdFire based platforms
    (in its head.S startup code). So make the selection of this option
    depend on building for a ColdFire based platform.
    
    Reported-by: kernel test robot <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Greg Ungerer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Greg Ungerer authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    4342cdf View commit details
    Browse the repository at this point in the history
  75. dmaengine: zynqmp_dma: In struct zynqmp_dma_chan fix desc_size data type

    [ Upstream commit f9a9f43 ]
    
    In zynqmp_dma_alloc/free_chan_resources functions there is a
    potential overflow in the below expressions.
    
    dma_alloc_coherent(chan->dev, (2 * chan->desc_size *
    		   ZYNQMP_DMA_NUM_DESCS),
    		   &chan->desc_pool_p, GFP_KERNEL);
    
    dma_free_coherent(chan->dev,(2 * ZYNQMP_DMA_DESC_SIZE(chan) *
                     ZYNQMP_DMA_NUM_DESCS),
                    chan->desc_pool_v, chan->desc_pool_p);
    
    The arguments desc_size and ZYNQMP_DMA_NUM_DESCS were 32 bit. Though
    this overflow condition is not observed but it is a potential problem
    in the case of 32-bit multiplication. Hence fix it by changing the
    desc_size data type to size_t.
    
    In addition to coverity fix it also reuse ZYNQMP_DMA_DESC_SIZE macro in
    dma_alloc_coherent API argument.
    
    Addresses-Coverity: Event overflow_before_widen.
    Signed-off-by: Radhey Shyam Pandey <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    radheyxilinx authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    4838969 View commit details
    Browse the repository at this point in the history
  76. NFSv4: Don't hold the layoutget locks across multiple RPC calls

    [ Upstream commit 6949493 ]
    
    When doing layoutget as part of the open() compound, we have to be
    careful to release the layout locks before we can call any further RPC
    calls, such as setattr(). The reason is that those calls could trigger
    a recall, which could deadlock.
    
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Anna Schumaker <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Trond Myklebust authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    08d7a26 View commit details
    Browse the repository at this point in the history
  77. video: fbdev: hyperv_fb: Allow resolutions with size > 64 MB for Gen1

    [ Upstream commit c4b4d70 ]
    
    This patch fixes a bug where GEN1 VMs doesn't allow resolutions greater
    than 64 MB size (eg 7680x4320). Unnecessary PCI check limits Gen1 VRAM
    to legacy PCI BAR size only (ie 64MB). Thus any, resolution requesting
    greater then 64MB (eg 7680x4320) would fail. MMIO region assigning this
    memory shouldn't be limited by PCI bar size.
    
    Signed-off-by: Saurabh Sengar <[email protected]>
    Reviewed-by: Dexuan Cui <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Saurabh Sengar authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    728f831 View commit details
    Browse the repository at this point in the history
  78. video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_g…

    …cu_probe/remove()
    
    [ Upstream commit d87ad45 ]
    
    In pxa3xx_gcu_probe(), the sequence of error lable is wrong, it will
    leads some resource leaked, so adjust the sequence to handle the error
    correctly, and if pxa3xx_gcu_add_buffer() fails, pxa3xx_gcu_free_buffers()
    need be called.
    In pxa3xx_gcu_remove(), add missing clk_disable_unpreprare().
    
    Signed-off-by: Yang Yingliang <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yang Yingliang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    0b26fd8 View commit details
    Browse the repository at this point in the history
  79. RISC-V: use memcpy for kexec_file mode

    [ Upstream commit b7fb4d7 ]
    
    The pointer to buffer loading kernel binaries is in kernel space for
    kexec_fil mode, When copy_from_user copies data from pointer to a block
    of memory, it checkes that the pointer is in the user space range, on
    RISCV-V that is:
    
    static inline bool __access_ok(unsigned long addr, unsigned long size)
    {
    	return size <= TASK_SIZE && addr <= TASK_SIZE - size;
    }
    
    and TASK_SIZE is 0x4000000000 for 64-bits, which now causes
    copy_from_user to reject the access of the field 'buf' of struct
    kexec_segment that is in range [CONFIG_PAGE_OFFSET - VMALLOC_SIZE,
    CONFIG_PAGE_OFFSET), is invalid user space pointer.
    
    This patch fixes this issue by skipping access_ok(), use mempcy() instead.
    
    Signed-off-by: Liao Chang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Liao Chang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    3ca8a07 View commit details
    Browse the repository at this point in the history
  80. m68knommu: fix undefined reference to `mach_get_rtc_pll'

    [ Upstream commit 1300eec ]
    
    Configuring for a nommu classic m68k target and enabling the generic rtc
    driver (CONFIG_RTC_DRV_GENERIC) will result in the following compile
    error:
    
       m68k-linux-ld: arch/m68k/kernel/time.o: in function `rtc_ioctl':
       time.c:(.text+0x82): undefined reference to `mach_get_rtc_pll'
       m68k-linux-ld: time.c:(.text+0xbc): undefined reference to `mach_set_rtc_pll'
       m68k-linux-ld: time.c:(.text+0xf4): undefined reference to `mach_set_rtc_pll'
    
    There are no definitions of "mach_set_rtc_pll" and "mach_get_rtc_pll" in the
    nommu code paths. Move these definitions and the associated "mach_hwclk",
    so that they are around their use case in time.c. This means they will
    always be defined on the builds that require them, and not on those that
    cannot use them - such as ColdFire (both with and without MMU enabled).
    
    Reported-by: kernel test robot <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Greg Ungerer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Greg Ungerer authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b3eb629 View commit details
    Browse the repository at this point in the history
  81. rtla/Makefile: Properly handle dependencies

    [ Upstream commit fe4d0d5 ]
    
    Linus had a problem compiling RTLA, saying:
    
    "[...] I wish the tracing tools would do a bit more package
    checking and helpful error messages too, rather than just
    fail with:
    
        fatal error: tracefs.h: No such file or directory"
    
    Which is indeed not a helpful message. Update the Makefile, adding
    proper checks for the dependencies, with useful information about
    how to resolve possible problems.
    
    For example, the previous error is now reported as:
    
        $ make
        ********************************************
        ** NOTICE: libtracefs version 1.3 or higher not found
        **
        ** Consider installing the latest libtracefs from your
        ** distribution, e.g., 'dnf install libtracefs' on Fedora,
        ** or from source:
        **
        **  https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
        **
        ********************************************
    
    These messages are inspired by the ones used on trace-cmd, as suggested
    by Stevel Rostedt.
    
    Link: https://lore.kernel.org/r/CAHk-=whxmA86E=csNv76DuxX_wYsg8mW15oUs3XTabu2Yc80yw@mail.gmail.com/
    
    Changes from V1:
     - Moved the rst2man check to the install phase (when it is used).
     - Removed the procps-ng lib check [1] as it is being removed.
    
    [1] a0f9f8c1030c66305c9b921057c3d483064d5529.1651220820.git.bristot@kernel.org
    
    Link: https://lkml.kernel.org/r/3f1fac776c37e4b67c876a94e5a0e45ed022ff3d.1651238057.git.bristot@kernel.org
    
    Cc: Ingo Molnar <[email protected]>
    Cc: Andrew Morton <[email protected]>
    Reported-by: Linus Torvalds <[email protected]>
    Suggested-by: Steven Rostedt <[email protected]>
    Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Daniel Bristot de Oliveira authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    10cdbc5 View commit details
    Browse the repository at this point in the history
  82. f2fs: fix to tag gcing flag on page during file defragment

    [ Upstream commit 2d1fe8a ]
    
    In order to garantee migrated data be persisted during checkpoint,
    otherwise out-of-order persistency between data and node may cause
    data corruption after SPOR.
    
    Signed-off-by: Chao Yu <[email protected]>
    Signed-off-by: Jaegeuk Kim <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    chaseyu authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9f5f8f8 View commit details
    Browse the repository at this point in the history
  83. xprtrdma: treat all calls not a bcall when bc_serv is NULL

    [ Upstream commit 11270e7 ]
    
    When a rdma server returns a fault format reply, nfs v3 client may
    treats it as a bcall when bc service is not exist.
    
    The debug message at rpcrdma_bc_receive_call are,
    
    [56579.837169] RPC:       rpcrdma_bc_receive_call: callback XID
    00000001, length=20
    [56579.837174] RPC:       rpcrdma_bc_receive_call: 00 00 00 01 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 04
    
    After that, rpcrdma_bc_receive_call will meets NULL pointer as,
    
    [  226.057890] BUG: unable to handle kernel NULL pointer dereference at
    00000000000000c8
    ...
    [  226.058704] RIP: 0010:_raw_spin_lock+0xc/0x20
    ...
    [  226.059732] Call Trace:
    [  226.059878]  rpcrdma_bc_receive_call+0x138/0x327 [rpcrdma]
    [  226.060011]  __ib_process_cq+0x89/0x170 [ib_core]
    [  226.060092]  ib_cq_poll_work+0x26/0x80 [ib_core]
    [  226.060257]  process_one_work+0x1a7/0x360
    [  226.060367]  ? create_worker+0x1a0/0x1a0
    [  226.060440]  worker_thread+0x30/0x390
    [  226.060500]  ? create_worker+0x1a0/0x1a0
    [  226.060574]  kthread+0x116/0x130
    [  226.060661]  ? kthread_flush_work_fn+0x10/0x10
    [  226.060724]  ret_from_fork+0x35/0x40
    ...
    
    Signed-off-by: Kinglong Mee <[email protected]>
    Reviewed-by: Chuck Lever <[email protected]>
    Signed-off-by: Anna Schumaker <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kinglongmee authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    90c4f73 View commit details
    Browse the repository at this point in the history
  84. drm/bridge: ti-sn65dsi83: Handle dsi_lanes == 0 as invalid

    [ Upstream commit edbc796 ]
    
    Handle empty data-lanes = < >; property, which translates to
    dsi_lanes = 0 as invalid.
    
    Fixes: ceb515b ("drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver")
    Signed-off-by: Marek Vasut <[email protected]>
    Cc: Jonas Karlman <[email protected]>
    Cc: Laurent Pinchart <[email protected]>
    Cc: Lucas Stach <[email protected]>
    Cc: Marek Vasut <[email protected]>
    Cc: Maxime Ripard <[email protected]>
    Cc: Neil Armstrong <[email protected]>
    Cc: Robert Foss <[email protected]>
    Cc: Sam Ravnborg <[email protected]>
    Reviewed-by: Andrzej Hajda <[email protected]>
    Reviewed-by: Lucas Stach <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Marek Vasut authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    f768a80 View commit details
    Browse the repository at this point in the history
  85. drm/panfrost: Job should reference MMU not file_priv

    [ Upstream commit 6e516fa ]
    
    For a while now it's been allowed for a MMU context to outlive it's
    corresponding panfrost_priv, however the job structure still references
    panfrost_priv to get hold of the MMU context. If panfrost_priv has been
    freed this is a use-after-free which I've been able to trigger resulting
    in a splat.
    
    To fix this, drop the reference to panfrost_priv in the job structure
    and add a direct reference to the MMU structure which is what's actually
    needed.
    
    Fixes: 7fdc48c ("drm/panfrost: Make sure MMU context lifetime is not bound to panfrost_priv")
    Signed-off-by: Steven Price <[email protected]>
    Acked-by: Alyssa Rosenzweig <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Steven Price authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    8c8e8cc View commit details
    Browse the repository at this point in the history
  86. netfilter: nat: really support inet nat without l3 address

    [ Upstream commit 282e5f8 ]
    
    When no l3 address is given, priv->family is set to NFPROTO_INET and
    the evaluation function isn't called.
    
    Call it too so l4-only rewrite can work.
    Also add a test case for this.
    
    Fixes: a33f387 ("netfilter: nft_nat: allow to specify layer 4 protocol NAT only")
    Reported-by: Yi Chen <[email protected]>
    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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c7e5999 View commit details
    Browse the repository at this point in the history
  87. netfilter: nf_tables: use kfree_rcu(ptr, rcu) to release hooks in cle…

    …an_net path
    
    [ Upstream commit ab5e5c0 ]
    
    Use kfree_rcu(ptr, rcu) variant instead as described by ae08983
    ("netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant").
    
    Fixes: f9a4300 ("netfilter: nf_tables: double hook unregistration in netns path")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2ebaf04 View commit details
    Browse the repository at this point in the history
  88. netfilter: nf_tables: delete flowtable hooks via transaction list

    [ Upstream commit b6d9014 ]
    
    Remove inactive bool field in nft_hook object that was introduced in
    abadb2f ("netfilter: nf_tables: delete devices from flowtable").
    Move stale flowtable hooks to transaction list instead.
    
    Deleting twice the same device does not result in ENOENT.
    
    Fixes: abadb2f ("netfilter: nf_tables: delete devices from flowtable")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    62d9106 View commit details
    Browse the repository at this point in the history
  89. powerpc/kasan: Force thread size increase with KASAN

    [ Upstream commit 3e8635f ]
    
    KASAN causes increased stack usage, which can lead to stack overflows.
    
    The logic in Kconfig to suggest a larger default doesn't work if a user
    has CONFIG_EXPERT enabled and has an existing .config with a smaller
    value.
    
    Follow the lead of x86 and arm64, and force the thread size to be
    increased when KASAN is enabled.
    
    That also has the effect of enlarging the stack for 64-bit KASAN builds,
    which is also desirable.
    
    Fixes: edbadaf ("powerpc/kasan: Fix stack overflow by increasing THREAD_SHIFT")
    Reported-by: Erhard Furtner <[email protected]>
    Reported-by: Christophe Leroy <[email protected]>
    [mpe: Use MIN_THREAD_SHIFT as suggested by Christophe]
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    mpe authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    1fee119 View commit details
    Browse the repository at this point in the history
  90. SUNRPC: Trap RDMA segment overflows

    [ Upstream commit f012e95 ]
    
    Prevent svc_rdma_build_writes() from walking off the end of a Write
    chunk's segment array. Caught with KASAN.
    
    The test that this fix replaces is invalid, and might have been left
    over from an earlier prototype of the PCL work.
    
    Fixes: 7a1cbfa ("svcrdma: Use parsed chunk lists to construct RDMA Writes")
    Signed-off-by: Chuck Lever <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    chucklever authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    812c135 View commit details
    Browse the repository at this point in the history
  91. netfilter: nf_tables: always initialize flowtable hook list in transa…

    …ction
    
    [ Upstream commit 2c9e455 ]
    
    The hook list is used if nft_trans_flowtable_update(trans) == true. However,
    initialize this list for other cases for safety reasons.
    
    Fixes: 78d9f48 ("netfilter: nf_tables: add devices to existing flowtable")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d9749a7 View commit details
    Browse the repository at this point in the history
  92. ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe

    [ Upstream commit 10d6bdf ]
    
    of_find_device_by_node() takes reference, we should use put_device()
    to release it when not need anymore.
    Add missing put_device() to avoid refcount leak.
    
    Fixes: 43f01da ("MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree.")
    Signed-off-by: Miaoqian Lin <[email protected]>
    Reviewed-by: Sergey Shtylyov <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yuuoniy authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c9782e1 View commit details
    Browse the repository at this point in the history
  93. netfilter: nf_tables: release new hooks on unsupported flowtable flags

    [ Upstream commit c271cc9 ]
    
    Release the list of new hooks that are pending to be registered in case
    that unsupported flowtable flags are provided.
    
    Fixes: 78d9f48 ("netfilter: nf_tables: add devices to existing flowtable")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    45ccd26 View commit details
    Browse the repository at this point in the history
  94. netfilter: nf_tables: memleak flow rule from commit path

    [ Upstream commit 9dd732e ]
    
    Abort path release flow rule object, however, commit path does not.
    Update code to destroy these objects before releasing the transaction.
    
    Fixes: c9626a2 ("netfilter: nf_tables: add hardware offload support")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    80de9ea View commit details
    Browse the repository at this point in the history
  95. netfilter: nf_tables: bail out early if hardware offload is not suppo…

    …rted
    
    [ Upstream commit 3a41c64 ]
    
    If user requests for NFT_CHAIN_HW_OFFLOAD, then check if either device
    provides the .ndo_setup_tc interface or there is an indirect flow block
    that has been registered. Otherwise, bail out early from the preparation
    phase. Moreover, validate that family == NFPROTO_NETDEV and hook is
    NF_NETDEV_INGRESS.
    
    Fixes: c9626a2 ("netfilter: nf_tables: add hardware offload support")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d625f31 View commit details
    Browse the repository at this point in the history
  96. amt: fix wrong usage of pskb_may_pull()

    [ Upstream commit f55a070 ]
    
    It adds missing pskb_may_pull() in amt_update_handler() and
    amt_multicast_data_handler().
    And it fixes wrong parameter of pskb_may_pull() in
    amt_advertisement_handler() and amt_membership_query_handler().
    
    Reported-by: Jakub Kicinski <[email protected]>
    Fixes: cbc21dc ("amt: add data plane of amt interface")
    Signed-off-by: Taehee Yoo <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    TaeheeYoo authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9e1e025 View commit details
    Browse the repository at this point in the history
  97. amt: fix possible null-ptr-deref in amt_rcv()

    [ Upstream commit d16207f ]
    
    When amt interface receives amt message, it tries to obtain amt private
    data from sock.
    If there is no amt private data, it frees an skb immediately.
    After kfree_skb(), it increases the rx_dropped stats.
    But in order to use rx_dropped, amt private data is needed.
    So, it makes amt_rcv() to do not increase rx_dropped stats when it can
    not obtain amt private data.
    
    Reported-by: kernel test robot <[email protected]>
    Reported-by: Dan Carpenter <[email protected]>
    Fixes: 1a1a0e8 ("amt: fix possible memory leak in amt_rcv()")
    Signed-off-by: Taehee Yoo <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    TaeheeYoo authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    42c6af9 View commit details
    Browse the repository at this point in the history
  98. amt: fix wrong type string definition

    [ Upstream commit d797003 ]
    
    amt message type definition starts from 1, not 0.
    But type_str[] starts from 0.
    So, it prints wrong type information.
    
    Fixes: cbc21dc ("amt: add data plane of amt interface")
    Signed-off-by: Taehee Yoo <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    TaeheeYoo authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d5822be View commit details
    Browse the repository at this point in the history
  99. net: ethernet: bgmac: Fix refcount leak in bcma_mdio_mii_register

    [ Upstream commit b8d9139 ]
    
    of_get_child_by_name() returns a node pointer with refcount
    incremented, we should use of_node_put() on it when not need anymore.
    Add missing of_node_put() to avoid refcount leak.
    
    Fixes: 55954f3 ("net: ethernet: bgmac: move BCMA MDIO Phy code into a separate file")
    Signed-off-by: Miaoqian Lin <[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]>
    Yuuoniy authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b51996e View commit details
    Browse the repository at this point in the history
  100. xen: unexport __init-annotated xen_xlate_map_ballooned_pages()

    [ Upstream commit dbac14a ]
    
    EXPORT_SYMBOL and __init is a bad combination because the .init.text
    section is freed up after the initialization. Hence, modules cannot
    use symbols annotated __init. The access to a freed symbol may end up
    with kernel panic.
    
    modpost used to detect it, but it has been broken for a decade.
    
    Recently, I fixed modpost so it started to warn it again, then this
    showed up in linux-next builds.
    
    There are two ways to fix it:
    
      - Remove __init
      - Remove EXPORT_SYMBOL
    
    I chose the latter for this case because none of the in-tree call-sites
    (arch/arm/xen/enlighten.c, arch/x86/xen/grant-table.c) is compiled as
    modular.
    
    Fixes: 243848f ("xen/grant-table: Move xlated_setup_gnttab_pages to common place")
    Reported-by: Stephen Rothwell <[email protected]>
    Signed-off-by: Masahiro Yamada <[email protected]>
    Reviewed-by: Oleksandr Tyshchenko <[email protected]>
    Acked-by: Stefano Stabellini <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Juergen Gross <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    masahir0y authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b433873 View commit details
    Browse the repository at this point in the history
  101. stmmac: intel: Fix an error handling path in intel_eth_pci_probe()

    [ Upstream commit 5e74a4b ]
    
    When the managed API is used, there is no need to explicitly call
    pci_free_irq_vectors().
    
    This looks to be a left-over from the commit in the Fixes tag. Only the
    .remove() function had been updated.
    
    So remove this unused function call and update goto label accordingly.
    
    Fixes: 8accc46 ("stmmac: intel: use managed PCI function on probe and resume")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Reviewed-by: Wong Vee Khee <[email protected]>
    Link: https://lore.kernel.org/r/1ac9b6787b0db83b0095711882c55c77c8ea8da0.1654462241.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tititiou36 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    72fe647 View commit details
    Browse the repository at this point in the history
  102. af_unix: Fix a data-race in unix_dgram_peer_wake_me().

    [ Upstream commit 662a809 ]
    
    unix_dgram_poll() calls unix_dgram_peer_wake_me() without `other`'s
    lock held and check if its receive queue is full.  Here we need to
    use unix_recvq_full_lockless() instead of unix_recvq_full(), otherwise
    KCSAN will report a data-race.
    
    Fixes: 7d26727 ("unix: avoid use-after-free in ep_remove_wait_queue")
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    q2ven authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    71e8bfc View commit details
    Browse the repository at this point in the history
  103. x86: drop bogus "cc" clobber from __try_cmpxchg_user_asm()

    [ Upstream commit 1df931d ]
    
    As noted (and fixed) a couple of times in the past, "=@cc<cond>" outputs
    and clobbering of "cc" don't work well together. The compiler appears to
    mean to reject such, but doesn't - in its upstream form - quite manage
    to yet for "cc". Furthermore two similar macros don't clobber "cc", and
    clobbering "cc" is pointless in asm()-s for x86 anyway - the compiler
    always assumes status flags to be clobbered there.
    
    Fixes: 989b5db ("x86/uaccess: Implement macros for CMPXCHG on user addresses")
    Signed-off-by: Jan Beulich <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jbeulich authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9cfd294 View commit details
    Browse the repository at this point in the history
  104. bpf, arm64: Clear prog->jited_len along prog->jited

    [ Upstream commit 10f3b29 ]
    
    syzbot reported an illegal copy_to_user() attempt
    from bpf_prog_get_info_by_fd() [1]
    
    There was no repro yet on this bug, but I think
    that commit 0aef499 ("mm/usercopy: Detect vmalloc overruns")
    is exposing a prior bug in bpf arm64.
    
    bpf_prog_get_info_by_fd() looks at prog->jited_len
    to determine if the JIT image can be copied out to user space.
    
    My theory is that syzbot managed to get a prog where prog->jited_len
    has been set to 43, while prog->bpf_func has ben cleared.
    
    It is not clear why copy_to_user(uinsns, NULL, ulen) is triggering
    this particular warning.
    
    I thought find_vma_area(NULL) would not find a vm_struct.
    As we do not hold vmap_area_lock spinlock, it might be possible
    that the found vm_struct was garbage.
    
    [1]
    usercopy: Kernel memory exposure attempt detected from vmalloc (offset 792633534417210172, size 43)!
    kernel BUG at mm/usercopy.c:101!
    Internal error: Oops - BUG: 0 [pop-os#1] PREEMPT SMP
    Modules linked in:
    CPU: 0 PID: 25002 Comm: syz-executor.1 Not tainted 5.18.0-syzkaller-10139-g8291eaafed36 #0
    Hardware name: linux,dummy-virt (DT)
    pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    pc : usercopy_abort+0x90/0x94 mm/usercopy.c:101
    lr : usercopy_abort+0x90/0x94 mm/usercopy.c:89
    sp : ffff80000b773a20
    x29: ffff80000b773a30 x28: faff80000b745000 x27: ffff80000b773b48
    x26: 0000000000000000 x25: 000000000000002b x24: 0000000000000000
    x23: 00000000000000e0 x22: ffff80000b75db67 x21: 0000000000000001
    x20: 000000000000002b x19: ffff80000b75db3c x18: 00000000fffffffd
    x17: 2820636f6c6c616d x16: 76206d6f72662064 x15: 6574636574656420
    x14: 74706d6574746120 x13: 2129333420657a69 x12: 73202c3237313031
    x11: 3237313434333533 x10: 3336323937207465 x9 : 657275736f707865
    x8 : ffff80000a30c550 x7 : ffff80000b773830 x6 : ffff80000b773830
    x5 : 0000000000000000 x4 : ffff00007fbbaa10 x3 : 0000000000000000
    x2 : 0000000000000000 x1 : f7ff000028fc0000 x0 : 0000000000000064
    Call trace:
     usercopy_abort+0x90/0x94 mm/usercopy.c:89
     check_heap_object mm/usercopy.c:186 [inline]
     __check_object_size mm/usercopy.c:252 [inline]
     __check_object_size+0x198/0x36c mm/usercopy.c:214
     check_object_size include/linux/thread_info.h:199 [inline]
     check_copy_size include/linux/thread_info.h:235 [inline]
     copy_to_user include/linux/uaccess.h:159 [inline]
     bpf_prog_get_info_by_fd.isra.0+0xf14/0xfdc kernel/bpf/syscall.c:3993
     bpf_obj_get_info_by_fd+0x12c/0x510 kernel/bpf/syscall.c:4253
     __sys_bpf+0x900/0x2150 kernel/bpf/syscall.c:4956
     __do_sys_bpf kernel/bpf/syscall.c:5021 [inline]
     __se_sys_bpf kernel/bpf/syscall.c:5019 [inline]
     __arm64_sys_bpf+0x28/0x40 kernel/bpf/syscall.c:5019
     __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
     invoke_syscall+0x48/0x114 arch/arm64/kernel/syscall.c:52
     el0_svc_common.constprop.0+0x44/0xec arch/arm64/kernel/syscall.c:142
     do_el0_svc+0xa0/0xc0 arch/arm64/kernel/syscall.c:206
     el0_svc+0x44/0xb0 arch/arm64/kernel/entry-common.c:624
     el0t_64_sync_handler+0x1ac/0x1b0 arch/arm64/kernel/entry-common.c:642
     el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:581
    Code: aa0003e3 d00038c0 91248000 97fff65f (d4210000)
    
    Fixes: db49694 ("bpf: arm64: add JIT support for multi-function programs")
    Reported-by: syzbot <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Acked-by: Song Liu <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Eric Dumazet authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5c25a30 View commit details
    Browse the repository at this point in the history
  105. net: dsa: lantiq_gswip: Fix refcount leak in gswip_gphy_fw_list

    [ Upstream commit 0737e01 ]
    
    Every iteration of for_each_available_child_of_node() decrements
    the reference count of the previous node.
    when breaking early from a for_each_available_child_of_node() loop,
    we need to explicitly call of_node_put() on the gphy_fw_np.
    Add missing of_node_put() to avoid refcount leak.
    
    Fixes: 14fceff ("net: dsa: Add Lantiq / Intel DSA driver for vrx200")
    Signed-off-by: Miaoqian Lin <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yuuoniy authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    32cd78c View commit details
    Browse the repository at this point in the history
  106. net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure

    [ Upstream commit f5826c8 ]
    
    The ioctl EEPROM query wrongly returns success on read failures, fix
    that by returning the appropriate error code.
    
    Fixes: 7202da8 ("ethtool, net/mlx4_en: Cable info, get_module_info/eeprom ethtool support")
    Signed-off-by: Gal Pressman <[email protected]>
    Signed-off-by: Tariq Toukan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    gal-pressman authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b10c28c View commit details
    Browse the repository at this point in the history
  107. i40e: xsk: Move tmp desc array from driver to pool

    [ Upstream commit d1bc532 ]
    
    Move desc_array from the driver to the pool. The reason behind this is
    that we can then reuse this array as a temporary storage for descriptors
    in all zero-copy drivers that use the batched interface. This will make
    it easier to add batching to more drivers.
    
    i40e is the only driver that has a batched Tx zero-copy
    implementation, so no need to touch any other driver.
    
    Signed-off-by: Magnus Karlsson <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Reviewed-by: Alexander Lobakin <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    magnus-karlsson authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    297a53f View commit details
    Browse the repository at this point in the history
  108. xsk: Fix handling of invalid descriptors in XSK TX batching API

    [ Upstream commit d678cbd ]
    
    xdpxceiver run on a AF_XDP ZC enabled driver revealed a problem with XSK
    Tx batching API. There is a test that checks how invalid Tx descriptors
    are handled by AF_XDP. Each valid descriptor is followed by invalid one
    on Tx side whereas the Rx side expects only to receive a set of valid
    descriptors.
    
    In current xsk_tx_peek_release_desc_batch() function, the amount of
    available descriptors is hidden inside xskq_cons_peek_desc_batch(). This
    can be problematic in cases where invalid descriptors are present due to
    the fact that xskq_cons_peek_desc_batch() returns only a count of valid
    descriptors. This means that it is impossible to properly update XSK
    ring state when calling xskq_cons_release_n().
    
    To address this issue, pull out the contents of
    xskq_cons_peek_desc_batch() so that callers (currently only
    xsk_tx_peek_release_desc_batch()) will always be able to update the
    state of ring properly, as total count of entries is now available and
    use this value as an argument in xskq_cons_release_n(). By
    doing so, xskq_cons_peek_desc_batch() can be dropped altogether.
    
    Fixes: 9349eb3 ("xsk: Introduce batched Tx descriptor interfaces")
    Signed-off-by: Maciej Fijalkowski <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Acked-by: Magnus Karlsson <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    mfijalko authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2a3a558 View commit details
    Browse the repository at this point in the history
  109. SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()

    [ Upstream commit 6c254bf ]
    
    I found that NFSD's new NFSv3 READDIRPLUS XDR encoder was screwing up
    right at the end of the page array. xdr_get_next_encode_buffer() does
    not compute the value of xdr->end correctly:
    
     * The check to see if we're on the final available page in xdr->buf
       needs to account for the space consumed by @nbytes.
    
     * The new xdr->end value needs to account for the portion of @nbytes
       that is to be encoded into the previous buffer.
    
    Fixes: 2825a7f ("nfsd4: allow encoding across page boundaries")
    Signed-off-by: Chuck Lever <[email protected]>
    Reviewed-by: NeilBrown <[email protected]>
    Reviewed-by: J. Bruce Fields <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    chucklever authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    58e1a7f View commit details
    Browse the repository at this point in the history
  110. net: mdio: unexport __init-annotated mdio_bus_init()

    [ Upstream commit 35b42dc ]
    
    EXPORT_SYMBOL and __init is a bad combination because the .init.text
    section is freed up after the initialization. Hence, modules cannot
    use symbols annotated __init. The access to a freed symbol may end up
    with kernel panic.
    
    modpost used to detect it, but it has been broken for a decade.
    
    Recently, I fixed modpost so it started to warn it again, then this
    showed up in linux-next builds.
    
    There are two ways to fix it:
    
      - Remove __init
      - Remove EXPORT_SYMBOL
    
    I chose the latter for this case because the only in-tree call-site,
    drivers/net/phy/phy_device.c is never compiled as modular.
    (CONFIG_PHYLIB is boolean)
    
    Fixes: 90eff90 ("net: phy: Allow splitting MDIO bus/device support from PHYs")
    Reported-by: Stephen Rothwell <[email protected]>
    Signed-off-by: Masahiro Yamada <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Reviewed-by: Russell King (Oracle) <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    masahir0y authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    f5c6813 View commit details
    Browse the repository at this point in the history
  111. net: xfrm: unexport __init-annotated xfrm4_protocol_init()

    [ Upstream commit 4a388f0 ]
    
    EXPORT_SYMBOL and __init is a bad combination because the .init.text
    section is freed up after the initialization. Hence, modules cannot
    use symbols annotated __init. The access to a freed symbol may end up
    with kernel panic.
    
    modpost used to detect it, but it has been broken for a decade.
    
    Recently, I fixed modpost so it started to warn it again, then this
    showed up in linux-next builds.
    
    There are two ways to fix it:
    
      - Remove __init
      - Remove EXPORT_SYMBOL
    
    I chose the latter for this case because the only in-tree call-site,
    net/ipv4/xfrm4_policy.c is never compiled as modular.
    (CONFIG_XFRM is boolean)
    
    Fixes: 2f32b51 ("xfrm: Introduce xfrm_input_afinfo to access the the callbacks properly")
    Reported-by: Stephen Rothwell <[email protected]>
    Signed-off-by: Masahiro Yamada <[email protected]>
    Acked-by: Steffen Klassert <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    masahir0y authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    e04d59c View commit details
    Browse the repository at this point in the history
  112. net: ipv6: unexport __init-annotated seg6_hmac_init()

    [ Upstream commit 5801f06 ]
    
    EXPORT_SYMBOL and __init is a bad combination because the .init.text
    section is freed up after the initialization. Hence, modules cannot
    use symbols annotated __init. The access to a freed symbol may end up
    with kernel panic.
    
    modpost used to detect it, but it has been broken for a decade.
    
    Recently, I fixed modpost so it started to warn it again, then this
    showed up in linux-next builds.
    
    There are two ways to fix it:
    
      - Remove __init
      - Remove EXPORT_SYMBOL
    
    I chose the latter for this case because the caller (net/ipv6/seg6.c)
    and the callee (net/ipv6/seg6_hmac.c) belong to the same module.
    It seems an internal function call in ipv6.ko.
    
    Fixes: bf355b8 ("ipv6: sr: add core files for SR HMAC support")
    Reported-by: Stephen Rothwell <[email protected]>
    Signed-off-by: Masahiro Yamada <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    masahir0y authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    3e6de50 View commit details
    Browse the repository at this point in the history
  113. net/mlx5: Lag, filter non compatible devices

    [ Upstream commit bc4c2f2 ]
    
    When search for a peer lag device we can filter based on that
    device's capabilities.
    
    Downstream patch will be less strict when filtering compatible devices
    and remove the limitation where we require exact MLX5_MAX_PORTS and
    change it to a range.
    
    Signed-off-by: Mark Bloch <[email protected]>
    Reviewed-by: Maor Gottlieb <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mark-bloch authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    66753a0 View commit details
    Browse the repository at this point in the history
  114. net/mlx5: Fix mlx5_get_next_dev() peer device matching

    [ Upstream commit 1c5de09 ]
    
    In some use-cases, mlx5 instances will need to search for their peer
    device (the other port on the same HCA). For that, mlx5 device matching
    mechanism relied on auxiliary_find_device() to search, and used a bad matching
    callback function.
    
    This approach has two issues:
    
    1) next_phys_dev() the matching function, assumed all devices are
       of the type mlx5_adev (mlx5 auxiliary device) which is wrong and
       could lead to crashes, this worked for a while, since only lately
       other drivers started registering auxiliary devices.
    
    2) using the auxiliary class bus (auxiliary_find_device) to search for
       mlx5_core_dev devices, who are actually PCIe device instances, is wrong.
       This works since mlx5_core always has at least one mlx5_adev instance
       hanging around in the aux bus.
    
    As suggested by others we can fix 1. by comparing device names prefixes
    if they have the string "mlx5_core" in them, which is not a best practice !
    but even with that fixed, still 2. needs fixing, we are trying to
    match pcie device peers so we should look in the right bus (pci bus),
    hence this fix.
    
    The fix:
    1) search the pci bus for mlx5 peer devices, instead of the aux bus
    2) to validated devices are the same type "mlx5_core_dev" compare if
       they have the same driver, which is bulletproof.
    
       This wouldn't have worked with the aux bus since the various mlx5 aux
       device types don't share the same driver, even if they share the same device
       wrapper struct (mlx5_adev) "which helped to find the parent device"
    
    Fixes: a925b5e ("net/mlx5: Register mlx5 devices to auxiliary virtual bus")
    Reported-by: Alexander Lobakin <[email protected]>
    Reported-by: Maher Sanalla <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Reviewed-by: Leon Romanovsky <[email protected]>
    Reviewed-by: Mark Bloch <[email protected]>
    Reviewed-by: Maher Sanalla <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Saeed Mahameed authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    7abbd2b View commit details
    Browse the repository at this point in the history
  115. net/mlx5: Rearm the FW tracer after each tracer event

    [ Upstream commit 8bf94e6 ]
    
    The current design does not arm the tracer if traces are available before
    the tracer string database is fully loaded, leading to an unfunctional tracer.
    This fix will rearm the tracer every time the FW triggers tracer event
    regardless of the tracer strings database status.
    
    Fixes: c71ad41 ("net/mlx5: FW tracer, events handling")
    Signed-off-by: Feras Daoud <[email protected]>
    Signed-off-by: Roy Novich <[email protected]>
    Reviewed-by: Moshe Shemesh <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Feras Daoud authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d2d0cfb View commit details
    Browse the repository at this point in the history
  116. net/mlx5: fs, fail conflicting actions

    [ Upstream commit 8fa5e7b ]
    
    When combining two steering rules into one check
    not only do they share the same actions but those
    actions are also the same. This resolves an issue where
    when creating two different rules with the same match
    the actions are overwritten and one of the rules is deleted
    a FW syndrome can be seen in dmesg.
    
    mlx5_core 0000:03:00.0: mlx5_cmd_check:819:(pid 2105): DEALLOC_MODIFY_HEADER_CONTEXT(0x941) op_mod(0x0) failed, status bad resource state(0x9), syndrome (0x1ab444)
    
    Fixes: 0d235c3 ("net/mlx5: Add hash table to search FTEs in a flow-group")
    Signed-off-by: Mark Bloch <[email protected]>
    Reviewed-by: Maor Gottlieb <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mark-bloch authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    69ced34 View commit details
    Browse the repository at this point in the history
  117. ip_gre: test csum_start instead of transport header

    [ Upstream commit 8d21e99 ]
    
    GRE with TUNNEL_CSUM will apply local checksum offload on
    CHECKSUM_PARTIAL packets.
    
    ipgre_xmit must validate csum_start after an optional skb_pull,
    else lco_csum may trigger an overflow. The original check was
    
    	if (csum && skb_checksum_start(skb) < skb->data)
    		return -EINVAL;
    
    This had false positives when skb_checksum_start is undefined:
    when ip_summed is not CHECKSUM_PARTIAL. A discussed refinement
    was straightforward
    
    	if (csum && skb->ip_summed == CHECKSUM_PARTIAL &&
    	    skb_checksum_start(skb) < skb->data)
    		return -EINVAL;
    
    But was eventually revised more thoroughly:
    - restrict the check to the only branch where needed, in an
      uncommon GRE path that uses header_ops and calls skb_pull.
    - test skb_transport_header, which is set along with csum_start
      in skb_partial_csum_set in the normal header_ops datapath.
    
    Turns out skbs can arrive in this branch without the transport
    header set, e.g., through BPF redirection.
    
    Revise the check back to check csum_start directly, and only if
    CHECKSUM_PARTIAL. Do leave the check in the updated location.
    Check field regardless of whether TUNNEL_CSUM is configured.
    
    Link: https://lore.kernel.org/netdev/YS+h%2FtqCJJiQei+W@shredder/
    Link: https://lore.kernel.org/all/[email protected]/T/#u
    Fixes: 8a0ed25 ("ip_gre: validate csum_start only on pull")
    Reported-by: syzbot <[email protected]>
    Signed-off-by: Willem de Bruijn <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Reviewed-by: Alexander Duyck <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    wdebruij authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    0c92d81 View commit details
    Browse the repository at this point in the history
  118. net: altera: Fix refcount leak in altera_tse_mdio_create

    [ Upstream commit 11ec18b ]
    
    Every iteration of for_each_child_of_node() decrements
    the reference count of the previous node.
    When break from a for_each_child_of_node() loop,
    we need to explicitly call of_node_put() on the child node when
    not need anymore.
    Add missing of_node_put() to avoid refcount leak.
    
    Fixes: bbd2190 ("Altera TSE: Add main and header file for Altera Ethernet Driver")
    Signed-off-by: Miaoqian Lin <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yuuoniy authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    803b217 View commit details
    Browse the repository at this point in the history
  119. net: dsa: mv88e6xxx: use BMSR_ANEGCOMPLETE bit for filling an_complete

    [ Upstream commit 47e9693 ]
    
    Commit ede359d ("net: dsa: mv88e6xxx: Link in pcs_get_state() if AN
    is bypassed") added the ability to link if AN was bypassed, and added
    filling of state->an_complete field, but set it to true if AN was
    enabled in BMCR, not when AN was reported complete in BMSR.
    
    This was done because for some reason, when I wanted to use BMSR value
    to infer an_complete, I was looking at BMSR_ANEGCAPABLE bit (which was
    always 1), instead of BMSR_ANEGCOMPLETE bit.
    
    Use BMSR_ANEGCOMPLETE for filling state->an_complete.
    
    Fixes: ede359d ("net: dsa: mv88e6xxx: Link in pcs_get_state() if AN is bypassed")
    Signed-off-by: Marek Behún <[email protected]>
    Signed-off-by: Russell King (Oracle) <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    elkablo authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    a94cf9f View commit details
    Browse the repository at this point in the history
  120. tcp: use alloc_large_system_hash() to allocate table_perturb

    [ Upstream commit e67b72b ]
    
    In our server, there may be no high order (>= 6) memory since we reserve
    lots of HugeTLB pages when booting.  Then the system panic.  So use
    alloc_large_system_hash() to allocate table_perturb.
    
    Fixes: e926147 ("tcp: dynamically allocate the perturb table used by source ports")
    Signed-off-by: Muchun Song <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Muchun Song authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    ef142d6 View commit details
    Browse the repository at this point in the history
  121. drm: imx: fix compiler warning with gcc-12

    [ Upstream commit 7aefd8b ]
    
    Gcc-12 correctly warned about this code using a non-NULL pointer as a
    truth value:
    
      drivers/gpu/drm/imx/ipuv3-crtc.c: In function ‘ipu_crtc_disable_planes’:
      drivers/gpu/drm/imx/ipuv3-crtc.c:72:21: error: the comparison will always evaluate as ‘true’ for the address of ‘plane’ will never be NULL [-Werror=address]
         72 |                 if (&ipu_crtc->plane[1] && plane == &ipu_crtc->plane[1]->base)
            |                     ^
    
    due to the extraneous '&' address-of operator.
    
    Philipp Zabel points out that The mistake had no adverse effect since
    the following condition doesn't actually dereference the NULL pointer,
    but the intent of the code was obviously to check for it, not to take
    the address of the member.
    
    Fixes: eb8c888 ("drm/imx: add deferred plane disabling")
    Acked-by: Philipp Zabel <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    torvalds authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    f2a9ecd View commit details
    Browse the repository at this point in the history
  122. nfp: flower: restructure flow-key for gre+vlan combination

    [ Upstream commit a0b8433 ]
    
    Swap around the GRE and VLAN parts in the flow-key offloaded by
    the driver to fit in with other tunnel types and the firmware.
    Without this change used cases with GRE+VLAN on the outer header
    does not get offloaded as the flow-key mismatches what the
    firmware expect.
    
    Fixes: 0d630f5 ("nfp: flower: add support to offload QinQ match")
    Fixes: 5a2b930 ("nfp: flower-ct: compile match sections of flow_payload")
    Signed-off-by: Etienne van der Linde <[email protected]>
    Signed-off-by: Louis Peens <[email protected]>
    Signed-off-by: Yinjun Zhang <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Etienne van der Linde authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    685fc7b View commit details
    Browse the repository at this point in the history
  123. iov_iter: Fix iter_xarray_get_pages{,_alloc}()

    [ Upstream commit 6c77676 ]
    
    The maths at the end of iter_xarray_get_pages() to calculate the actual
    size doesn't work under some circumstances, such as when it's been asked to
    extract a partial single page.  Various terms of the equation cancel out
    and you end up with actual == offset.  The same issue exists in
    iter_xarray_get_pages_alloc().
    
    Fix these to just use min() to select the lesser amount from between the
    amount of page content transcribed into the buffer, minus the offset, and
    the size limit specified.
    
    This doesn't appear to have caused a problem yet upstream because network
    filesystems aren't getting the pages from an xarray iterator, but rather
    passing it directly to the socket, which just iterates over it.  Cachefiles
    *does* do DIO from one to/from ext4/xfs/btrfs/etc. but it always asks for
    whole pages to be written or read.
    
    Fixes: 7ff5062 ("iov_iter: Add ITER_XARRAY")
    Reported-by: Jeff Layton <[email protected]>
    Signed-off-by: David Howells <[email protected]>
    cc: Alexander Viro <[email protected]>
    cc: Dominique Martinet <[email protected]>
    cc: Mike Marshall <[email protected]>
    cc: Gao Xiang <[email protected]>
    cc: [email protected]
    cc: [email protected]
    cc: [email protected]
    cc: [email protected]
    cc: [email protected]
    cc: [email protected]
    Signed-off-by: Al Viro <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dhowells authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    66f3a24 View commit details
    Browse the repository at this point in the history
  124. iio: dummy: iio_simple_dummy: check the return value of kstrdup()

    [ Upstream commit ba93642 ]
    
    kstrdup() is also a memory allocation-related function, it returns NULL
    when some memory errors happen. So it is better to check the return
    value of it so to catch the memory error in time. Besides, there should
    have a kfree() to clear up the allocation if we get a failure later in
    this function to prevent memory leak.
    
    Signed-off-by: Xiaoke Wang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    x2018 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    87eea43 View commit details
    Browse the repository at this point in the history
  125. staging: rtl8712: fix a potential memory leak in r871xu_drv_init()

    [ Upstream commit 7288ff5 ]
    
    In r871xu_drv_init(), if r8712_init_drv_sw() fails, then the memory
    allocated by r8712_alloc_io_queue() in r8712_usb_dvobj_init() is not
    properly released as there is no action will be performed by
    r8712_usb_dvobj_deinit().
    To properly release it, we should call r8712_free_io_queue() in
    r8712_usb_dvobj_deinit().
    
    Besides, in r871xu_dev_remove(), r8712_usb_dvobj_deinit() will be called
    by r871x_dev_unload() under condition `padapter->bup` and
    r8712_free_io_queue() is called by r8712_free_drv_sw().
    However, r8712_usb_dvobj_deinit() does not rely on `padapter->bup` and
    calling r8712_free_io_queue() in r8712_free_drv_sw() is negative for
    better understading the code.
    So I move r8712_usb_dvobj_deinit() into r871xu_dev_remove(), and remove
    r8712_free_io_queue() from r8712_free_drv_sw().
    
    Reviewed-by: Dan Carpenter <[email protected]>
    Signed-off-by: Xiaoke Wang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    x2018 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    205e039 View commit details
    Browse the repository at this point in the history
  126. iio: st_sensors: Add a local lock for protecting odr

    [ Upstream commit 4740101 ]
    
    Right now the (framework) mlock lock is (ab)used for multiple purposes:
    1- protecting concurrent accesses over the odr local cache
    2- avoid changing samplig frequency whilst buffer is running
    
    Let's start by handling situation pop-os#1 with a local lock.
    
    Suggested-by: Jonathan Cameron <[email protected]>
    Cc: Denis Ciocca <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    miquelraynal authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    29f09f3 View commit details
    Browse the repository at this point in the history
  127. lkdtm/usercopy: Expand size of "out of frame" object

    [ Upstream commit f387e86 ]
    
    To be sufficiently out of range for the usercopy test to see the lifetime
    mismatch, expand the size of the "bad" buffer, which will let it be
    beyond current_stack_pointer regardless of stack growth direction.
    Paired with the recent addition of stack depth checking under
    CONFIG_HARDENED_USERCOPY=y, this will correctly start tripping again.
    
    Reported-by: Muhammad Usama Anjum <[email protected]>
    Cc: Arnd Bergmann <[email protected]>
    Cc: Greg Kroah-Hartman <[email protected]>
    Reviewed-by: Muhammad Usama Anjum <[email protected]>
    Link: https://lore.kernel.org/lkml/[email protected]/
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kees authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    3c4c733 View commit details
    Browse the repository at this point in the history
  128. drivers: staging: rtl8723bs: Fix deadlock in rtw_surveydone_event_cal…

    …lback()
    
    [ Upstream commit cc7ad0d ]
    
    There is a deadlock in rtw_surveydone_event_callback(),
    which is shown below:
    
       (Thread 1)                  |      (Thread 2)
                                   | _set_timer()
    rtw_surveydone_event_callback()|  mod_timer()
     spin_lock_bh() //(1)          |  (wait a time)
     ...                           | rtw_scan_timeout_handler()
     del_timer_sync()              |  spin_lock_bh() //(2)
     (wait timer to stop)          |  ...
    
    We hold pmlmepriv->lock in position (1) of thread 1 and use
    del_timer_sync() to wait timer to stop, but timer handler
    also need pmlmepriv->lock in position (2) of thread 2.
    As a result, rtw_surveydone_event_callback() will block forever.
    
    This patch extracts del_timer_sync() from the protection of
    spin_lock_bh(), which could let timer handler to obtain
    the needed lock. What`s more, we change spin_lock_bh() in
    rtw_scan_timeout_handler() to spin_lock_irq(). Otherwise,
    spin_lock_bh() will also cause deadlock() in timer handler.
    
    Signed-off-by: Duoming Zhou <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    stonezdm authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    ce129d3 View commit details
    Browse the repository at this point in the history
  129. drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehan…

    …dle()
    
    [ Upstream commit 041879b ]
    
    There is a deadlock in rtw_joinbss_event_prehandle(), which is shown
    below:
    
       (Thread 1)                |      (Thread 2)
                                 | _set_timer()
    rtw_joinbss_event_prehandle()|  mod_timer()
     spin_lock_bh() //(1)        |  (wait a time)
     ...                         | _rtw_join_timeout_handler()
     del_timer_sync()            |  spin_lock_bh() //(2)
     (wait timer to stop)        |  ...
    
    We hold pmlmepriv->lock in position (1) of thread 1 and
    use del_timer_sync() to wait timer to stop, but timer handler
    also need pmlmepriv->lock in position (2) of thread 2.
    As a result, rtw_joinbss_event_prehandle() will block forever.
    
    This patch extracts del_timer_sync() from the protection of
    spin_lock_bh(), which could let timer handler to obtain
    the needed lock. What`s more, we change spin_lock_bh() to
    spin_lock_irq() in _rtw_join_timeout_handler() in order to
    prevent deadlock.
    
    Signed-off-by: Duoming Zhou <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    stonezdm authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    1f6c99b View commit details
    Browse the repository at this point in the history
  130. tty: synclink_gt: Fix null-pointer-dereference in slgt_clean()

    [ Upstream commit 689ca31 ]
    
    When the driver fails at alloc_hdlcdev(), and then we remove the driver
    module, we will get the following splat:
    
    [   25.065966] general protection fault, probably for non-canonical address 0xdffffc0000000182: 0000 [pop-os#1] PREEMPT SMP KASAN PTI
    [   25.066914] KASAN: null-ptr-deref in range [0x0000000000000c10-0x0000000000000c17]
    [   25.069262] RIP: 0010:detach_hdlc_protocol+0x2a/0x3e0
    [   25.077709] Call Trace:
    [   25.077924]  <TASK>
    [   25.078108]  unregister_hdlc_device+0x16/0x30
    [   25.078481]  slgt_cleanup+0x157/0x9f0 [synclink_gt]
    
    Fix this by checking whether the 'info->netdev' is a null pointer first.
    
    Reviewed-by: Jiri Slaby <[email protected]>
    Signed-off-by: Zheyu Ma <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ZheyuMa authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    ddd6775 View commit details
    Browse the repository at this point in the history
  131. tty: Fix a possible resource leak in icom_probe

    [ Upstream commit ee157a7 ]
    
    When pci_read_config_dword failed, call pci_release_regions() and
    pci_disable_device() to recycle the resource previously allocated.
    
    Reviewed-by: Jiri Slaby <[email protected]>
    Signed-off-by: Huang Guobin <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Huang Guobin authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    23e155b View commit details
    Browse the repository at this point in the history
  132. thunderbolt: Use different lane for second DisplayPort tunnel

    [ Upstream commit 9d2d0a5 ]
    
    Brad reported that on Apple hardware with Light Ridge or Falcon Ridge
    controller, plugging in a chain of Thunderbolt displays (Light Ridge
    based controllers) causes all kinds of tearing and flickering. The
    reason for this is that on Thunderbolt 1 hardware there is no lane
    bonding so we have two independent 10 Gb/s lanes, and currently Linux
    tunnels both displays through the lane 1. This makes the displays to
    share the 10 Gb/s bandwidth which may not be enough for higher
    resolutions.
    
    For this reason make the second tunnel go through the lane 0 instead.
    This seems to match what the macOS connection manager is also doing.
    
    Reported-by: Brad Campbell <[email protected]>
    Signed-off-by: Mika Westerberg <[email protected]>
    Tested-by: Brad Campbell <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    westeri authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b3de490 View commit details
    Browse the repository at this point in the history
  133. drivers: staging: rtl8192u: Fix deadlock in ieee80211_beacons_stop()

    [ Upstream commit 806c7b5 ]
    
    There is a deadlock in ieee80211_beacons_stop(), which is shown below:
    
       (Thread 1)              |      (Thread 2)
                               | ieee80211_send_beacon()
    ieee80211_beacons_stop()   |  mod_timer()
     spin_lock_irqsave() //(1) |  (wait a time)
     ...                       | ieee80211_send_beacon_cb()
     del_timer_sync()          |  spin_lock_irqsave() //(2)
     (wait timer to stop)      |  ...
    
    We hold ieee->beacon_lock in position (1) of thread 1 and use
    del_timer_sync() to wait timer to stop, but timer handler
    also need ieee->beacon_lock in position (2) of thread 2.
    As a result, ieee80211_beacons_stop() will block forever.
    
    This patch extracts del_timer_sync() from the protection of
    spin_lock_irqsave(), which could let timer handler to obtain
    the needed lock.
    
    Signed-off-by: Duoming Zhou <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    stonezdm authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    ffc9cab View commit details
    Browse the repository at this point in the history
  134. drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()

    [ Upstream commit 9b6bdbd ]
    
    There is a deadlock in rtllib_beacons_stop(), which is shown
    below:
    
       (Thread 1)              |      (Thread 2)
                               | rtllib_send_beacon()
    rtllib_beacons_stop()      |  mod_timer()
     spin_lock_irqsave() //(1) |  (wait a time)
     ...                       | rtllib_send_beacon_cb()
     del_timer_sync()          |  spin_lock_irqsave() //(2)
     (wait timer to stop)      |  ...
    
    We hold ieee->beacon_lock in position (1) of thread 1 and
    use del_timer_sync() to wait timer to stop, but timer handler
    also need ieee->beacon_lock in position (2) of thread 2.
    As a result, rtllib_beacons_stop() will block forever.
    
    This patch extracts del_timer_sync() from the protection of
    spin_lock_irqsave(), which could let timer handler to obtain
    the needed lock.
    
    Signed-off-by: Duoming Zhou <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    stonezdm authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    46c8610 View commit details
    Browse the repository at this point in the history
  135. USB: host: isp116x: check return value after calling platform_get_res…

    …ource()
    
    [ Upstream commit 134a340 ]
    
    It will cause null-ptr-deref if platform_get_resource() returns NULL,
    we need check the return value.
    
    Signed-off-by: Zhen Ni <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    nizhenth authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    aca0cab View commit details
    Browse the repository at this point in the history
  136. drivers: tty: serial: Fix deadlock in sa1100_set_termios()

    [ Upstream commit 62b2cae ]
    
    There is a deadlock in sa1100_set_termios(), which is shown
    below:
    
       (Thread 1)              |      (Thread 2)
                               | sa1100_enable_ms()
    sa1100_set_termios()       |  mod_timer()
     spin_lock_irqsave() //(1) |  (wait a time)
     ...                       | sa1100_timeout()
     del_timer_sync()          |  spin_lock_irqsave() //(2)
     (wait timer to stop)      |  ...
    
    We hold sport->port.lock in position (1) of thread 1 and
    use del_timer_sync() to wait timer to stop, but timer handler
    also need sport->port.lock in position (2) of thread 2. As a result,
    sa1100_set_termios() will block forever.
    
    This patch moves del_timer_sync() before spin_lock_irqsave()
    in order to prevent the deadlock.
    
    Signed-off-by: Duoming Zhou <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    stonezdm authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5532134 View commit details
    Browse the repository at this point in the history
  137. drivers: usb: host: Fix deadlock in oxu_bus_suspend()

    [ Upstream commit 4d378f2 ]
    
    There is a deadlock in oxu_bus_suspend(), which is shown below:
    
       (Thread 1)              |      (Thread 2)
                               | timer_action()
    oxu_bus_suspend()          |  mod_timer()
     spin_lock_irq() //(1)     |  (wait a time)
     ...                       | oxu_watchdog()
     del_timer_sync()          |  spin_lock_irq() //(2)
     (wait timer to stop)      |  ...
    
    We hold oxu->lock in position (1) of thread 1, and use
    del_timer_sync() to wait timer to stop, but timer handler
    also need oxu->lock in position (2) of thread 2. As a result,
    oxu_bus_suspend() will block forever.
    
    This patch extracts del_timer_sync() from the protection of
    spin_lock_irq(), which could let timer handler to obtain
    the needed lock.
    
    Signed-off-by: Duoming Zhou <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    stonezdm authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    4187b29 View commit details
    Browse the repository at this point in the history
  138. USB: hcd-pci: Fully suspend across freeze/thaw cycle

    [ Upstream commit 63acaa8 ]
    
    The documentation for the freeze() method says that it "should quiesce
    the device so that it doesn't generate IRQs or DMA". The unspoken
    consequence of not doing this is that MSIs aimed at non-boot CPUs may
    get fully lost if they're sent during the period where the target CPU is
    offline.
    
    The current callbacks for USB HCD do not fully quiesce interrupts,
    specifically on XHCI. Change to use the full suspend/resume flow for
    freeze/thaw to ensure interrupts are fully quiesced. This fixes issues
    where USB devices fail to thaw during hibernation because XHCI misses
    its interrupt and cannot recover.
    
    Acked-by: Alan Stern <[email protected]>
    Signed-off-by: Evan Green <[email protected]>
    Link: https://lore.kernel.org/r/20220421103751.v3.2.I8226c7fdae88329ef70957b96a39b346c69a914e@changeid
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Evan Green authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    07b9c8f View commit details
    Browse the repository at this point in the history
  139. char: xillybus: fix a refcount leak in cleanup_dev()

    [ Upstream commit b67d196 ]
    
    usb_get_dev is called in xillyusb_probe. So it is better to call
    usb_put_dev before xdev is released.
    
    Acked-by: Eli Billauer <[email protected]>
    Signed-off-by: Hangyu Hua <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    HBh25Y authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    21f1f16 View commit details
    Browse the repository at this point in the history
  140. sysrq: do not omit current cpu when showing backtrace of all active CPUs

    [ Upstream commit 5390e7f ]
    
    The backtrace of current CPU also should be printed as it is active. This
    change add stack trace for current CPU and print a hint for idle CPU for
    the generic workqueue based printing. (x86 already does this)
    
    Now it looks like below:
    [  279.401567] sysrq: Show backtrace of all active CPUs
    [  279.407234] sysrq: CPU5:
    [  279.407505] Call Trace:
    [  279.408789] [<ffffffff8000606c>] dump_backtrace+0x2c/0x3a
    [  279.411698] [<ffffffff800060ac>] show_stack+0x32/0x3e
    [  279.411809] [<ffffffff80542258>] sysrq_handle_showallcpus+0x4c/0xc6
    [  279.411929] [<ffffffff80542f16>] __handle_sysrq+0x106/0x26c
    [  279.412034] [<ffffffff805436a8>] write_sysrq_trigger+0x64/0x74
    [  279.412139] [<ffffffff8029cd48>] proc_reg_write+0x8e/0xe2
    [  279.412252] [<ffffffff8021a8f8>] vfs_write+0x90/0x2be
    [  279.412362] [<ffffffff8021acd2>] ksys_write+0xa6/0xce
    [  279.412467] [<ffffffff8021ad24>] sys_write+0x2a/0x38
    [  279.412689] [<ffffffff80003ff8>] ret_from_syscall+0x0/0x2
    [  279.417173] sysrq: CPU6: backtrace skipped as idling
    [  279.417185] sysrq: CPU4: backtrace skipped as idling
    [  279.417187] sysrq: CPU0: backtrace skipped as idling
    [  279.417181] sysrq: CPU7: backtrace skipped as idling
    [  279.417190] sysrq: CPU1: backtrace skipped as idling
    [  279.417193] sysrq: CPU3: backtrace skipped as idling
    [  279.417219] sysrq: CPU2:
    [  279.419179] Call Trace:
    [  279.419440] [<ffffffff8000606c>] dump_backtrace+0x2c/0x3a
    [  279.419782] [<ffffffff800060ac>] show_stack+0x32/0x3e
    [  279.420015] [<ffffffff80542b30>] showacpu+0x5c/0x96
    [  279.420317] [<ffffffff800ba71c>] flush_smp_call_function_queue+0xd6/0x218
    [  279.420569] [<ffffffff800bb438>] generic_smp_call_function_single_interrupt+0x14/0x1c
    [  279.420798] [<ffffffff800079ae>] handle_IPI+0xaa/0x13a
    [  279.421024] [<ffffffff804dcb92>] riscv_intc_irq+0x56/0x70
    [  279.421274] [<ffffffff80a05b70>] generic_handle_arch_irq+0x6a/0xfa
    [  279.421518] [<ffffffff80004006>] ret_from_exception+0x0/0x10
    [  279.421750] [<ffffffff80096492>] rcu_idle_enter+0x16/0x1e
    
    Signed-off-by: Changbin Du <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    changbindu authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5aee61b View commit details
    Browse the repository at this point in the history
  141. usb: dwc2: gadget: don't reset gadget's driver->bus

    [ Upstream commit 3120aac ]
    
    UDC driver should not touch gadget's driver internals, especially it
    should not reset driver->bus. This wasn't harmful so far, but since
    commit fc274c1 ("USB: gadget: Add a new bus for gadgets") gadget
    subsystem got it's own bus and messing with ->bus triggers the
    following NULL pointer dereference:
    
    dwc2 12480000.hsotg: bound driver g_ether
    8<--- cut here ---
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    [00000000] *pgd=00000000
    Internal error: Oops: 5 [pop-os#1] SMP ARM
    Modules linked in: ...
    CPU: 0 PID: 620 Comm: modprobe Not tainted 5.18.0-rc5-next-20220504 #11862
    Hardware name: Samsung Exynos (Flattened Device Tree)
    PC is at module_add_driver+0x44/0xe8
    LR is at sysfs_do_create_link_sd+0x84/0xe0
    ...
    Process modprobe (pid: 620, stack limit = 0x(ptrval))
    ...
     module_add_driver from bus_add_driver+0xf4/0x1e4
     bus_add_driver from driver_register+0x78/0x10c
     driver_register from usb_gadget_register_driver_owner+0x40/0xb4
     usb_gadget_register_driver_owner from do_one_initcall+0x44/0x1e0
     do_one_initcall from do_init_module+0x44/0x1c8
     do_init_module from load_module+0x19b8/0x1b9c
     load_module from sys_finit_module+0xdc/0xfc
     sys_finit_module from ret_fast_syscall+0x0/0x54
    Exception stack(0xf1771fa8 to 0xf1771ff0)
    ...
    dwc2 12480000.hsotg: new device is high-speed
    ---[ end trace 0000000000000000 ]---
    
    Fix this by removing driver->bus entry reset.
    
    Signed-off-by: Marek Szyprowski <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mszyprow authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    172cfc1 View commit details
    Browse the repository at this point in the history
  142. usb: dwc3: host: Stop setting the ACPI companion

    [ Upstream commit 7fd069d ]
    
    It is no longer needed. The sysdev pointer is now used when
    assigning the ACPI companions to the xHCI ports and USB
    devices.
    
    Assigning the ACPI companion here resulted in the
    fwnode->secondary pointer to be replaced also for the parent
    dwc3 device since the primary fwnode (the ACPI companion)
    was shared. That was unintentional and it created potential
    side effects like resource leaks.
    
    Signed-off-by: Heikki Krogerus <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Heikki Krogerus authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d7f3593 View commit details
    Browse the repository at this point in the history
  143. soundwire: qcom: adjust autoenumeration timeout

    [ Upstream commit 74da272 ]
    
    Currently timeout for autoenumeration during probe and bus reset is set to
    2 secs which is really a big value. This can have an adverse effect on
    boot time if the slave device is not ready/reset.
    This was the case with wcd938x which was not reset yet but we spent 2
    secs waiting in the soundwire controller probe. Reduce this time to
    1/10 of Hz which should be good enough time to finish autoenumeration
    if any slaves are available on the bus.
    
    Reported-by: Srinivasa Rao Mandadapu <[email protected]>
    Signed-off-by: Srinivas Kandagatla <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Srinivas-Kandagatla authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    caa1f0d View commit details
    Browse the repository at this point in the history
  144. misc: rtsx: set NULL intfdata when probe fails

    [ Upstream commit f861d36 ]
    
    rtsx_usb_probe() doesn't call usb_set_intfdata() to null out the
    interface pointer when probe fails. This leaves a stale pointer.
    Noticed the missing usb_set_intfdata() while debugging an unrelated
    invalid DMA mapping problem.
    
    Fix it with a call to usb_set_intfdata(..., NULL).
    
    Signed-off-by: Shuah Khan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    shuahkh authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    00f0aad View commit details
    Browse the repository at this point in the history
  145. extcon: Fix extcon_get_extcon_dev() error handling

    [ Upstream commit 58e4a2d ]
    
    The extcon_get_extcon_dev() function returns error pointers on error,
    NULL when it's a -EPROBE_DEFER defer situation, and ERR_PTR(-ENODEV)
    when the CONFIG_EXTCON option is disabled.  This is very complicated for
    the callers to handle and a number of them had bugs that would lead to
    an Oops.
    
    In real life, there are two things which prevented crashes.  First,
    error pointers would only be returned if there was bug in the caller
    where they passed a NULL "extcon_name" and none of them do that.
    Second, only two out of the eight drivers will build when CONFIG_EXTCON
    is disabled.
    
    The normal way to write this would be to return -EPROBE_DEFER directly
    when appropriate and return NULL when CONFIG_EXTCON is disabled.  Then
    the error handling is simple and just looks like:
    
    	dev->edev = extcon_get_extcon_dev(acpi_dev_name(adev));
    	if (IS_ERR(dev->edev))
    		return PTR_ERR(dev->edev);
    
    For the two drivers which can build with CONFIG_EXTCON disabled, then
    extcon_get_extcon_dev() will now return NULL which is not treated as an
    error and the probe will continue successfully.  Those two drivers are
    "typec_fusb302" and "max8997-battery".  In the original code, the
    typec_fusb302 driver had an 800ms hang in tcpm_get_current_limit() but
    now that function is a no-op.  For the max8997-battery driver everything
    should continue working as is.
    
    Signed-off-by: Dan Carpenter <[email protected]>
    Reviewed-by: Hans de Goede <[email protected]>
    Reviewed-by: Heikki Krogerus <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Acked-by: Sebastian Reichel <[email protected]>
    Signed-off-by: Chanwoo Choi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dan Carpenter authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c33ca06 View commit details
    Browse the repository at this point in the history
  146. extcon: Modify extcon device to be created after driver data is set

    [ Upstream commit 5dcc2af ]
    
    Currently, someone can invoke the sysfs such as state_show()
    intermittently before dev_set_drvdata() is done.
    And it can be a cause of kernel Oops because of edev is Null at that time.
    So modified the driver registration to after setting drviver data.
    
    - Oops's backtrace.
    
    Backtrace:
    [<c067865c>] (state_show) from [<c05222e8>] (dev_attr_show)
    [<c05222c0>] (dev_attr_show) from [<c02c66e0>] (sysfs_kf_seq_show)
    [<c02c6648>] (sysfs_kf_seq_show) from [<c02c496c>] (kernfs_seq_show)
    [<c02c4938>] (kernfs_seq_show) from [<c025e2a0>] (seq_read)
    [<c025e11c>] (seq_read) from [<c02c50a0>] (kernfs_fop_read)
    [<c02c5064>] (kernfs_fop_read) from [<c0231cac>] (__vfs_read)
    [<c0231c5c>] (__vfs_read) from [<c0231ee0>] (vfs_read)
    [<c0231e34>] (vfs_read) from [<c0232464>] (ksys_read)
    [<c02323f0>] (ksys_read) from [<c02324fc>] (sys_read)
    [<c02324e4>] (sys_read) from [<c00091d0>] (__sys_trace_return)
    
    Signed-off-by: bumwoo lee <[email protected]>
    Signed-off-by: Chanwoo Choi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    bumwoo lee authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    35ff1ac View commit details
    Browse the repository at this point in the history
  147. clocksource/drivers/sp804: Avoid error on multiple instances

    [ Upstream commit a98399c ]
    
    When a machine sports more than one SP804 timer instance, we only bring
    up the first one, since multiple timers of the same kind are not useful
    to Linux. As this is intentional behaviour, we should not return an
    error message, as we do today:
    ===============
    [    0.000800] Failed to initialize '/bus@8000000/motherboard-bus@8000000/iofpga-bus@300000000/timer@120000': -22
    ===============
    
    Replace the -EINVAL return with a debug message and return 0 instead.
    
    Also we do not reach the init function anymore if the DT node is
    disabled (as this is now handled by OF_DECLARE), so remove the explicit
    check for that case.
    
    This fixes a long standing bogus error when booting ARM's fastmodels.
    
    Signed-off-by: Andre Przywara <[email protected]>
    Reviewed-by: Robin Murphy <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Daniel Lezcano <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Andre-ARM authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5c4ccfc View commit details
    Browse the repository at this point in the history
  148. staging: rtl8712: fix uninit-value in usb_read8() and friends

    [ Upstream commit d1b5766 ]
    
    When r8712_usbctrl_vendorreq() returns negative, 'data' in
    usb_read{8,16,32} will not be initialized.
    
    BUG: KMSAN: uninit-value in string_nocheck lib/vsprintf.c:643 [inline]
    BUG: KMSAN: uninit-value in string+0x4ec/0x6f0 lib/vsprintf.c:725
     string_nocheck lib/vsprintf.c:643 [inline]
     string+0x4ec/0x6f0 lib/vsprintf.c:725
     vsnprintf+0x2222/0x3650 lib/vsprintf.c:2806
     va_format lib/vsprintf.c:1704 [inline]
     pointer+0x18e6/0x1f70 lib/vsprintf.c:2443
     vsnprintf+0x1a9b/0x3650 lib/vsprintf.c:2810
     vprintk_store+0x537/0x2150 kernel/printk/printk.c:2158
     vprintk_emit+0x28b/0xab0 kernel/printk/printk.c:2256
     dev_vprintk_emit+0x5ef/0x6d0 drivers/base/core.c:4604
     dev_printk_emit+0x1dd/0x21f drivers/base/core.c:4615
     __dev_printk+0x3be/0x440 drivers/base/core.c:4627
     _dev_info+0x1ea/0x22f drivers/base/core.c:4673
     r871xu_drv_init+0x1929/0x3070 drivers/staging/rtl8712/usb_intf.c:401
     usb_probe_interface+0xf19/0x1600 drivers/usb/core/driver.c:396
     really_probe+0x6c7/0x1350 drivers/base/dd.c:621
     __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:752
     driver_probe_device drivers/base/dd.c:782 [inline]
     __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:899
     bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
     __device_attach+0x593/0x8e0 drivers/base/dd.c:970
     device_initial_probe+0x4a/0x60 drivers/base/dd.c:1017
     bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
     device_add+0x1fff/0x26e0 drivers/base/core.c:3405
     usb_set_configuration+0x37e9/0x3ed0 drivers/usb/core/message.c:2170
     usb_generic_driver_probe+0x13c/0x300 drivers/usb/core/generic.c:238
     usb_probe_device+0x309/0x570 drivers/usb/core/driver.c:293
     really_probe+0x6c7/0x1350 drivers/base/dd.c:621
     __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:752
     driver_probe_device drivers/base/dd.c:782 [inline]
     __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:899
     bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
     __device_attach+0x593/0x8e0 drivers/base/dd.c:970
     device_initial_probe+0x4a/0x60 drivers/base/dd.c:1017
     bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
     device_add+0x1fff/0x26e0 drivers/base/core.c:3405
     usb_new_device+0x1b91/0x2950 drivers/usb/core/hub.c:2566
     hub_port_connect drivers/usb/core/hub.c:5363 [inline]
     hub_port_connect_change drivers/usb/core/hub.c:5507 [inline]
     port_event drivers/usb/core/hub.c:5665 [inline]
     hub_event+0x58e3/0x89e0 drivers/usb/core/hub.c:5747
     process_one_work+0xdb6/0x1820 kernel/workqueue.c:2289
     worker_thread+0x10d0/0x2240 kernel/workqueue.c:2436
     kthread+0x3c7/0x500 kernel/kthread.c:376
     ret_from_fork+0x1f/0x30
    
    Local variable data created at:
     usb_read8+0x5d/0x130 drivers/staging/rtl8712/usb_ops.c:33
     r8712_read8+0xa5/0xd0 drivers/staging/rtl8712/rtl8712_io.c:29
    
    KMSAN: uninit-value in r871xu_drv_init
    https://syzkaller.appspot.com/bug?id=3cd92b1d85428b128503bfa7a250294c9ae00bd8
    
    Reported-by: <[email protected]>
    Tested-by: <[email protected]>
    Reviewed-by: Dan Carpenter <[email protected]>
    Signed-off-by: Wang Cheng <[email protected]>
    Link: https://lore.kernel.org/r/b9b7a6ee02c02aa28054f5cf16129977775f3cd9.1652618244.git.wanngchenng@gmail.com
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    wanngc authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d7ed3c8 View commit details
    Browse the repository at this point in the history
  149. staging: rtl8712: fix uninit-value in r871xu_drv_init()

    [ Upstream commit 0458e54 ]
    
    When 'tmpU1b' returns from r8712_read8(padapter, EE_9346CR) is 0,
    'mac[6]' will not be initialized.
    
    BUG: KMSAN: uninit-value in r871xu_drv_init+0x2d54/0x3070 drivers/staging/rtl8712/usb_intf.c:541
     r871xu_drv_init+0x2d54/0x3070 drivers/staging/rtl8712/usb_intf.c:541
     usb_probe_interface+0xf19/0x1600 drivers/usb/core/driver.c:396
     really_probe+0x653/0x14b0 drivers/base/dd.c:596
     __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:752
     driver_probe_device drivers/base/dd.c:782 [inline]
     __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:899
     bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
     __device_attach+0x593/0x8e0 drivers/base/dd.c:970
     device_initial_probe+0x4a/0x60 drivers/base/dd.c:1017
     bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
     device_add+0x1fff/0x26e0 drivers/base/core.c:3405
     usb_set_configuration+0x37e9/0x3ed0 drivers/usb/core/message.c:2170
     usb_generic_driver_probe+0x13c/0x300 drivers/usb/core/generic.c:238
     usb_probe_device+0x309/0x570 drivers/usb/core/driver.c:293
     really_probe+0x653/0x14b0 drivers/base/dd.c:596
     __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:752
     driver_probe_device drivers/base/dd.c:782 [inline]
     __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:899
     bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
     __device_attach+0x593/0x8e0 drivers/base/dd.c:970
     device_initial_probe+0x4a/0x60 drivers/base/dd.c:1017
     bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
     device_add+0x1fff/0x26e0 drivers/base/core.c:3405
     usb_new_device+0x1b8e/0x2950 drivers/usb/core/hub.c:2566
     hub_port_connect drivers/usb/core/hub.c:5358 [inline]
     hub_port_connect_change drivers/usb/core/hub.c:5502 [inline]
     port_event drivers/usb/core/hub.c:5660 [inline]
     hub_event+0x58e3/0x89e0 drivers/usb/core/hub.c:5742
     process_one_work+0xdb6/0x1820 kernel/workqueue.c:2307
     worker_thread+0x10b3/0x21e0 kernel/workqueue.c:2454
     kthread+0x3c7/0x500 kernel/kthread.c:377
     ret_from_fork+0x1f/0x30
    
    Local variable mac created at:
     r871xu_drv_init+0x1771/0x3070 drivers/staging/rtl8712/usb_intf.c:394
     usb_probe_interface+0xf19/0x1600 drivers/usb/core/driver.c:396
    
    KMSAN: uninit-value in r871xu_drv_init
    https://syzkaller.appspot.com/bug?id=3cd92b1d85428b128503bfa7a250294c9ae00bd8
    
    Reported-by: <[email protected]>
    Tested-by: <[email protected]>
    Reviewed-by: Dan Carpenter <[email protected]>
    Signed-off-by: Wang Cheng <[email protected]>
    Link: https://lore.kernel.org/r/14c3886173dfa4597f0704547c414cfdbcd11d16.1652618244.git.wanngchenng@gmail.com
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    wanngc authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    76a964a View commit details
    Browse the repository at this point in the history
  150. serial: msm_serial: disable interrupts in __msm_console_write()

    [ Upstream commit aabdbb1 ]
    
    __msm_console_write() assumes that interrupts are disabled, but
    with threaded console printers it is possible that the write()
    callback of the console is called with interrupts enabled.
    
    Explicitly disable interrupts using local_irq_save() to preserve
    the assumed context.
    
    Reported-by: Marek Szyprowski <[email protected]>
    Reviewed-by: Petr Mladek <[email protected]>
    Signed-off-by: John Ogness <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jogness authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    83d8181 View commit details
    Browse the repository at this point in the history
  151. kernfs: Separate kernfs_pr_cont_buf and rename_lock.

    [ Upstream commit 1a702dc ]
    
    Previously the protection of kernfs_pr_cont_buf was piggy backed by
    rename_lock, which means that pr_cont() needs to be protected under
    rename_lock. This can cause potential circular lock dependencies.
    
    If there is an OOM, we have the following call hierarchy:
    
     -> cpuset_print_current_mems_allowed()
       -> pr_cont_cgroup_name()
         -> pr_cont_kernfs_name()
    
    pr_cont_kernfs_name() will grab rename_lock and call printk. So we have
    the following lock dependencies:
    
     kernfs_rename_lock -> console_sem
    
    Sometimes, printk does a wakeup before releasing console_sem, which has
    the dependence chain:
    
     console_sem -> p->pi_lock -> rq->lock
    
    Now, imagine one wants to read cgroup_name under rq->lock, for example,
    printing cgroup_name in a tracepoint in the scheduler code. They will
    be holding rq->lock and take rename_lock:
    
     rq->lock -> kernfs_rename_lock
    
    Now they will deadlock.
    
    A prevention to this circular lock dependency is to separate the
    protection of pr_cont_buf from rename_lock. In principle, rename_lock
    is to protect the integrity of cgroup name when copying to buf. Once
    pr_cont_buf has got its content, rename_lock can be dropped. So it's
    safe to drop rename_lock after kernfs_name_locked (and
    kernfs_path_from_node_locked) and rely on a dedicated pr_cont_lock
    to protect pr_cont_buf.
    
    Acked-by: Tejun Heo <[email protected]>
    Signed-off-by: Hao Luo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    haoluo1022 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    894a152 View commit details
    Browse the repository at this point in the history
  152. watchdog: wdat_wdt: Stop watchdog when rebooting the system

    [ Upstream commit 27fdf84 ]
    
    Executing reboot command several times on the machine "Dell
    PowerEdge R740", UEFI security detection stopped machine
    with the following prompt:
    
    UEFI0082: The system was reset due to a timeout from the watchdog
    timer. Check the System Event Log (SEL) or crash dumps from
    Operating Sysstem to identify the source that triggered the
    watchdog timer reset. Update the firmware or driver for the
    identified device.
    
    iDRAC has warning event: "The watchdog timer reset the system".
    
    This patch fixes this issue by adding the reboot notifier.
    
    Signed-off-by: Liu Xinpeng <[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]>
    liuxp11 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    a167642 View commit details
    Browse the repository at this point in the history
  153. ksmbd: smbd: fix connection dropped issue

    [ Upstream commit 5366afc ]
    
    When there are bursty connection requests,
    RDMA connection event handler is deferred and
    Negotiation requests are received even if
    connection status is NEW.
    
    To handle it, set the status to CONNECTED
    if Negotiation requests are received.
    
    Reported-by: Yufan Chen <[email protected]>
    Signed-off-by: Hyunchul Lee <[email protected]>
    Tested-by: Yufan Chen <[email protected]>
    Acked-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    hclee authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    0945b0d View commit details
    Browse the repository at this point in the history
  154. md: protect md_unregister_thread from reentrancy

    [ Upstream commit 1e26774 ]
    
    Generally, the md_unregister_thread is called with reconfig_mutex, but
    raid_message in dm-raid doesn't hold reconfig_mutex to unregister thread,
    so md_unregister_thread can be called simulitaneously from two call sites
    in theory.
    
    Then after previous commit which remove the protection of reconfig_mutex
    for md_unregister_thread completely, the potential issue could be worse
    than before.
    
    Let's take pers_lock at the beginning of function to ensure reentrancy.
    
    Reported-by: Donald Buczek <[email protected]>
    Signed-off-by: Guoqing Jiang <[email protected]>
    Signed-off-by: Song Liu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Guoqing Jiang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    fb20602 View commit details
    Browse the repository at this point in the history
  155. scsi: myrb: Fix up null pointer access on myrb_cleanup()

    [ Upstream commit f9f0a46 ]
    
    When myrb_probe() fails the callback might not be set, so we need to
    validate the 'disable_intr' callback in myrb_cleanup() to not cause a null
    pointer exception. And while at it do not call myrb_cleanup() if we cannot
    enable the PCI device at all.
    
    Link: https://lore.kernel.org/r/[email protected]
    Reported-by: Zheyu Ma <[email protected]>
    Tested-by: Zheyu Ma <[email protected]>
    Signed-off-by: Hannes Reinecke <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    hreinecke authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    3888928 View commit details
    Browse the repository at this point in the history
  156. ASoC: rt5640: Do not manipulate pin "Platform Clock" if the "Platform…

    … Clock" is not in the DAPM
    
    [ Upstream commit 8322968 ]
    
    The pin "Platform Clock" was only used by the Intel Byt CR platform. In the
    others, the error log will be informed. The patch will set the flag to
    avoid the pin "Platform Clock" manipulated by the other platforms.
    
    Signed-off-by: Oder Chiou <[email protected]>
    Reported-by: Sameer Pujar <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    oder-chiou authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    cde7ae4 View commit details
    Browse the repository at this point in the history
  157. Revert "net: af_key: add check for pfkey_broadcast in function pfkey_…

    …process"
    
    [ Upstream commit 9c90c9b ]
    
    This reverts commit 4dc2a5a.
    
    A non-zero return value from pfkey_broadcast() does not necessarily mean
    an error occurred as this function returns -ESRCH when no registered
    listener received the message. In particular, a call with
    BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return
    zero so that this commit in fact prevents processing any PF_KEY message.
    One visible effect is that racoon daemon fails to find encryption
    algorithms like aes and refuses to start.
    
    Excluding -ESRCH return value would fix this but it's not obvious that
    we really want to bail out here and most other callers of
    pfkey_broadcast() also ignore the return value. Also, as pointed out by
    Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code
    should use netlink instead so that we should only disturb the code for
    really important fixes.
    
    v2: add a comment explaining why is the return value ignored
    
    Signed-off-by: Michal Kubecek <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mkubecek authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    0b645df View commit details
    Browse the repository at this point in the history
  158. ceph: allow ceph.dir.rctime xattr to be updatable

    [ Upstream commit d7a2dc5 ]
    
    `rctime' has been a pain point in cephfs due to its buggy
    nature - inconsistent values reported and those sorts.
    Fixing rctime is non-trivial needing an overall redesign
    of the entire nested statistics infrastructure.
    
    As a workaround, PR
    
         http://github.com/ceph/ceph/pull/37938
    
    allows this extended attribute to be manually set. This allows
    users to "fixup" inconsistent rctime values. While this sounds
    messy, its probably the wisest approach allowing users/scripts
    to workaround buggy rctime values.
    
    The above PR enables Ceph MDS to allow manually setting
    rctime extended attribute with the corresponding user-land
    changes. We may as well allow the same to be done via kclient
    for parity.
    
    Signed-off-by: Venky Shankar <[email protected]>
    Reviewed-by: Xiubo Li <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    vshankar authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    7e19533 View commit details
    Browse the repository at this point in the history
  159. ceph: flush the mdlog for filesystem sync

    [ Upstream commit 1b2ba3c ]
    
    Before waiting for a request's safe reply, we will send the mdlog flush
    request to the relevant MDS. And this will also flush the mdlog for all
    the other unsafe requests in the same session, so we can record the last
    session and no need to flush mdlog again in the next loop. But there
    still have cases that it may send the mdlog flush requst twice or more,
    but that should be not often.
    
    Rename wait_unsafe_requests() to
    flush_mdlog_and_wait_mdsc_unsafe_requests() to make it more
    descriptive.
    
    [xiubli: fold in MDS request refcount leak fix from Jeff]
    
    URL: https://tracker.ceph.com/issues/55284
    URL: https://tracker.ceph.com/issues/55411
    Signed-off-by: Xiubo Li <[email protected]>
    Reviewed-by: Jeff Layton <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    lxbsz authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    3e25051 View commit details
    Browse the repository at this point in the history
  160. net, neigh: Set lower cap for neigh_managed_work rearming

    [ Upstream commit ed6cd6a ]
    
    Yuwei reported that plain reuse of DELAY_PROBE_TIME to rearm work queue
    in neigh_managed_work is problematic if user explicitly configures the
    DELAY_PROBE_TIME to 0 for a neighbor table. Such misconfig can then hog
    CPU to 100% processing the system work queue. Instead, set lower interval
    bound to HZ which is totally sufficient. Yuwei is additionally looking
    into making the interval separately configurable from DELAY_PROBE_TIME.
    
    Reported-by: Yuwei Wang <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Link: https://lore.kernel.org/netdev/[email protected]
    Reviewed-by: Nikolay Aleksandrov <[email protected]>
    Link: https://lore.kernel.org/r/3b8c5aa906c52c3a8c995d1b2e8ccf650ea7c716.1653432794.git.daniel@iogearbox.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    borkmann authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b4a0edb View commit details
    Browse the repository at this point in the history
  161. drm/amd/display: Check if modulo is 0 before dividing.

    [ Upstream commit 49947b9 ]
    
    [How & Why]
    If a value of 0 is read, then this will cause a divide-by-0 panic.
    
    Reviewed-by: Martin Leung <[email protected]>
    Acked-by: Qingqing Zhuo <[email protected]>
    Signed-off-by: David Galiffi <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dgaliffiAMD authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9672575 View commit details
    Browse the repository at this point in the history
  162. drm/radeon: fix a possible null pointer dereference

    [ Upstream commit a2b2870 ]
    
    In radeon_fp_native_mode(), the return value of drm_mode_duplicate()
    is assigned to mode, which will lead to a NULL pointer dereference
    on failure of drm_mode_duplicate(). Add a check to avoid npd.
    
    The failure status of drm_cvt_mode() on the other path is checked too.
    
    Signed-off-by: Gong Yuanjun <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    AnnYugawa authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    e938d24 View commit details
    Browse the repository at this point in the history
  163. drm/amd/pm: fix a potential gpu_metrics_table memory leak

    [ Upstream commit d2f4460 ]
    
    gpu_metrics_table is allocated in yellow_carp_init_smc_tables() but
    not freed in yellow_carp_fini_smc_tables().
    
    Signed-off-by: Gong Yuanjun <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    AnnYugawa authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    7a3ab1f View commit details
    Browse the repository at this point in the history
  164. drm/amd/pm: Fix missing thermal throttler status

    [ Upstream commit b0f4d66 ]
    
    On aldebaran, when thermal throttling happens due to excessive GPU
    temperature, the reason for throttling event is missed in warning
    message. This patch fixes it.
    
    Signed-off-by: Lijo Lazar <[email protected]>
    Reviewed-by: Yang Wang <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Lijo Lazar authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6703e11 View commit details
    Browse the repository at this point in the history
  165. um: line: Use separate IRQs per line

    [ Upstream commit d5a9597 ]
    
    Today, all possible serial lines (ssl*=) as well as all
    possible consoles (con*=) each share a single interrupt
    (with a fixed number) with others of the same type.
    
    Now, if you have two lines, say ssl0 and ssl1, and one
    of them is connected to an fd you cannot read (e.g. a
    file), but the other gets a read interrupt, then both
    of them get the interrupt since it's shared. Then, the
    read() call will return EOF, since it's a file being
    written and there's nothing to read (at least not at
    the current offset, at the end).
    
    Unfortunately, this is treated as a read error, and we
    close this line, losing all the possible output.
    
    It might be possible to work around this and make the
    IRQ sharing work, however, now that we have dynamically
    allocated IRQs that are easy to use, simply use that to
    achieve separating between the events; then there's no
    interrupt for that line and we never attempt the read
    in the first place, thus not closing the line.
    
    This manifested itself in the wifi hostap/hwsim tests
    where the parallel script communicates via one serial
    console and the kernel messages go to another (a file)
    and sending data on the communication console caused
    the kernel messages to stop flowing into the file.
    
    Reported-by: Jouni Malinen <[email protected]>
    Signed-off-by: Johannes Berg <[email protected]>
    Acked-By: anton ivanov <[email protected]>
    Signed-off-by: Richard Weinberger <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jmberg-intel authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    ab11cd8 View commit details
    Browse the repository at this point in the history
  166. modpost: fix undefined behavior of is_arm_mapping_symbol()

    [ Upstream commit d6b7326 ]
    
    The return value of is_arm_mapping_symbol() is unpredictable when "$"
    is passed in.
    
    strchr(3) says:
      The strchr() and strrchr() functions return a pointer to the matched
      character or NULL if the character is not found. The terminating null
      byte is considered part of the string, so that if c is specified as
      '\0', these functions return a pointer to the terminator.
    
    When str[1] is '\0', strchr("axtd", str[1]) is not NULL, and str[2] is
    referenced (i.e. buffer overrun).
    
    Test code
    ---------
    
      char str1[] = "abc";
      char str2[] = "ab";
    
      strcpy(str1, "$");
      strcpy(str2, "$");
    
      printf("test1: %d\n", is_arm_mapping_symbol(str1));
      printf("test2: %d\n", is_arm_mapping_symbol(str2));
    
    Result
    ------
    
      test1: 0
      test2: 1
    
    Signed-off-by: Masahiro Yamada <[email protected]>
    Reviewed-by: Nick Desaulniers <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    masahir0y authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    f8583b4 View commit details
    Browse the repository at this point in the history
  167. x86/cpu: Elide KCSAN for cpu_has() and friends

    [ Upstream commit a6a5eb2 ]
    
    As x86 uses the <asm-generic/bitops/instrumented-*.h> headers, the
    regular forms of all bitops are instrumented with explicit calls to
    KASAN and KCSAN checks. As these are explicit calls, these are not
    suppressed by the noinstr function attribute.
    
    This can result in calls to those check functions in noinstr code, which
    objtool warns about:
    
    vmlinux.o: warning: objtool: enter_from_user_mode+0x24: call to __kcsan_check_access() leaves .noinstr.text section
    vmlinux.o: warning: objtool: syscall_enter_from_user_mode+0x28: call to __kcsan_check_access() leaves .noinstr.text section
    vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare+0x24: call to __kcsan_check_access() leaves .noinstr.text section
    vmlinux.o: warning: objtool: irqentry_enter_from_user_mode+0x24: call to __kcsan_check_access() leaves .noinstr.text section
    
    Prevent this by using the arch_*() bitops, which are the underlying
    bitops without explciit instrumentation.
    
    [null: Changelog]
    Reported-by: kernel test robot <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Peter Zijlstra authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    cdce3bf View commit details
    Browse the repository at this point in the history
  168. jump_label,noinstr: Avoid instrumentation for JUMP_LABEL=n builds

    [ Upstream commit 656d054 ]
    
    When building x86_64 with JUMP_LABEL=n it's possible for
    instrumentation to sneak into noinstr:
    
    vmlinux.o: warning: objtool: exit_to_user_mode+0x14: call to static_key_count.constprop.0() leaves .noinstr.text section
    vmlinux.o: warning: objtool: syscall_exit_to_user_mode+0x2d: call to static_key_count.constprop.0() leaves .noinstr.text section
    vmlinux.o: warning: objtool: irqentry_exit_to_user_mode+0x1b: call to static_key_count.constprop.0() leaves .noinstr.text section
    
    Switch to arch_ prefixed atomic to avoid the explicit instrumentation.
    
    Reported-by: kernel test robot <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Peter Zijlstra authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d05317b View commit details
    Browse the repository at this point in the history
  169. nbd: call genl_unregister_family() first in nbd_cleanup()

    [ Upstream commit 06c4da8 ]
    
    Otherwise there may be race between module removal and the handling of
    netlink command, which can lead to the oops as shown below:
    
      BUG: kernel NULL pointer dereference, address: 0000000000000098
      Oops: 0002 [pop-os#1] SMP PTI
      CPU: 1 PID: 31299 Comm: nbd-client Tainted: G            E     5.14.0-rc4
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)
      RIP: 0010:down_write+0x1a/0x50
      Call Trace:
       start_creating+0x89/0x130
       debugfs_create_dir+0x1b/0x130
       nbd_start_device+0x13d/0x390 [nbd]
       nbd_genl_connect+0x42f/0x748 [nbd]
       genl_family_rcv_msg_doit.isra.0+0xec/0x150
       genl_rcv_msg+0xe5/0x1e0
       netlink_rcv_skb+0x55/0x100
       genl_rcv+0x29/0x40
       netlink_unicast+0x1a8/0x250
       netlink_sendmsg+0x21b/0x430
       ____sys_sendmsg+0x2a4/0x2d0
       ___sys_sendmsg+0x81/0xc0
       __sys_sendmsg+0x62/0xb0
       __x64_sys_sendmsg+0x1f/0x30
       do_syscall_64+0x3b/0xc0
       entry_SYSCALL_64_after_hwframe+0x44/0xae
      Modules linked in: nbd(E-)
    
    Signed-off-by: Hou Tao <[email protected]>
    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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6f505bb View commit details
    Browse the repository at this point in the history
  170. nbd: fix race between nbd_alloc_config() and module removal

    [ Upstream commit c55b2b9 ]
    
    When nbd module is being removing, nbd_alloc_config() may be
    called concurrently by nbd_genl_connect(), although try_module_get()
    will return false, but nbd_alloc_config() doesn't handle it.
    
    The race may lead to the leak of nbd_config and its related
    resources (e.g, recv_workq) and oops in nbd_read_stat() due
    to the unload of nbd module as shown below:
    
      BUG: kernel NULL pointer dereference, address: 0000000000000040
      Oops: 0000 [pop-os#1] SMP PTI
      CPU: 5 PID: 13840 Comm: kworker/u17:33 Not tainted 5.14.0+ pop-os#1
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)
      Workqueue: knbd16-recv recv_work [nbd]
      RIP: 0010:nbd_read_stat.cold+0x130/0x1a4 [nbd]
      Call Trace:
       recv_work+0x3b/0xb0 [nbd]
       process_one_work+0x1ed/0x390
       worker_thread+0x4a/0x3d0
       kthread+0x12a/0x150
       ret_from_fork+0x22/0x30
    
    Fixing it by checking the return value of try_module_get()
    in nbd_alloc_config(). As nbd_alloc_config() may return ERR_PTR(-ENODEV),
    assign nbd->config only when nbd_alloc_config() succeeds to ensure
    the value of nbd->config is binary (valid or NULL).
    
    Also adding a debug message to check the reference counter
    of nbd_config during module removal.
    
    Signed-off-by: Hou Tao <[email protected]>
    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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2888fa4 View commit details
    Browse the repository at this point in the history
  171. nbd: fix io hung while disconnecting device

    [ Upstream commit 09dadb5 ]
    
    In our tests, "qemu-nbd" triggers a io hung:
    
    INFO: task qemu-nbd:11445 blocked for more than 368 seconds.
          Not tainted 5.18.0-rc3-next-20220422-00003-g2176915513ca torvalds#884
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    task:qemu-nbd        state:D stack:    0 pid:11445 ppid:     1 flags:0x00000000
    Call Trace:
     <TASK>
     __schedule+0x480/0x1050
     ? _raw_spin_lock_irqsave+0x3e/0xb0
     schedule+0x9c/0x1b0
     blk_mq_freeze_queue_wait+0x9d/0xf0
     ? ipi_rseq+0x70/0x70
     blk_mq_freeze_queue+0x2b/0x40
     nbd_add_socket+0x6b/0x270 [nbd]
     nbd_ioctl+0x383/0x510 [nbd]
     blkdev_ioctl+0x18e/0x3e0
     __x64_sys_ioctl+0xac/0x120
     do_syscall_64+0x35/0x80
     entry_SYSCALL_64_after_hwframe+0x44/0xae
    RIP: 0033:0x7fd8ff706577
    RSP: 002b:00007fd8fcdfebf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
    RAX: ffffffffffffffda RBX: 0000000040000000 RCX: 00007fd8ff706577
    RDX: 000000000000000d RSI: 000000000000ab00 RDI: 000000000000000f
    RBP: 000000000000000f R08: 000000000000fbe8 R09: 000055fe497c62b0
    R10: 00000002aff20000 R11: 0000000000000246 R12: 000000000000006d
    R13: 0000000000000000 R14: 00007ffe82dc5e70 R15: 00007fd8fcdff9c0
    
    "qemu-ndb -d" will call ioctl 'NBD_DISCONNECT' first, however, following
    message was found:
    
    block nbd0: Send disconnect failed -32
    
    Which indicate that something is wrong with the server. Then,
    "qemu-nbd -d" will call ioctl 'NBD_CLEAR_SOCK', however ioctl can't clear
    requests after commit 2516ab1("nbd: only clear the queue on device
    teardown"). And in the meantime, request can't complete through timeout
    because nbd_xmit_timeout() will always return 'BLK_EH_RESET_TIMER', which
    means such request will never be completed in this situation.
    
    Now that the flag 'NBD_CMD_INFLIGHT' can make sure requests won't
    complete multiple times, switch back to call nbd_clear_sock() in
    nbd_clear_sock_ioctl(), so that inflight requests can be cleared.
    
    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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    54b06dc View commit details
    Browse the repository at this point in the history
  172. Revert "PCI: brcmstb: Do not turn off WOL regulators on suspend"

    [ Upstream commit 7894025 ]
    
    This reverts commit 11ed8b8.
    
    This is part of a revert of the following commits:
    
      11ed8b8 ("PCI: brcmstb: Do not turn off WOL regulators on suspend")
      93e41f3 ("PCI: brcmstb: Add control of subdevice voltage regulators")
      67211aa ("PCI: brcmstb: Add mechanism to turn on subdev regulators")
      830aa6f ("PCI: brcmstb: Split brcm_pcie_setup() into two funcs")
    
    Cyril reported that 830aa6f ("PCI: brcmstb: Split brcm_pcie_setup()
    into two funcs"), which appeared in v5.17-rc1, broke booting on the
    Raspberry Pi Compute Module 4.  Apparently 830aa6f panics with an
    Asynchronous SError Interrupt, and after further commits here is a black
    screen on HDMI and no output on the serial console.
    
    This does not seem to affect the Raspberry Pi 4 B.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215925
    Link: https://lore.kernel.org/r/[email protected]
    Reported-by: Cyril Brulebois <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    bjorn-helgaas authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    3c89161 View commit details
    Browse the repository at this point in the history
  173. Revert "PCI: brcmstb: Add control of subdevice voltage regulators"

    [ Upstream commit 2129426 ]
    
    This reverts commit 93e41f3.
    
    This is part of a revert of the following commits:
    
      11ed8b8 ("PCI: brcmstb: Do not turn off WOL regulators on suspend")
      93e41f3 ("PCI: brcmstb: Add control of subdevice voltage regulators")
      67211aa ("PCI: brcmstb: Add mechanism to turn on subdev regulators")
      830aa6f ("PCI: brcmstb: Split brcm_pcie_setup() into two funcs")
    
    Cyril reported that 830aa6f ("PCI: brcmstb: Split brcm_pcie_setup()
    into two funcs"), which appeared in v5.17-rc1, broke booting on the
    Raspberry Pi Compute Module 4.  Apparently 830aa6f panics with an
    Asynchronous SError Interrupt, and after further commits here is a black
    screen on HDMI and no output on the serial console.
    
    This does not seem to affect the Raspberry Pi 4 B.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215925
    Link: https://lore.kernel.org/r/[email protected]
    Reported-by: Cyril Brulebois <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    bjorn-helgaas authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    63b3ab2 View commit details
    Browse the repository at this point in the history
  174. Revert "PCI: brcmstb: Add mechanism to turn on subdev regulators"

    [ Upstream commit 420be2f ]
    
    This reverts commit 67211aa.
    
    This is part of a revert of the following commits:
    
      11ed8b8 ("PCI: brcmstb: Do not turn off WOL regulators on suspend")
      93e41f3 ("PCI: brcmstb: Add control of subdevice voltage regulators")
      67211aa ("PCI: brcmstb: Add mechanism to turn on subdev regulators")
      830aa6f ("PCI: brcmstb: Split brcm_pcie_setup() into two funcs")
    
    Cyril reported that 830aa6f ("PCI: brcmstb: Split brcm_pcie_setup()
    into two funcs"), which appeared in v5.17-rc1, broke booting on the
    Raspberry Pi Compute Module 4.  Apparently 830aa6f panics with an
    Asynchronous SError Interrupt, and after further commits here is a black
    screen on HDMI and no output on the serial console.
    
    This does not seem to affect the Raspberry Pi 4 B.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215925
    Link: https://lore.kernel.org/r/[email protected]
    Reported-by: Cyril Brulebois <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    bjorn-helgaas authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    4f0b924 View commit details
    Browse the repository at this point in the history
  175. Revert "PCI: brcmstb: Split brcm_pcie_setup() into two funcs"

    [ Upstream commit f4fd559 ]
    
    This reverts commit 830aa6f.
    
    This is part of a revert of the following commits:
    
      11ed8b8 ("PCI: brcmstb: Do not turn off WOL regulators on suspend")
      93e41f3 ("PCI: brcmstb: Add control of subdevice voltage regulators")
      67211aa ("PCI: brcmstb: Add mechanism to turn on subdev regulators")
      830aa6f ("PCI: brcmstb: Split brcm_pcie_setup() into two funcs")
    
    Cyril reported that 830aa6f ("PCI: brcmstb: Split brcm_pcie_setup()
    into two funcs"), which appeared in v5.17-rc1, broke booting on the
    Raspberry Pi Compute Module 4.  Apparently 830aa6f panics with an
    Asynchronous SError Interrupt, and after further commits here is a black
    screen on HDMI and no output on the serial console.
    
    This does not seem to affect the Raspberry Pi 4 B.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215925
    Link: https://lore.kernel.org/r/[email protected]
    Reported-by: Cyril Brulebois <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    bjorn-helgaas authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2d8ca19 View commit details
    Browse the repository at this point in the history
  176. s390/gmap: voluntarily schedule during key setting

    [ Upstream commit 6d59462 ]
    
    With large and many guest with storage keys it is possible to create
    large latencies or stalls during initial key setting:
    
    rcu: INFO: rcu_sched self-detected stall on CPU
    rcu:   18-....: (2099 ticks this GP) idle=54e/1/0x4000000000000002 softirq=35598716/35598716 fqs=998
           (t=2100 jiffies g=155867385 q=20879)
    Task dump for CPU 18:
    CPU 1/KVM       R  running task        0 1030947 256019 0x06000004
    Call Trace:
    sched_show_task
    rcu_dump_cpu_stacks
    rcu_sched_clock_irq
    update_process_times
    tick_sched_handle
    tick_sched_timer
    __hrtimer_run_queues
    hrtimer_interrupt
    do_IRQ
    ext_int_handler
    ptep_zap_key
    
    The mmap lock is held during the page walking but since this is a
    semaphore scheduling is still possible. Same for the kvm srcu.
    To minimize overhead do this on every segment table entry or large page.
    
    Signed-off-by: Christian Borntraeger <[email protected]>
    Reviewed-by: Alexander Gordeev <[email protected]>
    Reviewed-by: Claudio Imbrenda <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Christian Borntraeger <[email protected]>
    Signed-off-by: Heiko Carstens <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    borntraeger authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    eeb8680 View commit details
    Browse the repository at this point in the history
  177. cifs: version operations for smb20 unneeded when legacy support disabled

    [ Upstream commit 7ef93ff ]
    
    We should not be including unused smb20 specific code when legacy
    support is disabled (CONFIG_CIFS_ALLOW_INSECURE_LEGACY turned
    off).  For example smb2_operations and smb2_values aren't used
    in that case.  Over time we can move more and more SMB1/CIFS and SMB2.0
    code into the insecure legacy ifdefs
    
    Reviewed-by: Ronnie Sahlberg <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Steve French authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    278cd0d View commit details
    Browse the repository at this point in the history
  178. drm/amd/pm: use bitmap_{from,to}_arr32 where appropriate

    [ Upstream commit 525d651 ]
    
    The smu_v1X_0_set_allowed_mask() uses bitmap_copy() to convert
    bitmap to 32-bit array. This may be wrong due to endiannes issues.
    Fix it by switching to bitmap_{from,to}_arr32.
    
    CC: Alexander Gordeev <[email protected]>
    CC: Andy Shevchenko <[email protected]>
    CC: Christian Borntraeger <[email protected]>
    CC: Claudio Imbrenda <[email protected]>
    CC: David Hildenbrand <[email protected]>
    CC: Heiko Carstens <[email protected]>
    CC: Janosch Frank <[email protected]>
    CC: Rasmus Villemoes <[email protected]>
    CC: Sven Schnelle <[email protected]>
    CC: Vasily Gorbik <[email protected]>
    Signed-off-by: Yury Norov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    YuryNorov authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    55d1b40 View commit details
    Browse the repository at this point in the history
  179. nodemask: Fix return values to be unsigned

    [ Upstream commit 0dfe540 ]
    
    The nodemask routines had mixed return values that provided potentially
    signed return values that could never happen. This was leading to the
    compiler getting confusing about the range of possible return values
    (it was thinking things could be negative where they could not be). Fix
    all the nodemask routines that should be returning unsigned
    (or bool) values. Silences:
    
     mm/swapfile.c: In function ‘setup_swap_info’:
     mm/swapfile.c:2291:47: error: array subscript -1 is below array bounds of ‘struct plist_node[]’ [-Werror=array-bounds]
      2291 |                                 p->avail_lists[i].prio = 1;
           |                                 ~~~~~~~~~~~~~~^~~
     In file included from mm/swapfile.c:16:
     ./include/linux/swap.h:292:27: note: while referencing ‘avail_lists’
       292 |         struct plist_node avail_lists[]; /*
           |                           ^~~~~~~~~~~
    
    Reported-by: Christophe de Dinechin <[email protected]>
    Link: https://lore.kernel.org/lkml/[email protected]/
    Cc: Alexey Dobriyan <[email protected]>
    Cc: Yury Norov <[email protected]>
    Cc: Andy Shevchenko <[email protected]>
    Cc: Rasmus Villemoes <[email protected]>
    Cc: Andrew Morton <[email protected]>
    Cc: Zhen Lei <[email protected]>
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Yury Norov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kees authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d212b59 View commit details
    Browse the repository at this point in the history
  180. vringh: Fix loop descriptors check in the indirect cases

    [ Upstream commit dbd29e0 ]
    
    We should use size of descriptor chain to test loop condition
    in the indirect case. And another statistical count is also introduced
    for indirect descriptors to avoid conflict with the statistical count
    of direct descriptors.
    
    Fixes: f87d0fb ("vringh: host-side implementation of virtio rings.")
    Signed-off-by: Xie Yongji <[email protected]>
    Signed-off-by: Fam Zheng <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Acked-by: Jason Wang <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    YongjiXie authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c30b0d1 View commit details
    Browse the repository at this point in the history
  181. platform/x86: barco-p50-gpio: Add check for platform_driver_register

    [ Upstream commit 011881b ]
    
    As platform_driver_register() could fail, it should be better
    to deal with the return value in order to maintain the code
    consisitency.
    
    Fixes: 86af1d0 ("platform/x86: Support for EC-connected GPIOs for identify LED/button on Barco P50 board")
    Signed-off-by: Jiasheng Jiang <[email protected]>
    Acked-by: Peter Korsgaard <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    JiangJias authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    929f265 View commit details
    Browse the repository at this point in the history
  182. scripts/gdb: change kernel config dumping method

    [ Upstream commit 1f7a6cf ]
    
    MAGIC_START("IKCFG_ST") and MAGIC_END("IKCFG_ED") are moved out
    from the kernel_config_data variable.
    
    Thus, we parse kernel_config_data directly instead of considering
    offset of MAGIC_START and MAGIC_END.
    
    Fixes: 13610aa ("kernel/configs: use .incbin directive to embed config_data.gz")
    Signed-off-by: Kuan-Ying Lee <[email protected]>
    Signed-off-by: Masahiro Yamada <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Kuan-Ying Lee authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    669e8dd View commit details
    Browse the repository at this point in the history
  183. platform/x86: hp-wmi: Fix hp_wmi_read_int() reporting error (0x05)

    [ Upstream commit 12b19f1 ]
    
    The purpose of this patch is to introduce a fix to hp_wmi_read_int()
    and eliminate failure error (0x05). Several WMI queries leverage
    hp_wmi_read_int() to read their data and were failing with error 0x05.
    
    HPWMI_DISPLAY_QUERY
    HPWMI_HDDTEMP_QUERY
    HPWMI_ALS_QUERY
    HPWMI_HARDWARE_QUERY
    HPWMI_WIRELESS_QUERY
    HPWMI_POSTCODEERROR_QUERY
    
    The failure occurs because hp_wmi_read_int() calls
    hp_wmi_perform_query() with input parameter of size greater than zero.
    Invoking those WMI commands with an input buffer size greater than
    zero causes the command to be rejected and error 0x05 be returned.
    
    All changes were validated on a HP ZBook Workstation notebook,
    HP EliteBook x360, and HP EliteBook 850 G8.
    
    Signed-off-by: Jorge Lopez <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jorge Lopez authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d34896f View commit details
    Browse the repository at this point in the history
  184. platform/x86: hp-wmi: Use zero insize parameter only when supported

    [ Upstream commit 65f936f ]
    
    commit be9d73e ("platform/x86: hp-wmi: Fix 0x05 error code reported by
    several WMI calls") and commit 12b19f1 ("platform/x86: hp-wmi: Fix
    hp_wmi_read_int() reporting error (0x05)") cause ACPI BIOS Error (bug):
    Attempt to CreateField of length zero (20211217/dsopcode-133) because of
    the ACPI method HWMC, which unconditionally creates a Field of
    size (insize*8) bits:
    	CreateField (Arg1, 0x80, (Local5 * 0x08), DAIN)
    In cases where args->insize = 0, the Field size is 0, resulting in
    an error.
    
    Fix this by using zero insize only if 0x5 error code is returned
    
    Tested on Omen 15 AMD (2020) board ID: 8786.
    
    Fixes: be9d73e ("platform/x86: hp-wmi: Fix 0x05 error code reported by several WMI calls")
    Signed-off-by: Bedant Patnaik <[email protected]>
    Tested-by: Jorge Lopez <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    whyfu authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c2f664d View commit details
    Browse the repository at this point in the history
  185. ALSA: usb-audio: Skip generic sync EP parse for secondary EP

    commit efb75df upstream.
    
    When ep_idx is already non-zero, it means usually a capture stream
    that is set up explicity by a fixed-format quirk, and applying the
    check for generic (non-implicit-fb) sync EPs might hit incorrectly,
    resulting in a bogus sync endpoint for the capture stream.
    
    This patch adds a check for the ep_idx and skip if it's a secondary
    endpoint.  It's a part of the fixes for regressions on Saffire 6.
    
    Fixes: 7b0efea ("ALSA: usb-audio: Add missing ep_idx in fixed EP quirks")
    Reported-and-tested-by: André Kapelrud <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tiwai authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9a08c4a View commit details
    Browse the repository at this point in the history
  186. ALSA: usb-audio: Set up (implicit) sync for Saffire 6

    commit e0469d6 upstream.
    
    Focusrite Saffire 6 has fixed audioformat quirks with multiple
    endpoints assigned to a single altsetting.  Unfortunately the generic
    parser couldn't detect the sync endpoint correctly as the implicit
    sync due to the missing EP attribute bits.  In the former kernels, it
    used to work somehow casually, but it's been broken for a while after
    the large code change in 5.11.
    
    This patch cures the regression by the following:
    - Allow the static quirk table to provide the sync EP information;
      we just need to fill the fields and let the generic parser skipping
      parsing if sync_ep is already set.
    - Add the sync endpoint information to the entry for Saffire 6.
    
    Fixes: 7b0efea ("ALSA: usb-audio: Add missing ep_idx in fixed EP quirks")
    Reported-and-tested-by: André Kapelrud <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tiwai authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9474b0c View commit details
    Browse the repository at this point in the history
  187. ALSA: hda/conexant - Fix loopback issue with CX20632

    commit d5ea754 upstream.
    
    On a machine with CX20632, Alsamixer doesn't have 'Loopback
    Mixing' and 'Line'.
    
    Signed-off-by: huangwenhui <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hwithaheart authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    70db2ab View commit details
    Browse the repository at this point in the history
  188. ALSA: hda/realtek: Fix for quirk to enable speaker output on the Leno…

    …vo Yoga DuetITL 2021
    
    commit 85743a8 upstream.
    
    Enables the ALC287_FIXUP_YOGA7_14ITL_SPEAKERS quirk for the Lenovo
    Yoga DuetITL 2021 laptop to fix speaker output.
    
    [ re-sorted in the SSID order by tiwai ]
    
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208555
    Signed-off-by: Cameron Berkenpas <[email protected]>
    Co-authored-by: Songine <[email protected]>
    Cc: [email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    2 people authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    e5bf395 View commit details
    Browse the repository at this point in the history
  189. ALSA: hda/realtek: Add quirk for HP Dev One

    commit 5f3d696 upstream.
    
    Enables the audio mute LEDs and limits the mic boost to avoid picking up
    noise.
    
    Signed-off-by: Jeremy Soller <[email protected]>
    Signed-off-by: Tim Crawford <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jackpot51 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    f22261a View commit details
    Browse the repository at this point in the history
  190. cifs: return errors during session setup during reconnects

    commit 8ea2182 upstream.
    
    During reconnects, we check the return value from
    cifs_negotiate_protocol, and have handlers for both success
    and failures. But if that passes, and cifs_setup_session
    returns any errors other than -EACCES, we do not handle
    that. This fix adds a handler for that, so that we don't
    go ahead and try a tree_connect on a failed session.
    
    Signed-off-by: Shyam Prasad N <[email protected]>
    Reviewed-by: Enzo Matsumiya <[email protected]>
    Cc: [email protected]
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sprasad-microsoft authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5a61ba4 View commit details
    Browse the repository at this point in the history
  191. cifs: fix reconnect on smb3 mount types

    commit c36ee7d upstream.
    
    cifs.ko defines two file system types: cifs & smb3, and
    __cifs_get_super() was not including smb3 file system type when
    looking up superblocks, therefore failing to reconnect tcons in
    cifs_tree_connect().
    
    Fix this by calling iterate_supers_type() on both file system types.
    
    Link: https://lore.kernel.org/r/CAFrh3J9soC36+BVuwHB=g9z_KB5Og2+p2_W+BBoBOZveErz14w@mail.gmail.com
    Cc: [email protected]
    Tested-by: Satadru Pramanik <[email protected]>
    Reported-by: Satadru Pramanik <[email protected]>
    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 Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2194646 View commit details
    Browse the repository at this point in the history
  192. cifs: populate empty hostnames for extra channels

    commit 4c14d70 upstream.
    
    Currently, the secondary channels of a multichannel session
    also get hostname populated based on the info in primary channel.
    However, this will end up with a wrong resolution of hostname to
    IP address during reconnect.
    
    This change fixes this by not populating hostname info for all
    secondary channels.
    
    Fixes: 5112d80 ("cifs: populate server_hostname for extra channels")
    Cc: [email protected]
    Signed-off-by: Shyam Prasad N <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sprasad-microsoft authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    46d520e View commit details
    Browse the repository at this point in the history
  193. scsi: sd: Fix interpretation of VPD B9h length

    commit f92de9d upstream.
    
    Fixing the interpretation of the length of the B9h VPD page (Concurrent
    Positioning Ranges). Adding 4 is necessary as the first 4 bytes of the page
    is the header with page number and length information.  Adding 3 was likely
    a misinterpretation of the SBC-5 specification which sets all offsets
    starting at zero.
    
    This fixes the error in dmesg:
    
    [ 9.014456] sd 1:0:0:0: [sda] Invalid Concurrent Positioning Ranges VPD page
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: e815d36 ("scsi: sd: add concurrent positioning ranges support")
    Cc: [email protected]
    Tested-by: Michael English <[email protected]>
    Reviewed-by: Muhammad Ahmad <[email protected]>
    Reviewed-by: Damien Le Moal <[email protected]>
    Reviewed-by: Hannes Reinecke <[email protected]>
    Signed-off-by: Tyler Erickson <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vonericsen authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    3ff1191 View commit details
    Browse the repository at this point in the history
  194. KEYS: trusted: tpm2: Fix migratable logic

    commit dda5384 upstream.
    
    When creating (sealing) a new trusted key, migratable
    trusted keys have the FIXED_TPM and FIXED_PARENT attributes
    set, and non-migratable keys don't. This is backwards, and
    also causes creation to fail when creating a migratable key
    under a migratable parent. (The TPM thinks you are trying to
    seal a non-migratable blob under a migratable parent.)
    
    The following simple patch fixes the logic, and has been
    tested for all four combinations of migratable and non-migratable
    trusted keys and parent storage keys. With this logic, you will
    get a proper failure if you try to create a non-migratable
    trusted key under a migratable parent storage key, and all other
    combinations work correctly.
    
    Cc: [email protected] # v5.13+
    Fixes: e5fb5d2 ("security: keys: trusted: Make sealed key properly interoperable")
    Signed-off-by: David Safford <[email protected]>
    Reviewed-by: Ahmad Fatoum <[email protected]>
    Reviewed-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    safforddr authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    776d2c5 View commit details
    Browse the repository at this point in the history
  195. libata: fix reading concurrent positioning ranges log

    commit c745dfc upstream.
    
    The concurrent positioning ranges log is not a fixed size and may depend
    on how many ranges are supported by the device. This patch uses the size
    reported in the GPL directory to determine the number of pages supported
    by the device before attempting to read this log page.
    
    This resolves this error from the dmesg output:
        ata6.00: Read log 0x47 page 0x00 failed, Emask 0x1
    
    Cc: [email protected]
    Fixes: fe22e1c ("libata: support concurrent positioning ranges log")
    Signed-off-by: Tyler Erickson <[email protected]>
    Reviewed-by: Muhammad Ahmad <[email protected]>
    Tested-by: Michael English <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vonericsen authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    aff3431 View commit details
    Browse the repository at this point in the history
  196. libata: fix translation of concurrent positioning ranges

    commit 6d11acd upstream.
    
    Fixing the page length in the SCSI translation for the concurrent
    positioning ranges VPD page. It was writing starting in offset 3
    rather than offset 2 where the MSB is supposed to start for
    the VPD page length.
    
    Cc: [email protected]
    Fixes: fe22e1c ("libata: support concurrent positioning ranges log")
    Signed-off-by: Tyler Erickson <[email protected]>
    Reviewed-by: Muhammad Ahmad <[email protected]>
    Tested-by: Michael English <[email protected]>
    Reviewed-by: Hannes Reinecke <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vonericsen authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b44b312 View commit details
    Browse the repository at this point in the history
  197. ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files

    commit 72aad48 upstream.
    
    The {dma|pio}_mode sysfs files are incorrectly documented as having a
    list of the supported DMA/PIO transfer modes, while the corresponding
    fields of the *struct* ata_device hold the transfer mode IDs, not masks.
    
    To match these docs, the {dma|pio}_mode (and even xfer_mode!) sysfs
    files are handled by the ata_bitfield_name_match() macro which leads to
    reading such kind of nonsense from them:
    
    $ cat /sys/class/ata_device/dev3.0/pio_mode
    XFER_UDMA_7, XFER_UDMA_6, XFER_UDMA_5, XFER_UDMA_4, XFER_MW_DMA_4,
    XFER_PIO_6, XFER_PIO_5, XFER_PIO_4, XFER_PIO_3, XFER_PIO_2, XFER_PIO_1,
    XFER_PIO_0
    
    Using the correct ata_bitfield_name_search() macro fixes that:
    
    $ cat /sys/class/ata_device/dev3.0/pio_mode
    XFER_PIO_4
    
    While fixing the file documentation, somewhat reword the {dma|pio}_mode
    file doc and add a note about being mostly useful for PATA devices to
    the xfer_mode file doc...
    
    Fixes: d902747 ("[libata] Add ATA transport class")
    Signed-off-by: Sergey Shtylyov <[email protected]>
    Cc: [email protected]
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Sergey Shtylyov authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    8063a9f View commit details
    Browse the repository at this point in the history
  198. mmc: block: Fix CQE recovery reset success

    commit a051246 upstream.
    
    The intention of the use of mmc_blk_reset_success() in
    mmc_blk_cqe_recovery() was to prevent repeated resets when retrying and
    getting the same error. However, that may not be the case - any amount
    of time and I/O may pass before another recovery is needed, in which
    case there would be no reason to deny it the opportunity to recover via
    a reset if necessary. CQE recovery is expected seldom and failure to
    recover (if the clear tasks command fails), even more seldom, so it is
    better to allow the reset always, which can be done by calling
    mmc_blk_reset_success() always.
    
    Fixes: 1e8e55b ("mmc: block: Add CQE support")
    Cc: [email protected]
    Signed-off-by: Adrian Hunter <[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]>
    ahunter6 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6f00f19 View commit details
    Browse the repository at this point in the history
  199. net: phy: dp83867: retrigger SGMII AN when link change

    commit c76acfb upstream.
    
    There is a limitation in TI DP83867 PHY device where SGMII AN is only
    triggered once after the device is booted up. Even after the PHY TPI is
    down and up again, SGMII AN is not triggered and hence no new in-band
    message from PHY to MAC side SGMII.
    
    This could cause an issue during power up, when PHY is up prior to MAC.
    At this condition, once MAC side SGMII is up, MAC side SGMII wouldn`t
    receive new in-band message from TI PHY with correct link status, speed
    and duplex info.
    
    As suggested by TI, implemented a SW solution here to retrigger SGMII
    Auto-Neg whenever there is a link change.
    
    v2: Add Fixes tag in commit message.
    
    Fixes: 2a10154 ("net: phy: dp83867: Add TI dp83867 phy")
    Cc: <[email protected]> # 5.4.x
    Signed-off-by: Sit, Michael Wei Hong <[email protected]>
    Reviewed-by: Voon Weifeng <[email protected]>
    Signed-off-by: Tan Tee Min <[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: Greg Kroah-Hartman <[email protected]>
    Tan Tee Min authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    64cdf98 View commit details
    Browse the repository at this point in the history
  200. net: openvswitch: fix misuse of the cached connection on tuple changes

    commit 2061ecf upstream.
    
    If packet headers changed, the cached nfct is no longer relevant
    for the packet and attempt to re-use it leads to the incorrect packet
    classification.
    
    This issue is causing broken connectivity in OpenStack deployments
    with OVS/OVN due to hairpin traffic being unexpectedly dropped.
    
    The setup has datapath flows with several conntrack actions and tuple
    changes between them:
    
      actions:ct(commit,zone=8,mark=0/0x1,nat(src)),
              set(eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:06)),
              set(ipv4(src=172.18.2.10,dst=192.168.100.6,ttl=62)),
              ct(zone=8),recirc(0x4)
    
    After the first ct() action the packet headers are almost fully
    re-written.  The next ct() tries to re-use the existing nfct entry
    and marks the packet as invalid, so it gets dropped later in the
    pipeline.
    
    Clearing the cached conntrack entry whenever packet tuple is changed
    to avoid the issue.
    
    The flow key should not be cleared though, because we should still
    be able to match on the ct_state if the recirculation happens after
    the tuple change but before the next ct() action.
    
    Cc: [email protected]
    Fixes: 7f8a436 ("openvswitch: Add conntrack action")
    Reported-by: Frode Nordahl <[email protected]>
    Link: https://mail.openvswitch.org/pipermail/ovs-discuss/2022-May/051829.html
    Link: https://bugs.launchpad.net/ubuntu/+source/ovn/+bug/1967856
    Signed-off-by: Ilya Maximets <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    igsilya authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b574f8a View commit details
    Browse the repository at this point in the history
  201. writeback: Fix inode->i_io_list not be protected by inode->i_lock error

    commit 10e1407 upstream.
    
    Commit b35250c ("writeback: Protect inode->i_io_list with
    inode->i_lock") made inode->i_io_list not only protected by
    wb->list_lock but also inode->i_lock, but inode_io_list_move_locked()
    was missed. Add lock there and also update comment describing
    things protected by inode->i_lock. This also fixes a race where
    __mark_inode_dirty() could move inode under flush worker's hands
    and thus sync(2) could miss writing some inodes.
    
    Fixes: b35250c ("writeback: Protect inode->i_io_list with inode->i_lock")
    Link: https://lore.kernel.org/r/[email protected]
    CC: [email protected]
    Signed-off-by: Jchao Sun <[email protected]>
    Signed-off-by: Jan Kara <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jc2870 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    8e8c954 View commit details
    Browse the repository at this point in the history
  202. nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION

    commit 77e5fe8 upstream.
    
    The first validation check for EVT_TRANSACTION has two different checks
    tied together with logical AND. One is a check for minimum packet length,
    and the other is for a valid aid_tag. If either condition is true (fails),
    then an error should be triggered.  The fix is to change && to ||.
    
    Fixes: 26fc6c7 ("NFC: st21nfca: Add HCI transaction event support")
    Cc: [email protected]
    Signed-off-by: Martin Faltesek <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mfaltesek authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    8433965 View commit details
    Browse the repository at this point in the history
  203. nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling

    commit 996419e upstream.
    
    Error paths do not free previously allocated memory. Add devm_kfree() to
    those failure paths.
    
    Fixes: 26fc6c7 ("NFC: st21nfca: Add HCI transaction event support")
    Fixes: 4fbcc1a ("nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION")
    Cc: [email protected]
    Signed-off-by: Martin Faltesek <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mfaltesek authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    db836b9 View commit details
    Browse the repository at this point in the history
  204. nfc: st21nfca: fix incorrect sizing calculations in EVT_TRANSACTION

    commit f2e19b3 upstream.
    
    The transaction buffer is allocated by using the size of the packet buf,
    and subtracting two which seem intended to remove the two tags which are
    not present in the target structure. This calculation leads to under
    counting memory because of differences between the packet contents and the
    target structure. The aid_len field is a u8 in the packet, but a u32 in
    the structure, resulting in at least 3 bytes always being under counted.
    Further, the aid data is a variable length field in the packet, but fixed
    in the structure, so if this field is less than the max, the difference is
    added to the under counting.
    
    The last validation check for transaction->params_len is also incorrect
    since it employs the same accounting error.
    
    To fix, perform validation checks progressively to safely reach the
    next field, to determine the size of both buffers and verify both tags.
    Once all validation checks pass, allocate the buffer and copy the data.
    This eliminates freeing memory on the error path, as those checks are
    moved ahead of memory allocation.
    
    Fixes: 26fc6c7 ("NFC: st21nfca: Add HCI transaction event support")
    Fixes: 4fbcc1a ("nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION")
    Cc: [email protected]
    Signed-off-by: Martin Faltesek <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mfaltesek authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    e80b413 View commit details
    Browse the repository at this point in the history
  205. ixgbe: fix bcast packets Rx on VF after promisc removal

    commit 803e989 upstream.
    
    After a VF requested to remove the promiscuous flag on an interface, the
    broadcast packets are not received anymore. This breaks some protocols
    like ARP.
    
    In ixgbe_update_vf_xcast_mode(), we should keep the IXGBE_VMOLR_BAM
    bit (Broadcast Accept) on promiscuous removal.
    
    This flag is already set by default in ixgbe_set_vmolr() on VF reset.
    
    Fixes: 8443c1a ("ixgbe, ixgbevf: Add new mbox API xcast mode")
    Cc: [email protected]
    Cc: Nicolas Dichtel <[email protected]>
    Signed-off-by: Olivier Matz <[email protected]>
    Tested-by: Konrad Jankowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    olivier-matz-6wind authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5eafe31 View commit details
    Browse the repository at this point in the history
  206. ixgbe: fix unexpected VLAN Rx in promisc mode on VF

    commit 7bb0fb7 upstream.
    
    When the promiscuous mode is enabled on a VF, the IXGBE_VMOLR_VPE
    bit (VLAN Promiscuous Enable) is set. This means that the VF will
    receive packets whose VLAN is not the same than the VLAN of the VF.
    
    For instance, in this situation:
    
    ┌────────┐    ┌────────┐    ┌────────┐
    │        │    │        │    │        │
    │        │    │        │    │        │
    │     VF0├────┤VF1  VF2├────┤VF3     │
    │        │    │        │    │        │
    └────────┘    └────────┘    └────────┘
       VM1           VM2           VM3
    
    vf 0:  vlan 1000
    vf 1:  vlan 1000
    vf 2:  vlan 1001
    vf 3:  vlan 1001
    
    If we tcpdump on VF3, we see all the packets, even those transmitted
    on vlan 1000.
    
    This behavior prevents to bridge VF1 and VF2 in VM2, because it will
    create a loop: packets transmitted on VF1 will be received by VF2 and
    vice-versa, and bridged again through the software bridge.
    
    This patch remove the activation of VLAN Promiscuous when a VF enables
    the promiscuous mode. However, the IXGBE_VMOLR_UPE bit (Unicast
    Promiscuous) is kept, so that a VF receives all packets that has the
    same VLAN, whatever the destination MAC address.
    
    Fixes: 8443c1a ("ixgbe, ixgbevf: Add new mbox API xcast mode")
    Cc: [email protected]
    Cc: Nicolas Dichtel <[email protected]>
    Signed-off-by: Olivier Matz <[email protected]>
    Tested-by: Konrad Jankowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    olivier-matz-6wind authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9cd5029 View commit details
    Browse the repository at this point in the history
  207. Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag

    commit c42e656 upstream.
    
    The bcm5974 driver does the allocation and dma mapping of the usb urb
    data buffer, but driver does not set the URB_NO_TRANSFER_DMA_MAP flag
    to let usb core know the buffer is already mapped.
    
    usb core tries to map the already mapped buffer, causing a warning:
    "xhci_hcd 0000:00:14.0: rejecting DMA map of vmalloc memory"
    
    Fix this by setting the URB_NO_TRANSFER_DMA_MAP, letting usb core
    know buffer is already mapped by bcm5974 driver
    
    Signed-off-by: Mathias Nyman <[email protected]>
    Cc: [email protected]
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215890
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    matnyman authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c5ff742 View commit details
    Browse the repository at this point in the history
  208. vduse: Fix NULL pointer dereference on sysfs access

    commit b27ee76 upstream.
    
    The control device has no drvdata. So we will get a
    NULL pointer dereference when accessing control
    device's msg_timeout attribute via sysfs:
    
    [ 132.841881][ T3644] BUG: kernel NULL pointer dereference, address: 00000000000000f8
    [ 132.850619][ T3644] RIP: 0010:msg_timeout_show (drivers/vdpa/vdpa_user/vduse_dev.c:1271)
    [ 132.869447][ T3644] dev_attr_show (drivers/base/core.c:2094)
    [ 132.870215][ T3644] sysfs_kf_seq_show (fs/sysfs/file.c:59)
    [ 132.871164][ T3644] ? device_remove_bin_file (drivers/base/core.c:2088)
    [ 132.872082][ T3644] kernfs_seq_show (fs/kernfs/file.c:164)
    [ 132.872838][ T3644] seq_read_iter (fs/seq_file.c:230)
    [ 132.873578][ T3644] ? __vmalloc_area_node (mm/vmalloc.c:3041)
    [ 132.874532][ T3644] kernfs_fop_read_iter (fs/kernfs/file.c:238)
    [ 132.875513][ T3644] __kernel_read (fs/read_write.c:440 (discriminator 1))
    [ 132.876319][ T3644] kernel_read (fs/read_write.c:459)
    [ 132.877129][ T3644] kernel_read_file (fs/kernel_read_file.c:94)
    [ 132.877978][ T3644] kernel_read_file_from_fd (include/linux/file.h:45 fs/kernel_read_file.c:186)
    [ 132.879019][ T3644] __do_sys_finit_module (kernel/module.c:4207)
    [ 132.879930][ T3644] __ia32_sys_finit_module (kernel/module.c:4189)
    [ 132.880930][ T3644] do_int80_syscall_32 (arch/x86/entry/common.c:112 arch/x86/entry/common.c:132)
    [ 132.881847][ T3644] entry_INT80_compat (arch/x86/entry/entry_64_compat.S:419)
    
    To fix it, don't create the unneeded attribute for
    control device anymore.
    
    Fixes: c8a6153 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
    Reported-by: kernel test robot <[email protected]>
    Cc: [email protected]
    Signed-off-by: Xie Yongji <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    YongjiXie authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    30fd1b5 View commit details
    Browse the repository at this point in the history
  209. cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE

    commit 32d4fd5 upstream.
    
    Commit c227233 ("intel_idle: enable interrupts before C1 on
    Xeons") wrecked intel_idle in two ways:
    
     - must not have tracing in idle functions
     - must return with IRQs disabled
    
    Additionally, it added a branch for no good reason.
    
    Fixes: c227233 ("intel_idle: enable interrupts before C1 on Xeons")
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    [ rjw: Moved the intel_idle() kerneldoc comment next to the function ]
    Cc: 5.16+ <[email protected]> # 5.16+
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2e9d662 View commit details
    Browse the repository at this point in the history
  210. mm/huge_memory: Fix xarray node memory leak

    commit 69a37a8 upstream.
    
    If xas_split_alloc() fails to allocate the necessary nodes to complete the
    xarray entry split, it sets the xa_state to -ENOMEM, which xas_nomem()
    then interprets as "Please allocate more memory", not as "Please free
    any unnecessary memory" (which was the intended outcome).  It's confusing
    to use xas_nomem() to free memory in this context, so call xas_destroy()
    instead.
    
    Reported-by: [email protected]
    Fixes: 6b24ca4 ("mm: Use multi-index entries in the page cache")
    Cc: [email protected]
    Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Matthew Wilcox (Oracle) authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c0c8496 View commit details
    Browse the repository at this point in the history
  211. powerpc: Don't select HAVE_IRQ_EXIT_ON_IRQ_STACK

    commit 1346d00 upstream.
    
    The HAVE_IRQ_EXIT_ON_IRQ_STACK option tells generic code that irq_exit()
    is called while still running on the hard irq stack (hardirq_ctx[] in
    the powerpc code).
    
    Selecting the option means the generic code will *not* switch to the
    softirq stack before running softirqs, because the code is already
    running on the (mostly empty) hard irq stack.
    
    But since commit 1b1b6a6 ("powerpc: handle irq_enter/irq_exit in
    interrupt handler wrappers"), irq_exit() is now called on the regular task
    stack, not the hard irq stack.
    
    That's because previously irq_exit() was called in __do_irq() which is
    run on the hard irq stack, but now it is called in
    interrupt_async_exit_prepare() which is called from do_irq() constructed
    by the wrapper macro, which is after the switch back to the task stack.
    
    So drop HAVE_IRQ_EXIT_ON_IRQ_STACK from the Kconfig. This will mean an
    extra stack switch when processing some interrupts, but should
    significantly reduce the likelihood of stack overflow.
    
    It also means the softirq stack will be used for running softirqs from
    other interrupts that don't use the hard irq stack, eg. timer interrupts.
    
    Fixes: 1b1b6a6 ("powerpc: handle irq_enter/irq_exit in interrupt handler wrappers")
    Cc: [email protected] # v5.12+
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mpe authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    ede5316 View commit details
    Browse the repository at this point in the history
  212. drm/bridge: analogix_dp: Support PSR-exit to disable transition

    commit ca87165 upstream.
    
    Most eDP panel functions only work correctly when the panel is not in
    self-refresh. In particular, analogix_dp_bridge_disable() tends to hit
    AUX channel errors if the panel is in self-refresh.
    
    Given the above, it appears that so far, this driver assumes that we are
    never in self-refresh when it comes time to fully disable the bridge.
    Prior to commit 846c7df ("drm/atomic: Try to preserve the crtc
    enabled state in drm_atomic_remove_fb, v2."), this tended to be true,
    because we would automatically disable the pipe when framebuffers were
    removed, and so we'd typically disable the bridge shortly after the last
    display activity.
    
    However, that is not guaranteed: an idle (self-refresh) display pipe may
    be disabled, e.g., when switching CRTCs. We need to exit PSR first.
    
    Stable notes: this is definitely a bugfix, and the bug has likely
    existed in some form for quite a while. It may predate the "PSR helpers"
    refactor, but the code looked very different before that, and it's
    probably not worth rewriting the fix.
    
    Cc: <[email protected]>
    Fixes: 6c836d9 ("drm/rockchip: Use the helpers for PSR")
    Signed-off-by: Brian Norris <[email protected]>
    Reviewed-by: Sean Paul <[email protected]>
    Signed-off-by: Douglas Anderson <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220228122522.v2.1.I161904be17ba14526f78536ccd78b85818449b51@changeid
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    computersforpeace authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    54baffc View commit details
    Browse the repository at this point in the history
  213. drm/atomic: Force bridge self-refresh-exit on CRTC switch

    commit e54a442 upstream.
    
    It's possible to change which CRTC is in use for a given
    connector/encoder/bridge while we're in self-refresh without fully
    disabling the connector/encoder/bridge along the way. This can confuse
    the bridge encoder/bridge, because
    (a) it needs to track the SR state (trying to perform "active"
        operations while the panel is still in SR can be Bad(TM)); and
    (b) it tracks the SR state via the CRTC state (and after the switch, the
        previous SR state is lost).
    
    Thus, we need to either somehow carry the self-refresh state over to the
    new CRTC, or else force an encoder/bridge self-refresh transition during
    such a switch.
    
    I choose the latter, so we disable the encoder (and exit PSR) before
    attaching it to the new CRTC (where we can continue to assume a clean
    (non-self-refresh) state).
    
    This fixes PSR issues seen on Rockchip RK3399 systems with
    drivers/gpu/drm/bridge/analogix/analogix_dp_core.c.
    
    Change in v2:
    
    - Drop "->enable" condition; this could possibly be "->active" to
      reflect the intended hardware state, but it also is a little
      over-specific. We want to make a transition through "disabled" any
      time we're exiting PSR at the same time as a CRTC switch.
      (Thanks Liu Ying)
    
    Cc: Liu Ying <[email protected]>
    Cc: <[email protected]>
    Fixes: 1452c25 ("drm: Add helpers to kick off self refresh mode in drivers")
    Signed-off-by: Brian Norris <[email protected]>
    Reviewed-by: Sean Paul <[email protected]>
    Signed-off-by: Douglas Anderson <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220228122522.v2.2.Ic15a2ef69c540aee8732703103e2cff51fb9c399@changeid
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    computersforpeace authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    59ef346 View commit details
    Browse the repository at this point in the history
  214. drm/amdgpu/jpeg2: Add jpeg vmid update under IB submit

    commit 578eb31 upstream.
    
    Add jpeg vmid update under IB submit
    
    Signed-off-by: Mohammad Zafar Ziya <[email protected]>
    Acked-by: Christian König <[email protected]>
    Reviewed-by: Lijo Lazar <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Mohammad Zafar Ziya authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    820a413 View commit details
    Browse the repository at this point in the history
  215. drm/amdgpu: update VCN codec support for Yellow Carp

    commit 97e5030 upstream.
    
    Supports AV1.  Mesa already has support for this and
    doesn't rely on the kernel caps for yellow carp, so
    this was already working from an application perspective.
    
    Fixes: 5543981 ("amdgpu/nv.c - Added video codec support for Yellow Carp")
    Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2002
    Reviewed-by: Leo Liu <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    alexdeucher authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    1242888 View commit details
    Browse the repository at this point in the history
  216. virtio-rng: make device ready before making request

    commit 2284325 upstream.
    
    Current virtio-rng does a entropy request before DRIVER_OK, this
    violates the spec:
    
    virtio spec requires that all drivers set DRIVER_OK
    before using devices.
    
    Further, kernel will ignore the interrupt after commit
    8b4ec69 ("virtio: harden vring IRQ").
    
    Fixing this by making device ready before the request.
    
    Cc: [email protected]
    Fixes: 8b4ec69 ("virtio: harden vring IRQ")
    Fixes: f7f510e ("virtio: An entropy device, as suggested by hpa.")
    Reported-and-tested-by: [email protected]
    Signed-off-by: Jason Wang <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Reviewed-by: Laurent Vivier <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jasowang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    8081042 View commit details
    Browse the repository at this point in the history
  217. powerpc/32: Fix overread/overwrite of thread_struct via ptrace

    commit 8e12784 upstream.
    
    The ptrace PEEKUSR/POKEUSR (aka PEEKUSER/POKEUSER) API allows a process
    to read/write registers of another process.
    
    To get/set a register, the API takes an index into an imaginary address
    space called the "USER area", where the registers of the process are
    laid out in some fashion.
    
    The kernel then maps that index to a particular register in its own data
    structures and gets/sets the value.
    
    The API only allows a single machine-word to be read/written at a time.
    So 4 bytes on 32-bit kernels and 8 bytes on 64-bit kernels.
    
    The way floating point registers (FPRs) are addressed is somewhat
    complicated, because double precision float values are 64-bit even on
    32-bit CPUs. That means on 32-bit kernels each FPR occupies two
    word-sized locations in the USER area. On 64-bit kernels each FPR
    occupies one word-sized location in the USER area.
    
    Internally the kernel stores the FPRs in an array of u64s, or if VSX is
    enabled, an array of pairs of u64s where one half of each pair stores
    the FPR. Which half of the pair stores the FPR depends on the kernel's
    endianness.
    
    To handle the different layouts of the FPRs depending on VSX/no-VSX and
    big/little endian, the TS_FPR() macro was introduced.
    
    Unfortunately the TS_FPR() macro does not take into account the fact
    that the addressing of each FPR differs between 32-bit and 64-bit
    kernels. It just takes the index into the "USER area" passed from
    userspace and indexes into the fp_state.fpr array.
    
    On 32-bit there are 64 indexes that address FPRs, but only 32 entries in
    the fp_state.fpr array, meaning the user can read/write 256 bytes past
    the end of the array. Because the fp_state sits in the middle of the
    thread_struct there are various fields than can be overwritten,
    including some pointers. As such it may be exploitable.
    
    It has also been observed to cause systems to hang or otherwise
    misbehave when using gdbserver, and is probably the root cause of this
    report which could not be easily reproduced:
      https://lore.kernel.org/linuxppc-dev/[email protected]/
    
    Rather than trying to make the TS_FPR() macro even more complicated to
    fix the bug, or add more macros, instead add a special-case for 32-bit
    kernels. This is more obvious and hopefully avoids a similar bug
    happening again in future.
    
    Note that because 32-bit kernels never have VSX enabled the code doesn't
    need to consider TS_FPRWIDTH/OFFSET at all. Add a BUILD_BUG_ON() to
    ensure that 32-bit && VSX is never enabled.
    
    Fixes: 87fec05 ("powerpc: PTRACE_PEEKUSR/PTRACE_POKEUSER of FPR registers in little endian builds")
    Cc: [email protected] # v3.13+
    Reported-by: Ariel Miculas <[email protected]>
    Tested-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]>
    mpe authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6385564 View commit details
    Browse the repository at this point in the history
  218. drm/ast: Create threshold values for AST2600

    commit bcc7741 upstream.
    
    The threshold value is used for AST2600 only.
    
    Signed-off-by: KuoHsiang Chou <[email protected]>
    Signed-off-by: Thomas Zimmermann <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Kuo-Hsiang-Chou authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    e9993a9 View commit details
    Browse the repository at this point in the history
  219. random: avoid checking crng_ready() twice in random_init()

    commit 9b29b6b upstream.
    
    The current flow expands to:
    
        if (crng_ready())
           ...
        else if (...)
            if (!crng_ready())
                ...
    
    The second crng_ready() call is redundant, but can't so easily be
    optimized out by the compiler.
    
    This commit simplifies that to:
    
        if (crng_ready()
            ...
        else if (...)
            ...
    
    Fixes: 560181c ("random: move initialization functions out of hot pages")
    Cc: [email protected]
    Cc: Dominik Brodowski <[email protected]>
    Signed-off-by: Jason A. Donenfeld <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    zx2c4 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    7ccc345 View commit details
    Browse the repository at this point in the history
  220. random: mark bootloader randomness code as __init

    commit 39e0f99 upstream.
    
    add_bootloader_randomness() and the variables it touches are only used
    during __init and not after, so mark these as __init. At the same time,
    unexport this, since it's only called by other __init code that's
    built-in.
    
    Cc: [email protected]
    Fixes: 428826f ("fdt: add support for rng-seed")
    Signed-off-by: Jason A. Donenfeld <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    zx2c4 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    5602304 View commit details
    Browse the repository at this point in the history
  221. random: account for arch randomness in bits

    commit 77fc95f upstream.
    
    Rather than accounting in bytes and multiplying (shifting), we can just
    account in bits and avoid the shift. The main motivation for this is
    there are other patches in flux that expand this code a bit, and
    avoiding the duplication of "* 8" everywhere makes things a bit clearer.
    
    Cc: [email protected]
    Fixes: 12e45a2 ("random: credit architectural init the exact amount")
    Signed-off-by: Jason A. Donenfeld <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    zx2c4 authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9c6c4fc View commit details
    Browse the repository at this point in the history
  222. md/raid0: Ignore RAID0 layout if the second zone has only one device

    commit ea23994 upstream.
    
    The RAID0 layout is irrelevant if all members have the same size so the
    array has only one zone. It is *also* irrelevant if the array has two
    zones and the second zone has only one device, for example if the array
    has two members of different sizes.
    
    So in that case it makes sense to allow assembly even when the layout is
    undefined, like what is done when the array has only one zone.
    
    Reviewed-by: NeilBrown <[email protected]>
    Signed-off-by: Pascal Hambourg <[email protected]>
    Signed-off-by: Song Liu <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    phambourg authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    569d532 View commit details
    Browse the repository at this point in the history
  223. net/sched: act_police: more accurate MTU policing

    commit 4ddc844 upstream.
    
    in current Linux, MTU policing does not take into account that packets at
    the TC ingress have the L2 header pulled. Thus, the same TC police action
    (with the same value of tcfp_mtu) behaves differently for ingress/egress.
    In addition, the full GSO size is compared to tcfp_mtu: as a consequence,
    the policer drops GSO packets even when individual segments have the L2 +
    L3 + L4 + payload length below the configured valued of tcfp_mtu.
    
    Improve the accuracy of MTU policing as follows:
     - account for mac_len for non-GSO packets at TC ingress.
     - compare MTU threshold with the segmented size for GSO packets.
    Also, add a kselftest that verifies the correct behavior.
    
    Signed-off-by: Davide Caratti <[email protected]>
    Reviewed-by: Marcelo Ricardo Leitner <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dcaratti authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    7cbcf67 View commit details
    Browse the repository at this point in the history
  224. block, loop: support partitions without scanning

    commit b9684a7 upstream.
    
    Historically we did distinguish between a flag that surpressed partition
    scanning, and a combinations of the minors variable and another flag if
    any partitions were supported.  This was generally confusing and doesn't
    make much sense, but some corner case uses of the loop driver actually
    do want to support manually added partitions on a device that does not
    actively scan for partitions.  To make things worsee the loop driver
    also wants to dynamically toggle the scanning for partitions on a live
    gendisk, which makes the disk->flags updates non-atomic.
    
    Introduce a new GD_SUPPRESS_PART_SCAN bit in disk->state that disables
    just scanning for partitions, and toggle that instead of GENHD_FL_NO_PART
    in the loop driver.
    
    Fixes: 1ebe2e5 ("block: remove GENHD_FL_EXT_DEVT")
    Reported-by: Ming Lei <[email protected]>
    Signed-off-by: Christoph Hellwig <[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]>
    Christoph Hellwig authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d31b82b View commit details
    Browse the repository at this point in the history
  225. PCI: qcom: Fix pipe clock imbalance

    commit fdf6a2f upstream.
    
    Fix a clock imbalance introduced by ed8cc3b ("PCI: qcom: Add support
    for SDM845 PCIe controller"), which enables the pipe clock both in init()
    and in post_init() but only disables in post_deinit().
    
    Note that the pipe clock was also never disabled in the init() error
    paths and that enabling the clock before powering up the PHY looks
    questionable.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: ed8cc3b ("PCI: qcom: Add support for SDM845 PCIe controller")
    Signed-off-by: Johan Hovold <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Bjorn Andersson <[email protected]>
    Cc: [email protected]      # 5.6
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jhovold authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b50d3a1 View commit details
    Browse the repository at this point in the history
  226. zonefs: fix handling of explicit_open option on mount

    commit a2a513b upstream.
    
    Ignoring the explicit_open mount option on mount for devices that do not
    have a limit on the number of open zones must be done after the mount
    options are parsed and set in s_mount_opts. Move the check to ignore
    the explicit_open option after the call to zonefs_parse_options() in
    zonefs_fill_super().
    
    Fixes: b5c00e9 ("zonefs: open/close zone on file open/close")
    Cc: <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Reviewed-by: Johannes Thumshirn <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Damien Le Moal authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d50efc8 View commit details
    Browse the repository at this point in the history
  227. iov_iter: fix build issue due to possible type mis-match

    commit 1c27f1f upstream.
    
    Commit 6c77676 ("iov_iter: Fix iter_xarray_get_pages{,_alloc}()")
    introduced a problem on some 32-bit architectures (at least arm, xtensa,
    csky,sparc and mips), that have a 'size_t' that is 'unsigned int'.
    
    The reason is that we now do
    
        min(nr * PAGE_SIZE - offset, maxsize);
    
    where 'nr' and 'offset' and both 'unsigned int', and PAGE_SIZE is
    'unsigned long'.  As a result, the normal C type rules means that the
    first argument to 'min()' ends up being 'unsigned long'.
    
    In contrast, 'maxsize' is of type 'size_t'.
    
    Now, 'size_t' and 'unsigned long' are always the same physical type in
    the kernel, so you'd think this doesn't matter, and from an actual
    arithmetic standpoint it doesn't.
    
    But on 32-bit architectures 'size_t' is commonly 'unsigned int', even if
    it could also be 'unsigned long'.  In that situation, both are unsigned
    32-bit types, but they are not the *same* type.
    
    And as a result 'min()' will complain about the distinct types (ignore
    the "pointer types" part of the error message: that's an artifact of the
    way we have made 'min()' check types for being the same):
    
      lib/iov_iter.c: In function 'iter_xarray_get_pages':
      include/linux/minmax.h:20:35: error: comparison of distinct pointer types lacks a cast [-Werror]
         20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
            |                                   ^~
      lib/iov_iter.c:1464:16: note: in expansion of macro 'min'
       1464 |         return min(nr * PAGE_SIZE - offset, maxsize);
            |                ^~~
    
    This was not visible on 64-bit architectures (where we always define
    'size_t' to be 'unsigned long').
    
    Force these cases to use 'min_t(size_t, x, y)' to make the type explicit
    and avoid the issue.
    
    [ Nit-picky note: technically 'size_t' doesn't have to match 'unsigned
      long' arithmetically. We've certainly historically seen environments
      with 16-bit address spaces and 32-bit 'unsigned long'.
    
      Similarly, even in 64-bit modern environments, 'size_t' could be its
      own type distinct from 'unsigned long', even if it were arithmetically
      identical.
    
      So the above type commentary is only really descriptive of the kernel
      environment, not some kind of universal truth for the kinds of wild
      and crazy situations that are allowed by the C standard ]
    
    Reported-by: Sudip Mukherjee <[email protected]>
    Link: https://lore.kernel.org/all/YqRyL2sIqQNDfky2@debian/
    Cc: Jeff Layton <[email protected]>
    Cc: David Howells <[email protected]>
    Cc: Al Viro <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Cc: Guenter Roeck <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    torvalds authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    b180e78 View commit details
    Browse the repository at this point in the history
  228. dmaengine: idxd: add missing callback function to support DMA_INTERRUPT

    commit 2112b8f upstream.
    
    When setting DMA_INTERRUPT capability, a callback function
    dma->device_prep_dma_interrupt() is needed to support this capability.
    Without setting the callback, dma_async_device_register() will fail dma
    capability check.
    
    Fixes: 4e5a4eb ("dmaengine: idxd: set DMA_INTERRUPT cap bit")
    Signed-off-by: Dave Jiang <[email protected]>
    Link: https://lore.kernel.org/r/165101232637.3951447.15765792791591763119.stgit@djiang5-desk3.ch.intel.com
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    davejiang authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    eb6735a View commit details
    Browse the repository at this point in the history
  229. tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd

    commit 1182576 upstream.
    
    syzbot got a new report [1] finally pointing to a very old bug,
    added in initial support for MTU probing.
    
    tcp_mtu_probe() has checks about starting an MTU probe if
    tcp_snd_cwnd(tp) >= 11.
    
    But nothing prevents tcp_snd_cwnd(tp) to be reduced later
    and before the MTU probe succeeds.
    
    This bug would lead to potential zero-divides.
    
    Debugging added in commit 4057037 ("tcp: add accessors
    to read/set tp->snd_cwnd") has paid off :)
    
    While we are at it, address potential overflows in this code.
    
    [1]
    WARNING: CPU: 1 PID: 14132 at include/net/tcp.h:1219 tcp_mtup_probe_success+0x366/0x570 net/ipv4/tcp_input.c:2712
    Modules linked in:
    CPU: 1 PID: 14132 Comm: syz-executor.2 Not tainted 5.18.0-syzkaller-07857-gbabf0bb978e3 #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    RIP: 0010:tcp_snd_cwnd_set include/net/tcp.h:1219 [inline]
    RIP: 0010:tcp_mtup_probe_success+0x366/0x570 net/ipv4/tcp_input.c:2712
    Code: 74 08 48 89 ef e8 da 80 17 f9 48 8b 45 00 65 48 ff 80 80 03 00 00 48 83 c4 30 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 aa b0 c5 f8 <0f> 0b e9 16 fe ff ff 48 8b 4c 24 08 80 e1 07 38 c1 0f 8c c7 fc ff
    RSP: 0018:ffffc900079e70f8 EFLAGS: 00010287
    RAX: ffffffff88c0f7f6 RBX: ffff8880756e7a80 RCX: 0000000000040000
    RDX: ffffc9000c6c4000 RSI: 0000000000031f9e RDI: 0000000000031f9f
    RBP: 0000000000000000 R08: ffffffff88c0f606 R09: ffffc900079e7520
    R10: ffffed101011226d R11: 1ffff1101011226c R12: 1ffff1100eadcf50
    R13: ffff8880756e72c0 R14: 1ffff1100eadcf89 R15: dffffc0000000000
    FS:  00007f643236e700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f1ab3f1e2a0 CR3: 0000000064fe7000 CR4: 00000000003506e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     <TASK>
     tcp_clean_rtx_queue+0x223a/0x2da0 net/ipv4/tcp_input.c:3356
     tcp_ack+0x1962/0x3c90 net/ipv4/tcp_input.c:3861
     tcp_rcv_established+0x7c8/0x1ac0 net/ipv4/tcp_input.c:5973
     tcp_v6_do_rcv+0x57b/0x1210 net/ipv6/tcp_ipv6.c:1476
     sk_backlog_rcv include/net/sock.h:1061 [inline]
     __release_sock+0x1d8/0x4c0 net/core/sock.c:2849
     release_sock+0x5d/0x1c0 net/core/sock.c:3404
     sk_stream_wait_memory+0x700/0xdc0 net/core/stream.c:145
     tcp_sendmsg_locked+0x111d/0x3fc0 net/ipv4/tcp.c:1410
     tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1448
     sock_sendmsg_nosec net/socket.c:714 [inline]
     sock_sendmsg net/socket.c:734 [inline]
     __sys_sendto+0x439/0x5c0 net/socket.c:2119
     __do_sys_sendto net/socket.c:2131 [inline]
     __se_sys_sendto net/socket.c:2127 [inline]
     __x64_sys_sendto+0xda/0xf0 net/socket.c:2127
     do_syscall_x64 arch/x86/entry/common.c:50 [inline]
     do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
     entry_SYSCALL_64_after_hwframe+0x46/0xb0
    RIP: 0033:0x7f6431289109
    Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007f643236e168 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
    RAX: ffffffffffffffda RBX: 00007f643139c100 RCX: 00007f6431289109
    RDX: 00000000d0d0c2ac RSI: 0000000020000080 RDI: 000000000000000a
    RBP: 00007f64312e308d R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000
    R13: 00007fff372533af R14: 00007f643236e300 R15: 0000000000022000
    
    Fixes: 5d424d5 ("[TCP]: MTU probing")
    Signed-off-by: Eric Dumazet <[email protected]>
    Reported-by: syzbot <[email protected]>
    Acked-by: Yuchung Cheng <[email protected]>
    Acked-by: Neal Cardwell <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Eric Dumazet authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    aa7f333 View commit details
    Browse the repository at this point in the history
  230. net/mlx5: E-Switch, pair only capable devices

    commit 3008e6a upstream.
    
    OFFLOADS paring using devcom is possible only on devices
    that support LAG. Filter based on lag capabilities.
    
    This fixes an issue where mlx5_get_next_phys_dev() was
    called without holding the interface lock.
    
    This issue was found when commit
    bc4c2f2 ("net/mlx5: Lag, filter non compatible devices")
    added an assert that verifies the interface lock is held.
    
    WARNING: CPU: 9 PID: 1706 at drivers/net/ethernet/mellanox/mlx5/core/dev.c:642 mlx5_get_next_phys_dev+0xd2/0x100 [mlx5_core]
    Modules linked in: mlx5_vdpa vringh vhost_iotlb vdpa mlx5_ib mlx5_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_umad ib_ipoib ib_cm ib_uverbs ib_core overlay fuse [last unloaded: mlx5_core]
    CPU: 9 PID: 1706 Comm: devlink Not tainted 5.18.0-rc7+ pop-os#11
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
    RIP: 0010:mlx5_get_next_phys_dev+0xd2/0x100 [mlx5_core]
    Code: 02 00 75 48 48 8b 85 80 04 00 00 5d c3 31 c0 5d c3 be ff ff ff ff 48 c7 c7 08 41 5b a0 e8 36 87 28 e3 85 c0 0f 85 6f ff ff ff <0f> 0b e9 68 ff ff ff 48 c7 c7 0c 91 cc 84 e8 cb 36 6f e1 e9 4d ff
    RSP: 0018:ffff88811bf47458 EFLAGS: 00010246
    RAX: 0000000000000000 RBX: ffff88811b398000 RCX: 0000000000000001
    RDX: 0000000080000000 RSI: ffffffffa05b4108 RDI: ffff88812daaaa78
    RBP: ffff88812d050380 R08: 0000000000000001 R09: ffff88811d6b3437
    R10: 0000000000000001 R11: 00000000fddd3581 R12: ffff88815238c000
    R13: ffff88812d050380 R14: ffff8881018aa7e0 R15: ffff88811d6b3428
    FS:  00007fc82e18ae80(0000) GS:ffff88842e080000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f9630d1b421 CR3: 0000000149802004 CR4: 0000000000370ea0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     <TASK>
     mlx5_esw_offloads_devcom_event+0x99/0x3b0 [mlx5_core]
     mlx5_devcom_send_event+0x167/0x1d0 [mlx5_core]
     esw_offloads_enable+0x1153/0x1500 [mlx5_core]
     ? mlx5_esw_offloads_controller_valid+0x170/0x170 [mlx5_core]
     ? wait_for_completion_io_timeout+0x20/0x20
     ? mlx5_rescan_drivers_locked+0x318/0x810 [mlx5_core]
     mlx5_eswitch_enable_locked+0x586/0xc50 [mlx5_core]
     ? mlx5_eswitch_disable_pf_vf_vports+0x1d0/0x1d0 [mlx5_core]
     ? mlx5_esw_try_lock+0x1b/0xb0 [mlx5_core]
     ? mlx5_eswitch_enable+0x270/0x270 [mlx5_core]
     ? __debugfs_create_file+0x260/0x3e0
     mlx5_devlink_eswitch_mode_set+0x27e/0x870 [mlx5_core]
     ? mutex_lock_io_nested+0x12c0/0x12c0
     ? esw_offloads_disable+0x250/0x250 [mlx5_core]
     ? devlink_nl_cmd_trap_get_dumpit+0x470/0x470
     ? rcu_read_lock_sched_held+0x3f/0x70
     devlink_nl_cmd_eswitch_set_doit+0x217/0x620
    
    Fixes: dd3fddb ("net/mlx5: E-Switch, handle devcom events only for ports on the same device")
    Signed-off-by: Mark Bloch <[email protected]>
    Reviewed-by: Roi Dayan <[email protected]>
    Reviewed-by: Moshe Shemesh <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mark-bloch authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    0cef0b7 View commit details
    Browse the repository at this point in the history
  231. xsk: Fix possible crash when multiple sockets are created

    commit ba3beec upstream.
    
    Fix a crash that happens if an Rx only socket is created first, then a
    second socket is created that is Tx only and bound to the same umem as
    the first socket and also the same netdev and queue_id together with the
    XDP_SHARED_UMEM flag. In this specific case, the tx_descs array page
    pool was not created by the first socket as it was an Rx only socket.
    When the second socket is bound it needs this tx_descs array of this
    shared page pool as it has a Tx component, but unfortunately it was
    never allocated, leading to a crash. Note that this array is only used
    for zero-copy drivers using the batched Tx APIs, currently only ice and
    i40e.
    
    [ 5511.150360] BUG: kernel NULL pointer dereference, address: 0000000000000008
    [ 5511.158419] #PF: supervisor write access in kernel mode
    [ 5511.164472] #PF: error_code(0x0002) - not-present page
    [ 5511.170416] PGD 0 P4D 0
    [ 5511.173347] Oops: 0002 [pop-os#1] PREEMPT SMP PTI
    [ 5511.178186] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G            E     5.18.0-rc1+ pop-os#97
    [ 5511.187245] Hardware name: Intel Corp. GRANTLEY/GRANTLEY, BIOS GRRFCRB1.86B.0276.D07.1605190235 05/19/2016
    [ 5511.198418] RIP: 0010:xsk_tx_peek_release_desc_batch+0x198/0x310
    [ 5511.205375] Code: c0 83 c6 01 84 c2 74 6d 8d 46 ff 23 07 44 89 e1 48 83 c0 14 48 c1 e1 04 48 c1 e0 04 48 03 47 10 4c 01 c1 48 8b 50 08 48 8b 00 <48> 89 51 08 48 89 01 41 80 bd d7 00 00 00 00 75 82 48 8b 19 49 8b
    [ 5511.227091] RSP: 0018:ffffc90000003dd0 EFLAGS: 00010246
    [ 5511.233135] RAX: 0000000000000000 RBX: ffff88810c8da600 RCX: 0000000000000000
    [ 5511.241384] RDX: 000000000000003c RSI: 0000000000000001 RDI: ffff888115f555c0
    [ 5511.249634] RBP: ffffc90000003e08 R08: 0000000000000000 R09: ffff889092296b48
    [ 5511.257886] R10: 0000ffffffffffff R11: ffff889092296800 R12: 0000000000000000
    [ 5511.266138] R13: ffff88810c8db500 R14: 0000000000000040 R15: 0000000000000100
    [ 5511.274387] FS:  0000000000000000(0000) GS:ffff88903f800000(0000) knlGS:0000000000000000
    [ 5511.283746] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [ 5511.290389] CR2: 0000000000000008 CR3: 00000001046e2001 CR4: 00000000003706f0
    [ 5511.298640] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [ 5511.306892] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [ 5511.315142] Call Trace:
    [ 5511.317972]  <IRQ>
    [ 5511.320301]  ice_xmit_zc+0x68/0x2f0 [ice]
    [ 5511.324977]  ? ktime_get+0x38/0xa0
    [ 5511.328913]  ice_napi_poll+0x7a/0x6a0 [ice]
    [ 5511.333784]  __napi_poll+0x2c/0x160
    [ 5511.337821]  net_rx_action+0xdd/0x200
    [ 5511.342058]  __do_softirq+0xe6/0x2dd
    [ 5511.346198]  irq_exit_rcu+0xb5/0x100
    [ 5511.350339]  common_interrupt+0xa4/0xc0
    [ 5511.354777]  </IRQ>
    [ 5511.357201]  <TASK>
    [ 5511.359625]  asm_common_interrupt+0x1e/0x40
    [ 5511.364466] RIP: 0010:cpuidle_enter_state+0xd2/0x360
    [ 5511.370211] Code: 49 89 c5 0f 1f 44 00 00 31 ff e8 e9 00 7b ff 45 84 ff 74 12 9c 58 f6 c4 02 0f 85 72 02 00 00 31 ff e8 02 0c 80 ff fb 45 85 f6 <0f> 88 11 01 00 00 49 63 c6 4c 2b 2c 24 48 8d 14 40 48 8d 14 90 49
    [ 5511.391921] RSP: 0018:ffffffff82a03e60 EFLAGS: 00000202
    [ 5511.397962] RAX: ffff88903f800000 RBX: 0000000000000001 RCX: 000000000000001f
    [ 5511.406214] RDX: 0000000000000000 RSI: ffffffff823400b9 RDI: ffffffff8234c046
    [ 5511.424646] RBP: ffff88810a384800 R08: 000005032a28c046 R09: 0000000000000008
    [ 5511.443233] R10: 000000000000000b R11: 0000000000000006 R12: ffffffff82bcf700
    [ 5511.461922] R13: 000005032a28c046 R14: 0000000000000001 R15: 0000000000000000
    [ 5511.480300]  cpuidle_enter+0x29/0x40
    [ 5511.494329]  do_idle+0x1c7/0x250
    [ 5511.507610]  cpu_startup_entry+0x19/0x20
    [ 5511.521394]  start_kernel+0x649/0x66e
    [ 5511.534626]  secondary_startup_64_no_verify+0xc3/0xcb
    [ 5511.549230]  </TASK>
    
    Detect such case during bind() and allocate this memory region via newly
    introduced xp_alloc_tx_descs(). Also, use kvcalloc instead of kcalloc as
    for other buffer pool allocations, so that it matches the kvfree() from
    xp_destroy().
    
    Fixes: d1bc532 ("i40e: xsk: Move tmp desc array from driver to pool")
    Signed-off-by: Maciej Fijalkowski <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Acked-by: Magnus Karlsson <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mfijalko authored and gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    9f0c8a9 View commit details
    Browse the repository at this point in the history
  232. Linux 5.17.15

    Link: https://lore.kernel.org/r/[email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Justin M. Forbes <[email protected]>
    Tested-by: Fox Chen <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Sudip Mukherjee <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    eed6805 View commit details
    Browse the repository at this point in the history
  233. base packaging

    Kernel Builder (gloin) committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2775b2a View commit details
    Browse the repository at this point in the history
  234. 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 (gloin) committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    715e859 View commit details
    Browse the repository at this point in the history
  235. UBUNTU: SAUCE: add vmlinux.strip to BOOT_TARGETS1 on powerpc

    Signed-off-by: Andy Whitcroft <[email protected]>
    Andy Whitcroft authored and Kernel Builder (gloin) committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    cf38963 View commit details
    Browse the repository at this point in the history
  236. 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 (gloin) committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    4df77ef View commit details
    Browse the repository at this point in the history
  237. debian changelog

    Kernel Builder (gloin) committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    e94ed0d View commit details
    Browse the repository at this point in the history
  238. configs (based on refs/remotes/kinetic/master-next)

    Kernel Builder (gloin) committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    1200cf8 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2022

  1. System76 Linux

    jackpot51 committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    06f760e 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 Jun 20, 2022
    Configuration menu
    Copy the full SHA
    5889360 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7c0fe72 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2d8a9ad View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    94ef9c7 View commit details
    Browse the repository at this point in the history
  6. Adds an ALSA mapping for Gigabyte Pro WiFi Rev 2.1

    This patch was written by Takashi Iwai, I am just
    commiting it into the pop-os kernel before this
    is upstreamed
    13r0ck authored and jackpot51 committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    5b57e46 View commit details
    Browse the repository at this point in the history
  7. Mixer-Maps: Add alternate ALC4080

    Asus released motherboard(s) with an alternate ALC4080 that lacks
    a SPDIF jack, and requires applying this map.
    13r0ck authored and jackpot51 committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    980e183 View commit details
    Browse the repository at this point in the history
  8. ALSA: hda/realtek: Add quirk for Clevo PD70PNT

    Fixes speaker output and headset detection on Clevo PD70PNT.
    
    Signed-off-by: Tim Crawford <[email protected]>
    crawfxrd authored and jackpot51 committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    44a5c6f View commit details
    Browse the repository at this point in the history
  9. ALSA: hda/realtek: Add quirk for Clevo NS50PU

    Fixes headset detection on Clevo NS50PU.
    
    Signed-off-by: Tim Crawford <[email protected]>
    crawfxrd authored and jackpot51 committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    1dcb793 View commit details
    Browse the repository at this point in the history
  10. DROP ON REBASE: 5.17.15-76051715.202206141358 based on 5.17.15-051715…

    ….202206141358
    
    Signed-off-by: Jeremy Soller <[email protected]>
    jackpot51 committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    c4355b6 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2022

  1. ALSA: hda/realtek: Add quirk for Clevo L140PU

    Fixes headset detection on Clevo L140PU.
    
    Signed-off-by: Tim Crawford <[email protected]>
    crawfxrd committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    1db9e34 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2022

  1. Configuration menu
    Copy the full SHA
    77080c3 View commit details
    Browse the repository at this point in the history