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

NAS-123179 / 23.10 / Update Linux kernel to v6.1.40 #98

Merged
merged 3,106 commits into from
Jul 25, 2023
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jul 19, 2023

  1. fs: no need to check source

    commit 66d8fc0 upstream.
    
    The @source inode must be valid. It is even checked via IS_SWAPFILE()
    above making it pretty clear. So no need to check it when we unlock.
    
    What doesn't need to exist is the @target inode. The lock_two_inodes()
    helper currently swaps the @Inode1 and @inode2 arguments if @Inode1 is
    NULL to have consistent lock class usage. However, we know that at least
    for vfs_rename() that @Inode1 is @source and thus is never NULL as per
    above. We also know that @source is a different inode than @target as
    that is checked right at the beginning of vfs_rename(). So we know that
    @source is valid and locked and that @target is locked. So drop the
    check whether @source is non-NULL.
    
    Fixes: 28eceed ("fs: Lock moved directories")
    Reported-by: kernel test robot <[email protected]>
    Reported-by: Dan Carpenter <[email protected]>
    Closes: https://lore.kernel.org/r/[email protected]
    Message-Id: <[email protected]>
    [brauner: use commit message from patch I sent concurrently]
    Signed-off-by: Christian Brauner <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jankara authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    6b7c52f View commit details
    Browse the repository at this point in the history
  2. xfs: explicitly specify cpu when forcing inodegc delayed work to run …

    …immediately
    
    commit 03e0add upstream.
    
    I've been noticing odd racing behavior in the inodegc code that could
    only be explained by one cpu adding an inode to its inactivation llist
    at the same time that another cpu is processing that cpu's llist.
    Preemption is disabled between get/put_cpu_ptr, so the only explanation
    is scheduler mayhem.  I inserted the following debug code into
    xfs_inodegc_worker (see the next patch):
    
    	ASSERT(gc->cpu == smp_processor_id());
    
    This assertion tripped during overnight tests on the arm64 machines, but
    curiously not on x86_64.  I think we haven't observed any resource leaks
    here because the lockfree list code can handle simultaneous llist_add
    and llist_del_all functions operating on the same list.  However, the
    whole point of having percpu inodegc lists is to take advantage of warm
    memory caches by inactivating inodes on the last processor to touch the
    inode.
    
    The incorrect scheduling seems to occur after an inodegc worker is
    subjected to mod_delayed_work().  This wraps mod_delayed_work_on with
    WORK_CPU_UNBOUND specified as the cpu number.  Unbound allows for
    scheduling on any cpu, not necessarily the same one that scheduled the
    work.
    
    Because preemption is disabled for as long as we have the gc pointer, I
    think it's safe to use current_cpu() (aka smp_processor_id) to queue the
    delayed work item on the correct cpu.
    
    Fixes: 7cf2b0f ("xfs: bound maximum wait time for inodegc work")
    Signed-off-by: Darrick J. Wong <[email protected]>
    Reviewed-by: Dave Chinner <[email protected]>
    Signed-off-by: Dave Chinner <[email protected]>
    Signed-off-by: Amir Goldstein <[email protected]>
    Acked-by: Darrick J. Wong <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Darrick J. Wong authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    f6e37e2 View commit details
    Browse the repository at this point in the history
  3. xfs: check that per-cpu inodegc workers actually run on that cpu

    commit b37c4c8 upstream.
    
    Now that we've allegedly worked out the problem of the per-cpu inodegc
    workers being scheduled on the wrong cpu, let's put in a debugging knob
    to let us know if a worker ever gets mis-scheduled again.
    
    Signed-off-by: Darrick J. Wong <[email protected]>
    Reviewed-by: Dave Chinner <[email protected]>
    Signed-off-by: Dave Chinner <[email protected]>
    Signed-off-by: Amir Goldstein <[email protected]>
    Acked-by: Darrick J. Wong <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Darrick J. Wong authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    25c1991 View commit details
    Browse the repository at this point in the history
  4. xfs: disable reaping in fscounters scrub

    commit 2d5f38a upstream.
    
    The fscounters scrub code doesn't work properly because it cannot
    quiesce updates to the percpu counters in the filesystem, hence it
    returns false corruption reports.  This has been fixed properly in
    one of the online repair patchsets that are under review by replacing
    the xchk_disable_reaping calls with an exclusive filesystem freeze.
    Disabling background gc isn't sufficient to fix the problem.
    
    In other words, scrub doesn't need to call xfs_inodegc_stop, which is
    just as well since it wasn't correct to allow scrub to call
    xfs_inodegc_start when something else could be calling xfs_inodegc_stop
    (e.g. trying to freeze the filesystem).
    
    Neuter the scrubber for now, and remove the xchk_*_reaping functions.
    
    Signed-off-by: Darrick J. Wong <[email protected]>
    Reviewed-by: Dave Chinner <[email protected]>
    Signed-off-by: Dave Chinner <[email protected]>
    Signed-off-by: Amir Goldstein <[email protected]>
    Acked-by: Darrick J. Wong <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Darrick J. Wong authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    1b20685 View commit details
    Browse the repository at this point in the history
  5. xfs: fix xfs_inodegc_stop racing with mod_delayed_work

    commit 2254a73 upstream.
    
    syzbot reported this warning from the faux inodegc shrinker that tries
    to kick off inodegc work:
    
    ------------[ cut here ]------------
    WARNING: CPU: 1 PID: 102 at kernel/workqueue.c:1445 __queue_work+0xd44/0x1120 kernel/workqueue.c:1444
    RIP: 0010:__queue_work+0xd44/0x1120 kernel/workqueue.c:1444
    Call Trace:
     __queue_delayed_work+0x1c8/0x270 kernel/workqueue.c:1672
     mod_delayed_work_on+0xe1/0x220 kernel/workqueue.c:1746
     xfs_inodegc_shrinker_scan fs/xfs/xfs_icache.c:2212 [inline]
     xfs_inodegc_shrinker_scan+0x250/0x4f0 fs/xfs/xfs_icache.c:2191
     do_shrink_slab+0x428/0xaa0 mm/vmscan.c:853
     shrink_slab+0x175/0x660 mm/vmscan.c:1013
     shrink_one+0x502/0x810 mm/vmscan.c:5343
     shrink_many mm/vmscan.c:5394 [inline]
     lru_gen_shrink_node mm/vmscan.c:5511 [inline]
     shrink_node+0x2064/0x35f0 mm/vmscan.c:6459
     kswapd_shrink_node mm/vmscan.c:7262 [inline]
     balance_pgdat+0xa02/0x1ac0 mm/vmscan.c:7452
     kswapd+0x677/0xd60 mm/vmscan.c:7712
     kthread+0x2e8/0x3a0 kernel/kthread.c:376
     ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
    
    This warning corresponds to this code in __queue_work:
    
    	/*
    	 * For a draining wq, only works from the same workqueue are
    	 * allowed. The __WQ_DESTROYING helps to spot the issue that
    	 * queues a new work item to a wq after destroy_workqueue(wq).
    	 */
    	if (unlikely(wq->flags & (__WQ_DESTROYING | __WQ_DRAINING) &&
    		     WARN_ON_ONCE(!is_chained_work(wq))))
    		return;
    
    For this to trip, we must have a thread draining the inodedgc workqueue
    and a second thread trying to queue inodegc work to that workqueue.
    This can happen if freezing or a ro remount race with reclaim poking our
    faux inodegc shrinker and another thread dropping an unlinked O_RDONLY
    file:
    
    Thread 0	Thread 1	Thread 2
    
    xfs_inodegc_stop
    
    				xfs_inodegc_shrinker_scan
    				xfs_is_inodegc_enabled
    				<yes, will continue>
    
    xfs_clear_inodegc_enabled
    xfs_inodegc_queue_all
    <list empty, do not queue inodegc worker>
    
    		xfs_inodegc_queue
    		<add to list>
    		xfs_is_inodegc_enabled
    		<no, returns>
    
    drain_workqueue
    <set WQ_DRAINING>
    
    				llist_empty
    				<no, will queue list>
    				mod_delayed_work_on(..., 0)
    				__queue_work
    				<sees WQ_DRAINING, kaboom>
    
    In other words, everything between the access to inodegc_enabled state
    and the decision to poke the inodegc workqueue requires some kind of
    coordination to avoid the WQ_DRAINING state.  We could perhaps introduce
    a lock here, but we could also try to eliminate WQ_DRAINING from the
    picture.
    
    We could replace the drain_workqueue call with a loop that flushes the
    workqueue and queues workers as long as there is at least one inode
    present in the per-cpu inodegc llists.  We've disabled inodegc at this
    point, so we know that the number of queued inodes will eventually hit
    zero as long as xfs_inodegc_start cannot reactivate the workers.
    
    There are four callers of xfs_inodegc_start.  Three of them come from the
    VFS with s_umount held: filesystem thawing, failed filesystem freezing,
    and the rw remount transition.  The fourth caller is mounting rw (no
    remount or freezing possible).
    
    There are three callers ofs xfs_inodegc_stop.  One is unmounting (no
    remount or thaw possible).  Two of them come from the VFS with s_umount
    held: fs freezing and ro remount transition.
    
    Hence, it is correct to replace the drain_workqueue call with a loop
    that drains the inodegc llists.
    
    Fixes: 6191cf3 ("xfs: flush inodegc workqueue tasks before cancel")
    Signed-off-by: Darrick J. Wong <[email protected]>
    Reviewed-by: Dave Chinner <[email protected]>
    Signed-off-by: Dave Chinner <[email protected]>
    Signed-off-by: Amir Goldstein <[email protected]>
    Acked-by: Darrick J. Wong <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Darrick J. Wong authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    9222068 View commit details
    Browse the repository at this point in the history
  6. mm/mmap: Fix extra maple tree write

    based on commit 0503ea8 upstream.
    
    This was inadvertently fixed during the removal of __vma_adjust().
    
    When __vma_adjust() is adjusting next with a negative value (pushing
    vma->vm_end lower), there would be two writes to the maple tree.  The
    first write is unnecessary and uses all allocated nodes in the maple
    state.  The second write is necessary but will need to allocate nodes
    since the first write has used the allocated nodes.  This may be a
    problem as it may not be safe to allocate at this time, such as a low
    memory situation.  Fix the issue by avoiding the first write and only
    write the adjusted "next" VMA.
    
    Reported-by: John Hsu <[email protected]>
    Link: https://lore.kernel.org/lkml/[email protected]/
    Cc: [email protected]
    Cc: [email protected]
    Signed-off-by: Liam R. Howlett <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    howlett authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    a02c6dc View commit details
    Browse the repository at this point in the history
  7. drm/i915: Fix TypeC mode initialization during system resume

    commit a82796a upstream.
    
    During system resume DP MST requires AUX to be working already before
    the HW state readout of the given encoder. Since AUX requires the
    encoder/PHY TypeC mode to be initialized, which atm only happens during
    HW state readout, these AUX transfers can change the TypeC mode
    incorrectly (disconnecting the PHY for an enabled encoder) and trigger
    the state check WARNs in intel_tc_port_sanitize().
    
    Fix this by initializing the TypeC mode earlier both during driver
    loading and system resume and making sure that the mode can't change
    until the encoder's state is read out. While at it add the missing
    DocBook comments and rename
    intel_tc_port_sanitize()->intel_tc_port_sanitize_mode() for consistency.
    
    Signed-off-by: Imre Deak <[email protected]>
    Reviewed-by: Mika Kahola <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ideak authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    eaa0043 View commit details
    Browse the repository at this point in the history
  8. drm/i915/tc: Fix TC port link ref init for DP MST during HW readout

    commit 6716572 upstream.
    
    An enabled TC MST port holds one TC port link reference, regardless of
    the number of enabled streams on it, but the TC port HW readout takes
    one reference for each active MST stream.
    
    Fix the HW readout, taking only one reference for MST ports.
    
    This didn't cause an actual problem, since the encoder HW readout doesn't
    yet support reading out the MST HW state.
    
    Signed-off-by: Imre Deak <[email protected]>
    Reviewed-by: Ville Syrjälä <[email protected]>
    Reviewed-by: Mika Kahola <[email protected]>
    Reviewed-by: Andrzej Hajda <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ideak authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    9902511 View commit details
    Browse the repository at this point in the history
  9. drm/i915/tc: Fix system resume MST mode restore for DP-alt sinks

    commit 06f6626 upstream.
    
    At least restoring the MST topology during system resume needs to use
    AUX before the display HW readout->sanitization sequence is complete,
    but on TC ports the PHY may be in the wrong mode for this, resulting in
    the AUX transfers to fail.
    
    The initial TC port mode is kept fixed as BIOS left it for the above HW
    readout sequence (to prevent changing the mode on an enabled port).  If
    the port is disabled this initial mode is TBT - as in any case the PHY
    ownership is not held - even if a DP-alt sink is connected. Thus, the
    AUX transfers during this time will use TBT mode instead of the expected
    DP-alt mode and so time out.
    
    Fix the above by connecting the PHY during port initialization if the
    port is disabled, which will switch to the expected mode (DP-alt in the
    above case).
    
    As the encoder/pipe HW state isn't read-out yet at this point, check if
    the port is enabled based on the DDI_BUF enabled flag. Save the read-out
    initial mode, so intel_tc_port_sanitize_mode() can check this wrt. the
    read-out encoder HW state.
    
    Signed-off-by: Imre Deak <[email protected]>
    Reviewed-by: Ville Syrjälä <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ideak authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    1bdcffa View commit details
    Browse the repository at this point in the history
  10. mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908

    commit 085679b upstream.
    
    Commit dd5c672 ("arm64: bcmbca: Merge ARCH_BCM4908 to ARCH_BCMBCA")
    removes config ARCH_BCM4908 as config ARCH_BCMBCA has the same intent.
    
    Probably due to concurrent development, commit 002181f ("mtd: parsers:
    add Broadcom's U-Boot parser") introduces 'Broadcom's U-Boot partition
    parser' that depends on ARCH_BCM4908, but this use was not visible during
    the config refactoring from the commit above. Hence, these two changes
    create a reference to a non-existing config symbol.
    
    Adjust the MTD_BRCM_U_BOOT definition to refer to ARCH_BCMBCA instead of
    ARCH_BCM4908 to remove the reference to the non-existing config symbol
    ARCH_BCM4908.
    
    Signed-off-by: Lukas Bulwahn <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bulwahn authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    ad2928e View commit details
    Browse the repository at this point in the history
  11. netfilter: nf_tables: unbind non-anonymous set if rule construction f…

    …ails
    
    commit 3e70489 upstream.
    
    Otherwise a dangling reference to a rule object that is gone remains
    in the set binding list.
    
    Fixes: 26b5a57 ("netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ummakynes authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    f145373 View commit details
    Browse the repository at this point in the history
  12. netfilter: conntrack: Avoid nf_ct_helper_hash uses after free

    commit 6eef7a2 upstream.
    
    If nf_conntrack_init_start() fails (for example due to a
    register_nf_conntrack_bpf() failure), the nf_conntrack_helper_fini()
    clean-up path frees the nf_ct_helper_hash map.
    
    When built with NF_CONNTRACK=y, further netfilter modules (e.g:
    netfilter_conntrack_ftp) can still be loaded and call
    nf_conntrack_helpers_register(), independently of whether nf_conntrack
    initialized correctly. This accesses the nf_ct_helper_hash dangling
    pointer and causes a uaf, possibly leading to random memory corruption.
    
    This patch guards nf_conntrack_helper_register() from accessing a freed
    or uninitialized nf_ct_helper_hash pointer and fixes possible
    uses-after-free when loading a conntrack module.
    
    Cc: [email protected]
    Fixes: 12f7a50 ("netfilter: add user-space connection tracking helper infrastructure")
    Signed-off-by: Florent Revest <[email protected]>
    Reviewed-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    FlorentRevest authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    05561f8 View commit details
    Browse the repository at this point in the history
  13. netfilter: nf_tables: do not ignore genmask when looking up chain by id

    commit 515ad53 upstream.
    
    When adding a rule to a chain referring to its ID, if that chain had been
    deleted on the same batch, the rule might end up referring to a deleted
    chain.
    
    This will lead to a WARNING like following:
    
    [   33.098431] ------------[ cut here ]------------
    [   33.098678] WARNING: CPU: 5 PID: 69 at net/netfilter/nf_tables_api.c:2037 nf_tables_chain_destroy+0x23d/0x260
    [   33.099217] Modules linked in:
    [   33.099388] CPU: 5 PID: 69 Comm: kworker/5:1 Not tainted 6.4.0+ #409
    [   33.099726] Workqueue: events nf_tables_trans_destroy_work
    [   33.100018] RIP: 0010:nf_tables_chain_destroy+0x23d/0x260
    [   33.100306] Code: 8b 7c 24 68 e8 64 9c ed fe 4c 89 e7 e8 5c 9c ed fe 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 89 c6 89 c7 c3 cc cc cc cc <0f> 0b 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 89 c6 89 c7
    [   33.101271] RSP: 0018:ffffc900004ffc48 EFLAGS: 00010202
    [   33.101546] RAX: 0000000000000001 RBX: ffff888006fc0a28 RCX: 0000000000000000
    [   33.101920] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
    [   33.102649] RBP: ffffc900004ffc78 R08: 0000000000000000 R09: 0000000000000000
    [   33.103018] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880135ef500
    [   33.103385] R13: 0000000000000000 R14: dead000000000122 R15: ffff888006fc0a10
    [   33.103762] FS:  0000000000000000(0000) GS:ffff888024c80000(0000) knlGS:0000000000000000
    [   33.104184] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   33.104493] CR2: 00007fe863b56a50 CR3: 00000000124b0001 CR4: 0000000000770ee0
    [   33.104872] PKRU: 55555554
    [   33.104999] Call Trace:
    [   33.105113]  <TASK>
    [   33.105214]  ? show_regs+0x72/0x90
    [   33.105371]  ? __warn+0xa5/0x210
    [   33.105520]  ? nf_tables_chain_destroy+0x23d/0x260
    [   33.105732]  ? report_bug+0x1f2/0x200
    [   33.105902]  ? handle_bug+0x46/0x90
    [   33.106546]  ? exc_invalid_op+0x19/0x50
    [   33.106762]  ? asm_exc_invalid_op+0x1b/0x20
    [   33.106995]  ? nf_tables_chain_destroy+0x23d/0x260
    [   33.107249]  ? nf_tables_chain_destroy+0x30/0x260
    [   33.107506]  nf_tables_trans_destroy_work+0x669/0x680
    [   33.107782]  ? mark_held_locks+0x28/0xa0
    [   33.107996]  ? __pfx_nf_tables_trans_destroy_work+0x10/0x10
    [   33.108294]  ? _raw_spin_unlock_irq+0x28/0x70
    [   33.108538]  process_one_work+0x68c/0xb70
    [   33.108755]  ? lock_acquire+0x17f/0x420
    [   33.108977]  ? __pfx_process_one_work+0x10/0x10
    [   33.109218]  ? do_raw_spin_lock+0x128/0x1d0
    [   33.109435]  ? _raw_spin_lock_irq+0x71/0x80
    [   33.109634]  worker_thread+0x2bd/0x700
    [   33.109817]  ? __pfx_worker_thread+0x10/0x10
    [   33.110254]  kthread+0x18b/0x1d0
    [   33.110410]  ? __pfx_kthread+0x10/0x10
    [   33.110581]  ret_from_fork+0x29/0x50
    [   33.110757]  </TASK>
    [   33.110866] irq event stamp: 1651
    [   33.111017] hardirqs last  enabled at (1659): [<ffffffffa206a209>] __up_console_sem+0x79/0xa0
    [   33.111379] hardirqs last disabled at (1666): [<ffffffffa206a1ee>] __up_console_sem+0x5e/0xa0
    [   33.111740] softirqs last  enabled at (1616): [<ffffffffa1f5d40e>] __irq_exit_rcu+0x9e/0xe0
    [   33.112094] softirqs last disabled at (1367): [<ffffffffa1f5d40e>] __irq_exit_rcu+0x9e/0xe0
    [   33.112453] ---[ end trace 0000000000000000 ]---
    
    This is due to the nft_chain_lookup_byid ignoring the genmask. After this
    change, adding the new rule will fail as it will not find the chain.
    
    Fixes: 837830a ("netfilter: nf_tables: add NFTA_RULE_CHAIN_ID attribute")
    Cc: [email protected]
    Reported-by: Mingi Cho of Theori working with ZDI
    Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
    Reviewed-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Thadeu Lima de Souza Cascardo authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    fc95c8b View commit details
    Browse the repository at this point in the history
  14. netfilter: nf_tables: prevent OOB access in nft_byteorder_eval

    commit caf3ef7 upstream.
    
    When evaluating byteorder expressions with size 2, a union with 32-bit and
    16-bit members is used. Since the 16-bit members are aligned to 32-bit,
    the array accesses will be out-of-bounds.
    
    It may lead to a stack-out-of-bounds access like the one below:
    
    [   23.095215] ==================================================================
    [   23.095625] BUG: KASAN: stack-out-of-bounds in nft_byteorder_eval+0x13c/0x320
    [   23.096020] Read of size 2 at addr ffffc90000007948 by task ping/115
    [   23.096358]
    [   23.096456] CPU: 0 PID: 115 Comm: ping Not tainted 6.4.0+ #413
    [   23.096770] Call Trace:
    [   23.096910]  <IRQ>
    [   23.097030]  dump_stack_lvl+0x60/0xc0
    [   23.097218]  print_report+0xcf/0x630
    [   23.097388]  ? nft_byteorder_eval+0x13c/0x320
    [   23.097577]  ? kasan_addr_to_slab+0xd/0xc0
    [   23.097760]  ? nft_byteorder_eval+0x13c/0x320
    [   23.097949]  kasan_report+0xc9/0x110
    [   23.098106]  ? nft_byteorder_eval+0x13c/0x320
    [   23.098298]  __asan_load2+0x83/0xd0
    [   23.098453]  nft_byteorder_eval+0x13c/0x320
    [   23.098659]  nft_do_chain+0x1c8/0xc50
    [   23.098852]  ? __pfx_nft_do_chain+0x10/0x10
    [   23.099078]  ? __kasan_check_read+0x11/0x20
    [   23.099295]  ? __pfx___lock_acquire+0x10/0x10
    [   23.099535]  ? __pfx___lock_acquire+0x10/0x10
    [   23.099745]  ? __kasan_check_read+0x11/0x20
    [   23.099929]  nft_do_chain_ipv4+0xfe/0x140
    [   23.100105]  ? __pfx_nft_do_chain_ipv4+0x10/0x10
    [   23.100327]  ? lock_release+0x204/0x400
    [   23.100515]  ? nf_hook.constprop.0+0x340/0x550
    [   23.100779]  nf_hook_slow+0x6c/0x100
    [   23.100977]  ? __pfx_nft_do_chain_ipv4+0x10/0x10
    [   23.101223]  nf_hook.constprop.0+0x334/0x550
    [   23.101443]  ? __pfx_ip_local_deliver_finish+0x10/0x10
    [   23.101677]  ? __pfx_nf_hook.constprop.0+0x10/0x10
    [   23.101882]  ? __pfx_ip_rcv_finish+0x10/0x10
    [   23.102071]  ? __pfx_ip_local_deliver_finish+0x10/0x10
    [   23.102291]  ? rcu_read_lock_held+0x4b/0x70
    [   23.102481]  ip_local_deliver+0xbb/0x110
    [   23.102665]  ? __pfx_ip_rcv+0x10/0x10
    [   23.102839]  ip_rcv+0x199/0x2a0
    [   23.102980]  ? __pfx_ip_rcv+0x10/0x10
    [   23.103140]  __netif_receive_skb_one_core+0x13e/0x150
    [   23.103362]  ? __pfx___netif_receive_skb_one_core+0x10/0x10
    [   23.103647]  ? mark_held_locks+0x48/0xa0
    [   23.103819]  ? process_backlog+0x36c/0x380
    [   23.103999]  __netif_receive_skb+0x23/0xc0
    [   23.104179]  process_backlog+0x91/0x380
    [   23.104350]  __napi_poll.constprop.0+0x66/0x360
    [   23.104589]  ? net_rx_action+0x1cb/0x610
    [   23.104811]  net_rx_action+0x33e/0x610
    [   23.105024]  ? _raw_spin_unlock+0x23/0x50
    [   23.105257]  ? __pfx_net_rx_action+0x10/0x10
    [   23.105485]  ? mark_held_locks+0x48/0xa0
    [   23.105741]  __do_softirq+0xfa/0x5ab
    [   23.105956]  ? __dev_queue_xmit+0x765/0x1c00
    [   23.106193]  do_softirq.part.0+0x49/0xc0
    [   23.106423]  </IRQ>
    [   23.106547]  <TASK>
    [   23.106670]  __local_bh_enable_ip+0xf5/0x120
    [   23.106903]  __dev_queue_xmit+0x789/0x1c00
    [   23.107131]  ? __pfx___dev_queue_xmit+0x10/0x10
    [   23.107381]  ? find_held_lock+0x8e/0xb0
    [   23.107585]  ? lock_release+0x204/0x400
    [   23.107798]  ? neigh_resolve_output+0x185/0x350
    [   23.108049]  ? mark_held_locks+0x48/0xa0
    [   23.108265]  ? neigh_resolve_output+0x185/0x350
    [   23.108514]  neigh_resolve_output+0x246/0x350
    [   23.108753]  ? neigh_resolve_output+0x246/0x350
    [   23.109003]  ip_finish_output2+0x3c3/0x10b0
    [   23.109250]  ? __pfx_ip_finish_output2+0x10/0x10
    [   23.109510]  ? __pfx_nf_hook+0x10/0x10
    [   23.109732]  __ip_finish_output+0x217/0x390
    [   23.109978]  ip_finish_output+0x2f/0x130
    [   23.110207]  ip_output+0xc9/0x170
    [   23.110404]  ip_push_pending_frames+0x1a0/0x240
    [   23.110652]  raw_sendmsg+0x102e/0x19e0
    [   23.110871]  ? __pfx_raw_sendmsg+0x10/0x10
    [   23.111093]  ? lock_release+0x204/0x400
    [   23.111304]  ? __mod_lruvec_page_state+0x148/0x330
    [   23.111567]  ? find_held_lock+0x8e/0xb0
    [   23.111777]  ? find_held_lock+0x8e/0xb0
    [   23.111993]  ? __rcu_read_unlock+0x7c/0x2f0
    [   23.112225]  ? aa_sk_perm+0x18a/0x550
    [   23.112431]  ? filemap_map_pages+0x4f1/0x900
    [   23.112665]  ? __pfx_aa_sk_perm+0x10/0x10
    [   23.112880]  ? find_held_lock+0x8e/0xb0
    [   23.113098]  inet_sendmsg+0xa0/0xb0
    [   23.113297]  ? inet_sendmsg+0xa0/0xb0
    [   23.113500]  ? __pfx_inet_sendmsg+0x10/0x10
    [   23.113727]  sock_sendmsg+0xf4/0x100
    [   23.113924]  ? move_addr_to_kernel.part.0+0x4f/0xa0
    [   23.114190]  __sys_sendto+0x1d4/0x290
    [   23.114391]  ? __pfx___sys_sendto+0x10/0x10
    [   23.114621]  ? __pfx_mark_lock.part.0+0x10/0x10
    [   23.114869]  ? lock_release+0x204/0x400
    [   23.115076]  ? find_held_lock+0x8e/0xb0
    [   23.115287]  ? rcu_is_watching+0x23/0x60
    [   23.115503]  ? __rseq_handle_notify_resume+0x6e2/0x860
    [   23.115778]  ? __kasan_check_write+0x14/0x30
    [   23.116008]  ? blkcg_maybe_throttle_current+0x8d/0x770
    [   23.116285]  ? mark_held_locks+0x28/0xa0
    [   23.116503]  ? do_syscall_64+0x37/0x90
    [   23.116713]  __x64_sys_sendto+0x7f/0xb0
    [   23.116924]  do_syscall_64+0x59/0x90
    [   23.117123]  ? irqentry_exit_to_user_mode+0x25/0x30
    [   23.117387]  ? irqentry_exit+0x77/0xb0
    [   23.117593]  ? exc_page_fault+0x92/0x140
    [   23.117806]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    [   23.118081] RIP: 0033:0x7f744aee2bba
    [   23.118282] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 7e c3 0f 1f 44 00 00 41 54 48 83 ec 30 44 89
    [   23.119237] RSP: 002b:00007ffd04a7c9f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
    [   23.119644] RAX: ffffffffffffffda RBX: 00007ffd04a7e0a0 RCX: 00007f744aee2bba
    [   23.120023] RDX: 0000000000000040 RSI: 000056488e9e6300 RDI: 0000000000000003
    [   23.120413] RBP: 000056488e9e6300 R08: 00007ffd04a80320 R09: 0000000000000010
    [   23.120809] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040
    [   23.121219] R13: 00007ffd04a7dc38 R14: 00007ffd04a7ca00 R15: 00007ffd04a7e0a0
    [   23.121617]  </TASK>
    [   23.121749]
    [   23.121845] The buggy address belongs to the virtual mapping at
    [   23.121845]  [ffffc90000000000, ffffc90000009000) created by:
    [   23.121845]  irq_init_percpu_irqstack+0x1cf/0x270
    [   23.122707]
    [   23.122803] The buggy address belongs to the physical page:
    [   23.123104] page:0000000072ac19f0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x24a09
    [   23.123609] flags: 0xfffffc0001000(reserved|node=0|zone=1|lastcpupid=0x1fffff)
    [   23.123998] page_type: 0xffffffff()
    [   23.124194] raw: 000fffffc0001000 ffffea0000928248 ffffea0000928248 0000000000000000
    [   23.124610] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
    [   23.125023] page dumped because: kasan: bad access detected
    [   23.125326]
    [   23.125421] Memory state around the buggy address:
    [   23.125682]  ffffc90000007800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [   23.126072]  ffffc90000007880: 00 00 00 00 00 f1 f1 f1 f1 f1 f1 00 00 f2 f2 00
    [   23.126455] >ffffc90000007900: 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 00 00 00
    [   23.126840]                                               ^
    [   23.127138]  ffffc90000007980: 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 f3
    [   23.127522]  ffffc90000007a00: f3 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
    [   23.127906] ==================================================================
    [   23.128324] Disabling lock debugging due to kernel taint
    
    Using simple s16 pointers for the 16-bit accesses fixes the problem. For
    the 32-bit accesses, src and dst can be used directly.
    
    Fixes: 9651851 ("netfilter: add nftables")
    Cc: [email protected]
    Reported-by: Tanguy DUBROCA (@SidewayRE) from @synacktiv working with ZDI
    Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
    Reviewed-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Thadeu Lima de Souza Cascardo authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    40f83dd View commit details
    Browse the repository at this point in the history
  15. wireguard: queueing: use saner cpu selection wrapping

    commit 7387943 upstream.
    
    Using `% nr_cpumask_bits` is slow and complicated, and not totally
    robust toward dynamic changes to CPU topologies. Rather than storing the
    next CPU in the round-robin, just store the last one, and also return
    that value. This simplifies the loop drastically into a much more common
    pattern.
    
    Fixes: e7096c1 ("net: WireGuard secure network tunnel")
    Cc: [email protected]
    Reported-by: Linus Torvalds <[email protected]>
    Tested-by: Manuel Leiner <[email protected]>
    Signed-off-by: Jason A. Donenfeld <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    zx2c4 authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    561aaad View commit details
    Browse the repository at this point in the history
  16. wireguard: netlink: send staged packets when setting initial private key

    commit f58d0a9 upstream.
    
    Packets bound for peers can queue up prior to the device private key
    being set. For example, if persistent keepalive is set, a packet is
    queued up to be sent as soon as the device comes up. However, if the
    private key hasn't been set yet, the handshake message never sends, and
    no timer is armed to retry, since that would be pointless.
    
    But, if a user later sets a private key, the expectation is that those
    queued packets, such as a persistent keepalive, are actually sent. So
    adjust the configuration logic to account for this edge case, and add a
    test case to make sure this works.
    
    Maxim noticed this with a wg-quick(8) config to the tune of:
    
        [Interface]
        PostUp = wg set %i private-key somefile
    
        [Peer]
        PublicKey = ...
        Endpoint = ...
        PersistentKeepalive = 25
    
    Here, the private key gets set after the device comes up using a PostUp
    script, triggering the bug.
    
    Fixes: e7096c1 ("net: WireGuard secure network tunnel")
    Cc: [email protected]
    Reported-by: Maxim Cournoyer <[email protected]>
    Tested-by: Maxim Cournoyer <[email protected]>
    Link: https://lore.kernel.org/wireguard/[email protected]/
    Signed-off-by: Jason A. Donenfeld <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    zx2c4 authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    3173bfd View commit details
    Browse the repository at this point in the history
  17. tty: serial: fsl_lpuart: add earlycon for imx8ulp platform

    commit e0edfdc upstream.
    
    Add earlycon support for imx8ulp platform.
    
    Signed-off-by: Sherry Sun <[email protected]>
    Cc: stable <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Sherry Sun authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    da012a0 View commit details
    Browse the repository at this point in the history
  18. block/partition: fix signedness issue for Amiga partitions

    commit 7eb1e47 upstream.
    
    Making 'blk' sector_t (i.e. 64 bit if LBD support is active) fails the
    'blk>0' test in the partition block loop if a value of (signed int) -1 is
    used to mark the end of the partition block list.
    
    Explicitly cast 'blk' to signed int to allow use of -1 to terminate the
    partition block linked list.
    
    Fixes: b6f3f28 ("block: add overflow checks for Amiga partition support")
    Reported-by: Christian Zigotzky <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Michael Schmitz <[email protected]>
    Reviewed-by: Martin Steigerwald <[email protected]>
    Tested-by: Christian Zigotzky <[email protected]>
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Michael Schmitz authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    899cc8f View commit details
    Browse the repository at this point in the history
  19. sh: mach-r2d: Handle virq offset in cascaded IRL demux

    commit ab8aa4f upstream.
    
    When booting rts7751r2dplus_defconfig on QEMU, the system hangs due to
    an interrupt storm on IRQ 20.  IRQ 20 aka event 0x280 is a cascaded IRL
    interrupt, which maps to IRQ_VOYAGER, the interrupt used by the Silicon
    Motion SM501 multimedia companion chip.  As rts7751r2d_irq_demux() does
    not take into account the new virq offset, the interrupt is no longer
    translated, leading to an unhandled interrupt.
    
    Fix this by taking into account the virq offset when translating
    cascaded IRL interrupts.
    
    Fixes: a8ac296 ("sh: Avoid using IRQ0 on SH3 and SH4")
    Reported-by: Guenter Roeck <[email protected]>
    Closes: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: John Paul Adrian Glaubitz <[email protected]>
    Tested-by: John Paul Adrian Glaubitz <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Link: https://lore.kernel.org/r/2c99d5df41c40691f6c407b7b6a040d406bc81ac.1688901306.git.geert+renesas@glider.be
    Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    geertu authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    fe7daa3 View commit details
    Browse the repository at this point in the history
  20. sh: mach-highlander: Handle virq offset in cascaded IRL demux

    commit a2601b8 upstream.
    
    Take into account the virq offset when translating cascaded IRL
    interrupts.
    
    Fixes: a8ac296 ("sh: Avoid using IRQ0 on SH3 and SH4")
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: John Paul Adrian Glaubitz <[email protected]>
    Link: https://lore.kernel.org/r/4fcb0d08a2b372431c41e04312742dc9e41e1be4.1688908186.git.geert+renesas@glider.be
    Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    geertu authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    5628b9a View commit details
    Browse the repository at this point in the history
  21. sh: mach-dreamcast: Handle virq offset in cascaded IRQ demux

    commit 3d20f7a upstream.
    
    Take into account the virq offset when translating cascaded interrupts.
    
    Fixes: a8ac296 ("sh: Avoid using IRQ0 on SH3 and SH4")
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: John Paul Adrian Glaubitz <[email protected]>
    Link: https://lore.kernel.org/r/7d0cb246c9f1cd24bb1f637ec5cb67e799a4c3b8.1688908227.git.geert+renesas@glider.be
    Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    geertu authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    0ff5d21 View commit details
    Browse the repository at this point in the history
  22. sh: hd64461: Handle virq offset for offchip IRQ base and HD64461 IRQ

    commit 7c28a35 upstream.
    
    A recent change to start counting SuperH IRQ #s from 16 breaks support
    for the Hitachi HD64461 companion chip.
    
    Move the offchip IRQ base and HD64461 IRQ # by 16 in order to
    accommodate for the new virq numbering rules.
    
    Fixes: a8ac296 ("sh: Avoid using IRQ0 on SH3 and SH4")
    Signed-off-by: Artur Rojek <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: John Paul Adrian Glaubitz <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    zear authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    c55b552 View commit details
    Browse the repository at this point in the history
  23. io_uring: Use io_schedule* in cqring wait

    Commit 8a79656 upstream.
    
    I observed poor performance of io_uring compared to synchronous IO. That
    turns out to be caused by deeper CPU idle states entered with io_uring,
    due to io_uring using plain schedule(), whereas synchronous IO uses
    io_schedule().
    
    The losses due to this are substantial. On my cascade lake workstation,
    t/io_uring from the fio repository e.g. yields regressions between 20%
    and 40% with the following command:
    ./t/io_uring -r 5 -X0 -d 1 -s 1 -c 1 -p 0 -S$use_sync -R 0 /mnt/t2/fio/write.0.0
    
    This is repeatable with different filesystems, using raw block devices
    and using different block devices.
    
    Use io_schedule_prepare() / io_schedule_finish() in
    io_cqring_wait_schedule() to address the difference.
    
    After that using io_uring is on par or surpassing synchronous IO (using
    registered files etc makes it reliably win, but arguably is a less fair
    comparison).
    
    There are other calls to schedule() in io_uring/, but none immediately
    jump out to be similarly situated, so I did not touch them. Similarly,
    it's possible that mutex_lock_io() should be used, but it's not clear if
    there are cases where that matters.
    
    Cc: [email protected] # 5.10+
    Cc: Pavel Begunkov <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Signed-off-by: Andres Freund <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    [axboe: minor style fixup]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    anarazel authored and gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    f32dfc8 View commit details
    Browse the repository at this point in the history
  24. Linux 6.1.39

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Conor Dooley <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Bagas Sanjaya <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Chris Paterson (CIP) <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Tested-by: Joel Fernandes (Google) <[email protected]>
    Tested-by: Allen Pais <[email protected]>
    Tested-by: SeongJae Park <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    a456e17 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2023

  1. HID: amd_sfh: Rename the float32 variable

    commit c1685a8 upstream.
    
    As float32 is also used in other places as a data type, it is necessary
    to rename the float32 variable in order to avoid confusion.
    
    Cc: [email protected]
    Tested-by: Kai-Heng Feng <[email protected]>
    Signed-off-by: Basavaraj Natikar <[email protected]>
    Signed-off-by: Akshata MukundShetty <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Basavaraj Natikar authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d0b30d8 View commit details
    Browse the repository at this point in the history
  2. HID: amd_sfh: Fix for shift-out-of-bounds

    commit 8785436 upstream.
    
    Shift operation of 'exp' and 'shift' variables exceeds the maximum number
    of shift values in the u32 range leading to UBSAN shift-out-of-bounds.
    
    ...
    [    6.120512] UBSAN: shift-out-of-bounds in drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_desc.c:149:50
    [    6.120598] shift exponent 104 is too large for 64-bit type 'long unsigned int'
    [    6.120659] CPU: 4 PID: 96 Comm: kworker/4:1 Not tainted 6.4.0amd_1-next-20230519-dirty #10
    [    6.120665] Hardware name: AMD Birman-PHX/Birman-PHX, BIOS SFH_with_HPD_SEN.FD 04/05/2023
    [    6.120667] Workqueue: events amd_sfh_work_buffer [amd_sfh]
    [    6.120687] Call Trace:
    [    6.120690]  <TASK>
    [    6.120694]  dump_stack_lvl+0x48/0x70
    [    6.120704]  dump_stack+0x10/0x20
    [    6.120707]  ubsan_epilogue+0x9/0x40
    [    6.120716]  __ubsan_handle_shift_out_of_bounds+0x10f/0x170
    [    6.120720]  ? psi_group_change+0x25f/0x4b0
    [    6.120729]  float_to_int.cold+0x18/0xba [amd_sfh]
    [    6.120739]  get_input_rep+0x57/0x340 [amd_sfh]
    [    6.120748]  ? __schedule+0xba7/0x1b60
    [    6.120756]  ? __pfx_get_input_rep+0x10/0x10 [amd_sfh]
    [    6.120764]  amd_sfh_work_buffer+0x91/0x180 [amd_sfh]
    [    6.120772]  process_one_work+0x229/0x430
    [    6.120780]  worker_thread+0x4a/0x3c0
    [    6.120784]  ? __pfx_worker_thread+0x10/0x10
    [    6.120788]  kthread+0xf7/0x130
    [    6.120792]  ? __pfx_kthread+0x10/0x10
    [    6.120795]  ret_from_fork+0x29/0x50
    [    6.120804]  </TASK>
    ...
    
    Fix this by adding the condition to validate shift ranges.
    
    Fixes: 93ce5e0 ("HID: amd_sfh: Implement SFH1.1 functionality")
    Cc: [email protected]
    Tested-by: Kai-Heng Feng <[email protected]>
    Signed-off-by: Basavaraj Natikar <[email protected]>
    Signed-off-by: Akshata MukundShetty <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Basavaraj Natikar authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    5a45ed1 View commit details
    Browse the repository at this point in the history
  3. net: lan743x: Don't sleep in atomic context

    commit 7a8227b upstream.
    
    dev_set_rx_mode() grabs a spin_lock, and the lan743x implementation
    proceeds subsequently to go to sleep using readx_poll_timeout().
    
    Introduce a helper wrapping the readx_poll_timeout_atomic() function
    and use it to replace the calls to readx_polL_timeout().
    
    Fixes: 23f0703 ("lan743x: Add main source files for new lan743x driver")
    Cc: [email protected]
    Cc: Bryan Whitehead <[email protected]>
    Cc: [email protected]
    Signed-off-by: Moritz Fischer <[email protected]>
    Reviewed-by: Andrew Lunn <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mfischer authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    4b5ab64 View commit details
    Browse the repository at this point in the history
  4. workqueue: clean up WORK_* constant types, clarify masking

    commit afa4bb7 upstream.
    
    Dave Airlie reports that gcc-13.1.1 has started complaining about some
    of the workqueue code in 32-bit arm builds:
    
      kernel/workqueue.c: In function ‘get_work_pwq’:
      kernel/workqueue.c:713:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
        713 |                 return (void *)(data & WORK_STRUCT_WQ_DATA_MASK);
            |                        ^
      [ ... a couple of other cases ... ]
    
    and while it's not immediately clear exactly why gcc started complaining
    about it now, I suspect it's some C23-induced enum type handlign fixup in
    gcc-13 is the cause.
    
    Whatever the reason for starting to complain, the code and data types
    are indeed disgusting enough that the complaint is warranted.
    
    The wq code ends up creating various "helper constants" (like that
    WORK_STRUCT_WQ_DATA_MASK) using an enum type, which is all kinds of
    confused.  The mask needs to be 'unsigned long', not some unspecified
    enum type.
    
    To make matters worse, the actual "mask and cast to a pointer" is
    repeated a couple of times, and the cast isn't even always done to the
    right pointer, but - as the error case above - to a 'void *' with then
    the compiler finishing the job.
    
    That's now how we roll in the kernel.
    
    So create the masks using the proper types rather than some ambiguous
    enumeration, and use a nice helper that actually does the type
    conversion in one well-defined place.
    
    Incidentally, this magically makes clang generate better code.  That,
    admittedly, is really just a sign of clang having been seriously
    confused before, and cleaning up the typing unconfuses the compiler too.
    
    Reported-by: Dave Airlie <[email protected]>
    Link: https://lore.kernel.org/lkml/CAPM=9twNnV4zMCvrPkw3H-ajZOH-01JVh_kDrxdPYQErz8ZTdA@mail.gmail.com/
    Cc: Arnd Bergmann <[email protected]>
    Cc: Tejun Heo <[email protected]>
    Cc: Nick Desaulniers <[email protected]>
    Cc: Nathan Chancellor <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    torvalds authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2d57a15 View commit details
    Browse the repository at this point in the history
  5. ksmbd: add missing compound request handing in some commands

    commit 7b7d709 upstream.
    
    This patch add the compound request handling to the some commands.
    Existing clients do not send these commands as compound requests,
    but ksmbd should consider that they may come.
    
    Cc: [email protected]
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    namjaejeon authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    869ef4f View commit details
    Browse the repository at this point in the history
  6. ksmbd: fix out of bounds read in smb2_sess_setup

    commit 98422bd upstream.
    
    ksmbd does not consider the case of that smb2 session setup is
    in compound request. If this is the second payload of the compound,
    OOB read issue occurs while processing the first payload in
    the smb2_sess_setup().
    
    Cc: [email protected]
    Reported-by: [email protected] # ZDI-CAN-21355
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    namjaejeon authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ef572ff View commit details
    Browse the repository at this point in the history
  7. drm/panel: simple: Add connector_type for innolux_at043tn24

    [ Upstream commit 2c56a75 ]
    
    The innolux at043tn24 display is a parallel LCD. Pass the 'connector_type'
    information to avoid the following warning:
    
    panel-simple panel: Specify missing connector_type
    
    Signed-off-by: Fabio Estevam <[email protected]>
    Fixes: 41bcceb ("drm/panel: simple: Add support for Innolux AT043TN24")
    Reviewed-by: Sam Ravnborg <[email protected]>
    Signed-off-by: Neil Armstrong <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Fabio Estevam authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d48029c View commit details
    Browse the repository at this point in the history
  8. drm/bridge: ti-sn65dsi86: Fix auxiliary bus lifetime

    [ Upstream commit 7aa83fb ]
    
    Memory for the "struct device" for any given device isn't supposed to
    be released until the device's release() is called. This is important
    because someone might be holding a kobject reference to the "struct
    device" and might try to access one of its members even after any
    other cleanup/uninitialization has happened.
    
    Code analysis of ti-sn65dsi86 shows that this isn't quite right. When
    the code was written, it was believed that we could rely on the fact
    that the child devices would all be freed before the parent devices
    and thus we didn't need to worry about a release() function. While I
    still believe that the parent's "struct device" is guaranteed to
    outlive the child's "struct device" (because the child holds a kobject
    reference to the parent), the parent's "devm" allocated memory is a
    different story. That appears to be freed much earlier.
    
    Let's make this better for ti-sn65dsi86 by allocating each auxiliary
    with kzalloc and then free that memory in the release().
    
    Fixes: bf73537 ("drm/bridge: ti-sn65dsi86: Break GPIO and MIPI-to-eDP bridge into sub-drivers")
    Suggested-by: Stephen Boyd <[email protected]>
    Reviewed-by: Stephen Boyd <[email protected]>
    Signed-off-by: Douglas Anderson <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230613065812.v2.1.I24b838a5b4151fb32bccd6f36397998ea2df9fbb@changeid
    Signed-off-by: Sasha Levin <[email protected]>
    dianders authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    02d43b8 View commit details
    Browse the repository at this point in the history
  9. swiotlb: always set the number of areas before allocating the pool

    [ Upstream commit aabd126 ]
    
    The number of areas defaults to the number of possible CPUs. However, the
    total number of slots may have to be increased after adjusting the number
    of areas. Consequently, the number of areas must be determined before
    allocating the memory pool. This is even explained with a comment in
    swiotlb_init_remap(), but swiotlb_init_late() adjusts the number of areas
    after slots are already allocated. The areas may end up being smaller than
    IO_TLB_SEGSIZE, which breaks per-area locking.
    
    While fixing swiotlb_init_late(), move all relevant comments before the
    definition of swiotlb_adjust_nareas() and convert them to kernel-doc.
    
    Fixes: 20347fc ("swiotlb: split up the global swiotlb lock")
    Signed-off-by: Petr Tesarik <[email protected]>
    Reviewed-by: Roberto Sassu <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Petr Tesarik authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    24b2486 View commit details
    Browse the repository at this point in the history
  10. swiotlb: reduce the swiotlb buffer size on allocation failure

    [ Upstream commit 8d58aa4 ]
    
    At the moment the AMD encrypted platform reserves 6% of RAM for SWIOTLB
    or 1GB, whichever is less. However it is possible that there is no block
    big enough in the low memory which make SWIOTLB allocation fail and
    the kernel continues without DMA. In such case a VM hangs on DMA.
    
    This moves alloc+remap to a helper and calls it from a loop where
    the size is halved on each iteration.
    
    This updates default_nslabs on successful allocation which looks like
    an oversight as not doing so should have broken callers of
    swiotlb_size_or_default().
    
    Signed-off-by: Alexey Kardashevskiy <[email protected]>
    Reviewed-by: Pankaj Gupta <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Stable-dep-of: 8ac0406 ("swiotlb: reduce the number of areas to match actual memory pool size")
    Signed-off-by: Sasha Levin <[email protected]>
    aik authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    fc3db7f View commit details
    Browse the repository at this point in the history
  11. swiotlb: reduce the number of areas to match actual memory pool size

    [ Upstream commit 8ac0406 ]
    
    Although the desired size of the SWIOTLB memory pool is increased in
    swiotlb_adjust_nareas() to match the number of areas, the actual allocation
    may be smaller, which may require reducing the number of areas.
    
    For example, Xen uses swiotlb_init_late(), which in turn uses the page
    allocator. On x86, page size is 4 KiB and MAX_ORDER is 10 (1024 pages),
    resulting in a maximum memory pool size of 4 MiB. This corresponds to 2048
    slots of 2 KiB each. The minimum area size is 128 (IO_TLB_SEGSIZE),
    allowing at most 2048 / 128 = 16 areas.
    
    If num_possible_cpus() is greater than the maximum number of areas, areas
    are smaller than IO_TLB_SEGSIZE and contiguous groups of free slots will
    span multiple areas. When allocating and freeing slots, only one area will
    be properly locked, causing race conditions on the unlocked slots and
    ultimately data corruption, kernel hangs and crashes.
    
    Fixes: 20347fc ("swiotlb: split up the global swiotlb lock")
    Signed-off-by: Petr Tesarik <[email protected]>
    Reviewed-by: Roberto Sassu <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Petr Tesarik authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    fd5b64c View commit details
    Browse the repository at this point in the history
  12. drm/panel: simple: Add Powertip PH800480T013 drm_display_mode flags

    [ Upstream commit 1c51998 ]
    
    Add missing drm_display_mode DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC
    flags. Those are used by various bridges in the pipeline to correctly
    configure its sync signals polarity.
    
    Fixes: d69de69 ("drm/panel: simple: Add Powertip PH800480T013 panel")
    Signed-off-by: Marek Vasut <[email protected]>
    Reviewed-by: Sam Ravnborg <[email protected]>
    Signed-off-by: Neil Armstrong <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Marek Vasut authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1294311 View commit details
    Browse the repository at this point in the history
  13. ice: Fix max_rate check while configuring TX rate limits

    [ Upstream commit 5f16da6 ]
    
    Remove incorrect check in ice_validate_mqprio_opt() that limits
    filter configuration when sum of max_rates of all TCs exceeds
    the link speed. The max rate of each TC is unrelated to value
    used by other TCs and is valid as long as it is less than link
    speed.
    
    Fixes: fbc7b27 ("ice: enable ndo_setup_tc support for mqprio_qdisc")
    Signed-off-by: Sridhar Samudrala <[email protected]>
    Signed-off-by: Sudheer Mogilappagari <[email protected]>
    Tested-by: Bharathi Sreenivas <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ssamudrala authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    dfaed76 View commit details
    Browse the repository at this point in the history
  14. igc: Remove delay during TX ring configuration

    [ Upstream commit cca28ce ]
    
    Remove unnecessary delay during the TX ring configuration.
    This will cause delay, especially during link down and
    link up activity.
    
    Furthermore, old SKUs like as I225 will call the reset_adapter
    to reset the controller during TSN mode Gate Control List (GCL)
    setting. This will add more time to the configuration of the
    real-time use case.
    
    It doesn't mentioned about this delay in the Software User Manual.
    It might have been ported from legacy code I210 in the past.
    
    Fixes: 13b5b7f ("igc: Add support for Tx/Rx rings")
    Signed-off-by: Muhammad Husaini Zulkifli <[email protected]>
    Acked-by: Sasha Neftin <[email protected]>
    Tested-by: Naama Meir <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zulkifl3 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    68b654e View commit details
    Browse the repository at this point in the history
  15. net/mlx5e: fix double free in mlx5e_destroy_flow_table

    [ Upstream commit 884abe4 ]
    
    In function accel_fs_tcp_create_groups(), when the ft->g memory is
    successfully allocated but the 'in' memory fails to be allocated, the
    memory pointed to by ft->g is released once. And in function
    accel_fs_tcp_create_table, mlx5e_destroy_flow_table is called to release
    the memory pointed to by ft->g again. This will cause double free problem.
    
    Fixes: c062d52 ("net/mlx5e: Receive flow steering framework for accelerated TCP flows")
    Signed-off-by: Zhengchao Shao <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zhengchaoshao authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    7ca1914 View commit details
    Browse the repository at this point in the history
  16. net/mlx5e: fix memory leak in mlx5e_fs_tt_redirect_any_create

    [ Upstream commit 3250aff ]
    
    The memory pointed to by the fs->any pointer is not freed in the error
    path of mlx5e_fs_tt_redirect_any_create, which can lead to a memory leak.
    Fix by freeing the memory in the error path, thereby making the error path
    identical to mlx5e_fs_tt_redirect_any_destroy().
    
    Fixes: 0f575c2 ("net/mlx5e: Introduce Flow Steering ANY API")
    Signed-off-by: Zhengchao Shao <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Reviewed-by: Rahul Rameshbabu <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zhengchaoshao authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    75df2fe View commit details
    Browse the repository at this point in the history
  17. net/mlx5e: fix memory leak in mlx5e_ptp_open

    [ Upstream commit d543b64 ]
    
    When kvzalloc_node or kvzalloc failed in mlx5e_ptp_open, the memory
    pointed by "c" or "cparams" is not freed, which can lead to a memory
    leak. Fix by freeing the array in the error path.
    
    Fixes: 145e563 ("net/mlx5e: Add TX PTP port object support")
    Signed-off-by: Zhengchao Shao <[email protected]>
    Reviewed-by: Rahul Rameshbabu <[email protected]>
    Reviewed-by: Gal Pressman <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zhengchaoshao authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    83a8f73 View commit details
    Browse the repository at this point in the history
  18. net/mlx5e: Check for NOT_READY flag state after locking

    [ Upstream commit 65e6464 ]
    
    Currently the check for NOT_READY flag is performed before obtaining the
    necessary lock. This opens a possibility for race condition when the flow
    is concurrently removed from unready_flows list by the workqueue task,
    which causes a double-removal from the list and a crash[0]. Fix the issue
    by moving the flag check inside the section protected by
    uplink_priv->unready_flows_lock mutex.
    
    [0]:
    [44376.389654] general protection fault, probably for non-canonical address 0xdead000000000108: 0000 [#1] SMP
    [44376.391665] CPU: 7 PID: 59123 Comm: tc Not tainted 6.4.0-rc4+ #1
    [44376.392984] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
    [44376.395342] RIP: 0010:mlx5e_tc_del_fdb_flow+0xb3/0x340 [mlx5_core]
    [44376.396857] Code: 00 48 8b b8 68 ce 02 00 e8 8a 4d 02 00 4c 8d a8 a8 01 00 00 4c 89 ef e8 8b 79 88 e1 48 8b 83 98 06 00 00 48 8b 93 90 06 00 00 <48> 89 42 08 48 89 10 48 b8 00 01 00 00 00 00 ad de 48 89 83 90 06
    [44376.399167] RSP: 0018:ffff88812cc97570 EFLAGS: 00010246
    [44376.399680] RAX: dead000000000122 RBX: ffff8881088e3800 RCX: ffff8881881bac00
    [44376.400337] RDX: dead000000000100 RSI: ffff88812cc97500 RDI: ffff8881242f71b0
    [44376.401001] RBP: ffff88811cbb0940 R08: 0000000000000400 R09: 0000000000000001
    [44376.401663] R10: 0000000000000001 R11: 0000000000000000 R12: ffff88812c944000
    [44376.402342] R13: ffff8881242f71a8 R14: ffff8881222b4000 R15: 0000000000000000
    [44376.402999] FS:  00007f0451104800(0000) GS:ffff88852cb80000(0000) knlGS:0000000000000000
    [44376.403787] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [44376.404343] CR2: 0000000000489108 CR3: 0000000123a79003 CR4: 0000000000370ea0
    [44376.405004] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [44376.405665] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [44376.406339] Call Trace:
    [44376.406651]  <TASK>
    [44376.406939]  ? die_addr+0x33/0x90
    [44376.407311]  ? exc_general_protection+0x192/0x390
    [44376.407795]  ? asm_exc_general_protection+0x22/0x30
    [44376.408292]  ? mlx5e_tc_del_fdb_flow+0xb3/0x340 [mlx5_core]
    [44376.408876]  __mlx5e_tc_del_fdb_peer_flow+0xbc/0xe0 [mlx5_core]
    [44376.409482]  mlx5e_tc_del_flow+0x42/0x210 [mlx5_core]
    [44376.410055]  mlx5e_flow_put+0x25/0x50 [mlx5_core]
    [44376.410529]  mlx5e_delete_flower+0x24b/0x350 [mlx5_core]
    [44376.411043]  tc_setup_cb_reoffload+0x22/0x80
    [44376.411462]  fl_reoffload+0x261/0x2f0 [cls_flower]
    [44376.411907]  ? mlx5e_rep_indr_setup_ft_cb+0x160/0x160 [mlx5_core]
    [44376.412481]  ? mlx5e_rep_indr_setup_ft_cb+0x160/0x160 [mlx5_core]
    [44376.413044]  tcf_block_playback_offloads+0x76/0x170
    [44376.413497]  tcf_block_unbind+0x7b/0xd0
    [44376.413881]  tcf_block_setup+0x17d/0x1c0
    [44376.414269]  tcf_block_offload_cmd.isra.0+0xf1/0x130
    [44376.414725]  tcf_block_offload_unbind+0x43/0x70
    [44376.415153]  __tcf_block_put+0x82/0x150
    [44376.415532]  ingress_destroy+0x22/0x30 [sch_ingress]
    [44376.415986]  qdisc_destroy+0x3b/0xd0
    [44376.416343]  qdisc_graft+0x4d0/0x620
    [44376.416706]  tc_get_qdisc+0x1c9/0x3b0
    [44376.417074]  rtnetlink_rcv_msg+0x29c/0x390
    [44376.419978]  ? rep_movs_alternative+0x3a/0xa0
    [44376.420399]  ? rtnl_calcit.isra.0+0x120/0x120
    [44376.420813]  netlink_rcv_skb+0x54/0x100
    [44376.421192]  netlink_unicast+0x1f6/0x2c0
    [44376.421573]  netlink_sendmsg+0x232/0x4a0
    [44376.421980]  sock_sendmsg+0x38/0x60
    [44376.422328]  ____sys_sendmsg+0x1d0/0x1e0
    [44376.422709]  ? copy_msghdr_from_user+0x6d/0xa0
    [44376.423127]  ___sys_sendmsg+0x80/0xc0
    [44376.423495]  ? ___sys_recvmsg+0x8b/0xc0
    [44376.423869]  __sys_sendmsg+0x51/0x90
    [44376.424226]  do_syscall_64+0x3d/0x90
    [44376.424587]  entry_SYSCALL_64_after_hwframe+0x46/0xb0
    [44376.425046] RIP: 0033:0x7f045134f887
    [44376.425403] Code: 0a 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10
    [44376.426914] RSP: 002b:00007ffd63a82b98 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
    [44376.427592] RAX: ffffffffffffffda RBX: 000000006481955f RCX: 00007f045134f887
    [44376.428195] RDX: 0000000000000000 RSI: 00007ffd63a82c00 RDI: 0000000000000003
    [44376.428796] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
    [44376.429404] R10: 00007f0451208708 R11: 0000000000000246 R12: 0000000000000001
    [44376.430039] R13: 0000000000409980 R14: 000000000047e538 R15: 0000000000485400
    [44376.430644]  </TASK>
    [44376.430907] Modules linked in: mlx5_ib mlx5_core act_mirred act_tunnel_key cls_flower vxlan dummy sch_ingress openvswitch nsh rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib iw_cm ib_cm ib_uverbs ib_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_g
    ss_krb5 auth_rpcgss oid_registry overlay zram zsmalloc fuse [last unloaded: mlx5_core]
    [44376.433936] ---[ end trace 0000000000000000 ]---
    [44376.434373] RIP: 0010:mlx5e_tc_del_fdb_flow+0xb3/0x340 [mlx5_core]
    [44376.434951] Code: 00 48 8b b8 68 ce 02 00 e8 8a 4d 02 00 4c 8d a8 a8 01 00 00 4c 89 ef e8 8b 79 88 e1 48 8b 83 98 06 00 00 48 8b 93 90 06 00 00 <48> 89 42 08 48 89 10 48 b8 00 01 00 00 00 00 ad de 48 89 83 90 06
    [44376.436452] RSP: 0018:ffff88812cc97570 EFLAGS: 00010246
    [44376.436924] RAX: dead000000000122 RBX: ffff8881088e3800 RCX: ffff8881881bac00
    [44376.437530] RDX: dead000000000100 RSI: ffff88812cc97500 RDI: ffff8881242f71b0
    [44376.438179] RBP: ffff88811cbb0940 R08: 0000000000000400 R09: 0000000000000001
    [44376.438786] R10: 0000000000000001 R11: 0000000000000000 R12: ffff88812c944000
    [44376.439393] R13: ffff8881242f71a8 R14: ffff8881222b4000 R15: 0000000000000000
    [44376.439998] FS:  00007f0451104800(0000) GS:ffff88852cb80000(0000) knlGS:0000000000000000
    [44376.440714] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [44376.441225] CR2: 0000000000489108 CR3: 0000000123a79003 CR4: 0000000000370ea0
    [44376.441843] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [44376.442471] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    
    Fixes: ad86755 ("net/mlx5e: Protect unready flows with dedicated lock")
    Signed-off-by: Vlad Buslov <[email protected]>
    Reviewed-by: Roi Dayan <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    w1ldptr authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    e962fd5 View commit details
    Browse the repository at this point in the history
  19. igc: set TP bit in 'supported' and 'advertising' fields of ethtool_li…

    …nk_ksettings
    
    [ Upstream commit 9ac3fc2 ]
    
    set TP bit in the 'supported' and 'advertising' fields. i225/226 parts
    only support twisted pair copper.
    
    Fixes: 8c5ad0d ("igc: Add ethtool support")
    Signed-off-by: Prasad Koya <[email protected]>
    Acked-by: Sasha Neftin <[email protected]>
    Tested-by: Naama Meir <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Prasad Koya authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    246fc96 View commit details
    Browse the repository at this point in the history
  20. igc: Handle PPS start time programming for past time values

    [ Upstream commit 84a192e ]
    
    I225/6 hardware can be programmed to start PPS output once
    the time in Target Time registers is reached. The time
    programmed in these registers should always be into future.
    Only then PPS output is triggered when SYSTIM register
    reaches the programmed value. There are two modes in i225/6
    hardware to program PPS, pulse and clock mode.
    
    There were issues reported where PPS is not generated when
    start time is in past.
    
    Example 1, "echo 0 0 0 2 0 > /sys/class/ptp/ptp0/period"
    
    In the current implementation, a value of '0' is programmed
    into Target time registers and PPS output is in pulse mode.
    Eventually an interrupt which is triggered upon SYSTIM
    register reaching Target time is not fired. Thus no PPS
    output is generated.
    
    Example 2, "echo 0 0 0 1 0 > /sys/class/ptp/ptp0/period"
    
    Above case, a value of '0' is programmed into Target time
    registers and PPS output is in clock mode. Here, HW tries to
    catch-up the current time by incrementing Target Time
    register. This catch-up time seem to vary according to
    programmed PPS period time as per the HW design. In my
    experiments, the delay ranged between few tens of seconds to
    few minutes. The PPS output is only generated after the
    Target time register reaches current time.
    
    In my experiments, I also observed PPS stopped working with
    below test and could not recover until module is removed and
    loaded again.
    
    1) echo 0 <future time> 0 1 0 > /sys/class/ptp/ptp1/period
    2) echo 0 0 0 1 0 > /sys/class/ptp/ptp1/period
    3) echo 0 0 0 1 0 > /sys/class/ptp/ptp1/period
    
    After this PPS did not work even if i re-program with proper
    values. I could only get this back working by reloading the
    driver.
    
    This patch takes care of calculating and programming
    appropriate future time value into Target Time registers.
    
    Fixes: 5e91c72 ("igc: Fix PPS delta between two synchronized end-points")
    Signed-off-by: Aravindhan Gunasekaran <[email protected]>
    Reviewed-by: Muhammad Husaini Zulkifli <[email protected]>
    Tested-by: Naama Meir <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    agunasek authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d752be6 View commit details
    Browse the repository at this point in the history
  21. blk-crypto: use dynamic lock class for blk_crypto_profile::lock

    [ Upstream commit 2fb48d8 ]
    
    When a device-mapper device is passing through the inline encryption
    support of an underlying device, calls to blk_crypto_evict_key() take
    the blk_crypto_profile::lock of the device-mapper device, then take the
    blk_crypto_profile::lock of the underlying device (nested).  This isn't
    a real deadlock, but it causes a lockdep report because there is only
    one lock class for all instances of this lock.
    
    Lockdep subclasses don't really work here because the hierarchy of block
    devices is dynamic and could have more than 2 levels.
    
    Instead, register a dynamic lock class for each blk_crypto_profile, and
    associate that with the lock.
    
    This avoids false-positive lockdep reports like the following:
    
        ============================================
        WARNING: possible recursive locking detected
        6.4.0-rc5 #2 Not tainted
        --------------------------------------------
        fscryptctl/1421 is trying to acquire lock:
        ffffff80829ca418 (&profile->lock){++++}-{3:3}, at: __blk_crypto_evict_key+0x44/0x1c0
    
                       but task is already holding lock:
        ffffff8086b68ca8 (&profile->lock){++++}-{3:3}, at: __blk_crypto_evict_key+0xc8/0x1c0
    
                       other info that might help us debug this:
         Possible unsafe locking scenario:
    
               CPU0
               ----
          lock(&profile->lock);
          lock(&profile->lock);
    
                        *** DEADLOCK ***
    
         May be due to missing lock nesting notation
    
    Fixes: 1b26283 ("block: Keyslot Manager for Inline Encryption")
    Reported-by: Bart Van Assche <[email protected]>
    Signed-off-by: Eric Biggers <[email protected]>
    Reviewed-by: Bart Van Assche <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ebiggers authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    49f6ac6 View commit details
    Browse the repository at this point in the history
  22. scsi: qla2xxx: Fix error code in qla2x00_start_sp()

    [ Upstream commit e579b00 ]
    
    This should be negative -EAGAIN instead of positive.  The callers treat
    non-zero error codes the same so it doesn't really impact runtime beyond
    some trivial differences to debug output.
    
    Fixes: 80676d0 ("scsi: qla2xxx: Fix session cleanup hang")
    Signed-off-by: Dan Carpenter <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dan Carpenter authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    574d523 View commit details
    Browse the repository at this point in the history
  23. scsi: ufs: ufs-mediatek: Add dependency for RESET_CONTROLLER

    [ Upstream commit 89f7ef7 ]
    
    When RESET_CONTROLLER is not set, kconfig complains about missing
    dependencies for RESET_TI_SYSCON, so add the missing dependency just as is
    done above for SCSI_UFS_QCOM.
    
    Silences this kconfig warning:
    
    WARNING: unmet direct dependencies detected for RESET_TI_SYSCON
      Depends on [n]: RESET_CONTROLLER [=n] && HAS_IOMEM [=y]
      Selected by [m]:
      - SCSI_UFS_MEDIATEK [=m] && SCSI_UFSHCD [=y] && SCSI_UFSHCD_PLATFORM [=y] && ARCH_MEDIATEK [=y]
    
    Fixes: de48898 ("scsi: ufs-mediatek: Create reset control device_link")
    Signed-off-by: Randy Dunlap <[email protected]>
    Link: lore.kernel.org/r/[email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Cc: Stanley Chu <[email protected]>
    Cc: Peter Wang <[email protected]>
    Cc: Paul Gazzillo <[email protected]>
    Cc: Necip Fazil Yildiran <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]
    Cc: "James E.J. Bottomley" <[email protected]>
    Cc: "Martin K. Petersen" <[email protected]>
    Reported-by: kernel test robot <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rddunlap authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    714d81a View commit details
    Browse the repository at this point in the history
  24. bpf: Fix max stack depth check for async callbacks

    [ Upstream commit 5415ccd ]
    
    The check_max_stack_depth pass happens after the verifier's symbolic
    execution, and attempts to walk the call graph of the BPF program,
    ensuring that the stack usage stays within bounds for all possible call
    chains. There are two cases to consider: bpf_pseudo_func and
    bpf_pseudo_call. In the former case, the callback pointer is loaded into
    a register, and is assumed that it is passed to some helper later which
    calls it (however there is no way to be sure), but the check remains
    conservative and accounts the stack usage anyway. For this particular
    case, asynchronous callbacks are skipped as they execute asynchronously
    when their corresponding event fires.
    
    The case of bpf_pseudo_call is simpler and we know that the call is
    definitely made, hence the stack depth of the subprog is accounted for.
    
    However, the current check still skips an asynchronous callback even if
    a bpf_pseudo_call was made for it. This is erroneous, as it will miss
    accounting for the stack usage of the asynchronous callback, which can
    be used to breach the maximum stack depth limit.
    
    Fix this by only skipping asynchronous callbacks when the instruction is
    not a pseudo call to the subprog.
    
    Fixes: 7ddc80a ("bpf: Teach stack depth check about async callbacks.")
    Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kkdwivedi authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    b2e74de View commit details
    Browse the repository at this point in the history
  25. net: mvneta: fix txq_map in case of txq_number==1

    [ Upstream commit 21327f8 ]
    
    If we boot with mvneta.txq_number=1, the txq_map is set incorrectly:
    MVNETA_CPU_TXQ_ACCESS(1) refers to TX queue 1, but only TX queue 0 is
    initialized. Fix this.
    
    Fixes: 50bf8cb ("net: mvneta: Configure XPS support")
    Signed-off-by: Klaus Kudielka <[email protected]>
    Reviewed-by: Michal Kubiak <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kkudielka authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    831fbc2 View commit details
    Browse the repository at this point in the history
  26. net/sched: cls_fw: Fix improper refcount update leads to use-after-free

    [ Upstream commit 0323bce ]
    
    In the event of a failure in tcf_change_indev(), fw_set_parms() will
    immediately return an error after incrementing or decrementing
    reference counter in tcf_bind_filter().  If attacker can control
    reference counter to zero and make reference freed, leading to
    use after free.
    
    In order to prevent this, move the point of possible failure above the
    point where the TC_FW_CLASSID is handled.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Reported-by: M A Ramdhan <[email protected]>
    Signed-off-by: M A Ramdhan <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Reviewed-by: Pedro Tammela <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    M A Ramdhan authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c91fb29 View commit details
    Browse the repository at this point in the history
  27. gve: Set default duplex configuration to full

    [ Upstream commit 0503efe ]
    
    Current duplex mode was unset in the driver, resulting in the default
    parameter being set to 0, which corresponds to half duplex. It might
    mislead users to have incorrect expectation about the driver's
    transmission capabilities.
    Set the default duplex configuration to full, as the driver runs in
    full duplex mode at this point.
    
    Fixes: 7e074d5 ("gve: Enable Link Speed Reporting in the driver.")
    Signed-off-by: Junfeng Guo <[email protected]>
    Reviewed-by: Leon Romanovsky <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    junfengg authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2b4086a View commit details
    Browse the repository at this point in the history
  28. octeontx2-af: Promisc enable/disable through mbox

    [ Upstream commit af42088 ]
    
    In legacy silicon, promiscuous mode is only modified
    through CGX mbox messages. In CN10KB silicon, it is modified
    from CGX mbox and NIX. This breaks legacy application
    behaviour. Fix this by removing call from NIX.
    
    Fixes: d6c9784 ("octeontx2-af: Invoke exact match functions if supported")
    Signed-off-by: Ratheesh Kannoth <[email protected]>
    Reviewed-by: Leon Romanovsky <[email protected]>
    Reviewed-by: Michal Kubiak <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ratheesh Kannoth authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    bb56b79 View commit details
    Browse the repository at this point in the history
  29. octeontx2-af: Move validation of ptp pointer before its usage

    [ Upstream commit 7709fbd ]
    
    Moved PTP pointer validation before its use to avoid smatch warning.
    Also used kzalloc/kfree instead of devm_kzalloc/devm_kfree.
    
    Fixes: 2ef4e45 ("octeontx2-af: Add PTP PPS Errata workaround on CN10K silicon")
    Signed-off-by: Naveen Mamindlapalli <[email protected]>
    Signed-off-by: Sunil Goutham <[email protected]>
    Signed-off-by: Sai Krishna <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Sai Krishna authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    6cc293d View commit details
    Browse the repository at this point in the history
  30. ionic: remove WARN_ON to prevent panic_on_warn

    [ Upstream commit abfb2a5 ]
    
    Remove unnecessary early code development check and the WARN_ON
    that it uses.  The irq alloc and free paths have long been
    cleaned up and this check shouldn't have stuck around so long.
    
    Fixes: 77ceb68 ("ionic: Add notifyq support")
    Signed-off-by: Nitya Sunkad <[email protected]>
    Signed-off-by: Shannon Nelson <[email protected]>
    Reviewed-by: Jacob Keller <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    nsunkad authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    dc47046 View commit details
    Browse the repository at this point in the history
  31. net: bgmac: postpone turning IRQs off to avoid SoC hangs

    [ Upstream commit e773119 ]
    
    Turning IRQs off is done by accessing Ethernet controller registers.
    That can't be done until device's clock is enabled. It results in a SoC
    hang otherwise.
    
    This bug remained unnoticed for years as most bootloaders keep all
    Ethernet interfaces turned on. It seems to only affect a niche SoC
    family BCM47189. It has two Ethernet controllers but CFE bootloader uses
    only the first one.
    
    Fixes: 3432261 ("net: bgmac: Mask interrupts during probe")
    Signed-off-by: Rafał Miłecki <[email protected]>
    Reviewed-by: Michal Kubiak <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Rafał Miłecki authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    685b57a View commit details
    Browse the repository at this point in the history
  32. net: prevent skb corruption on frag list segmentation

    [ Upstream commit c329b26 ]
    
    Ian reported several skb corruptions triggered by rx-gro-list,
    collecting different oops alike:
    
    [   62.624003] BUG: kernel NULL pointer dereference, address: 00000000000000c0
    [   62.631083] #PF: supervisor read access in kernel mode
    [   62.636312] #PF: error_code(0x0000) - not-present page
    [   62.641541] PGD 0 P4D 0
    [   62.644174] Oops: 0000 [#1] PREEMPT SMP NOPTI
    [   62.648629] CPU: 1 PID: 913 Comm: napi/eno2-79 Not tainted 6.4.0 #364
    [   62.655162] Hardware name: Supermicro Super Server/A2SDi-12C-HLN4F, BIOS 1.7a 10/13/2022
    [   62.663344] RIP: 0010:__udp_gso_segment (./include/linux/skbuff.h:2858
    ./include/linux/udp.h:23 net/ipv4/udp_offload.c:228 net/ipv4/udp_offload.c:261
    net/ipv4/udp_offload.c:277)
    [   62.687193] RSP: 0018:ffffbd3a83b4f868 EFLAGS: 00010246
    [   62.692515] RAX: 00000000000000ce RBX: 0000000000000000 RCX: 0000000000000000
    [   62.699743] RDX: ffffa124def8a000 RSI: 0000000000000079 RDI: ffffa125952a14d4
    [   62.706970] RBP: ffffa124def8a000 R08: 0000000000000022 R09: 00002000001558c9
    [   62.714199] R10: 0000000000000000 R11: 00000000be554639 R12: 00000000000000e2
    [   62.721426] R13: ffffa125952a1400 R14: ffffa125952a1400 R15: 00002000001558c9
    [   62.728654] FS:  0000000000000000(0000) GS:ffffa127efa40000(0000)
    knlGS:0000000000000000
    [   62.736852] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   62.742702] CR2: 00000000000000c0 CR3: 00000001034b0000 CR4: 00000000003526e0
    [   62.749948] Call Trace:
    [   62.752498]  <TASK>
    [   62.779267] inet_gso_segment (net/ipv4/af_inet.c:1398)
    [   62.787605] skb_mac_gso_segment (net/core/gro.c:141)
    [   62.791906] __skb_gso_segment (net/core/dev.c:3403 (discriminator 2))
    [   62.800492] validate_xmit_skb (./include/linux/netdevice.h:4862
    net/core/dev.c:3659)
    [   62.804695] validate_xmit_skb_list (net/core/dev.c:3710)
    [   62.809158] sch_direct_xmit (net/sched/sch_generic.c:330)
    [   62.813198] __dev_queue_xmit (net/core/dev.c:3805 net/core/dev.c:4210)
    net/netfilter/core.c:626)
    [   62.821093] br_dev_queue_push_xmit (net/bridge/br_forward.c:55)
    [   62.825652] maybe_deliver (net/bridge/br_forward.c:193)
    [   62.829420] br_flood (net/bridge/br_forward.c:233)
    [   62.832758] br_handle_frame_finish (net/bridge/br_input.c:215)
    [   62.837403] br_handle_frame (net/bridge/br_input.c:298
    net/bridge/br_input.c:416)
    [   62.851417] __netif_receive_skb_core.constprop.0 (net/core/dev.c:5387)
    [   62.866114] __netif_receive_skb_list_core (net/core/dev.c:5570)
    [   62.871367] netif_receive_skb_list_internal (net/core/dev.c:5638
    net/core/dev.c:5727)
    [   62.876795] napi_complete_done (./include/linux/list.h:37
    ./include/net/gro.h:434 ./include/net/gro.h:429 net/core/dev.c:6067)
    [   62.881004] ixgbe_poll (drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3191)
    [   62.893534] __napi_poll (net/core/dev.c:6498)
    [   62.897133] napi_threaded_poll (./include/linux/netpoll.h:89
    net/core/dev.c:6640)
    [   62.905276] kthread (kernel/kthread.c:379)
    [   62.913435] ret_from_fork (arch/x86/entry/entry_64.S:314)
    [   62.917119]  </TASK>
    
    In the critical scenario, rx-gro-list GRO-ed packets are fed, via a
    bridge, both to the local input path and to an egress device (tun).
    
    The segmentation of such packets unsafely writes to the cloned skbs
    with shared heads.
    
    This change addresses the issue by uncloning as needed the
    to-be-segmented skbs.
    
    Reported-by: Ian Kumlien <[email protected]>
    Tested-by: Ian Kumlien <[email protected]>
    Fixes: 3a1296a ("net: Support GRO/GSO fraglist chaining.")
    Signed-off-by: Paolo Abeni <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Paolo Abeni authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1731234 View commit details
    Browse the repository at this point in the history
  33. icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().

    [ Upstream commit 2aaa8a1 ]
    
    With some IPv6 Ext Hdr (RPL, SRv6, etc.), we can send a packet that
    has the link-local address as src and dst IP and will be forwarded to
    an external IP in the IPv6 Ext Hdr.
    
    For example, the script below generates a packet whose src IP is the
    link-local address and dst is updated to 11::.
    
      # for f in $(find /proc/sys/net/ -name *seg6_enabled*); do echo 1 > $f; done
      # python3
      >>> from socket import *
      >>> from scapy.all import *
      >>>
      >>> SRC_ADDR = DST_ADDR = "fe80::5054:ff:fe12:3456"
      >>>
      >>> pkt = IPv6(src=SRC_ADDR, dst=DST_ADDR)
      >>> pkt /= IPv6ExtHdrSegmentRouting(type=4, addresses=["11::", "22::"], segleft=1)
      >>>
      >>> sk = socket(AF_INET6, SOCK_RAW, IPPROTO_RAW)
      >>> sk.sendto(bytes(pkt), (DST_ADDR, 0))
    
    For such a packet, we call ip6_route_input() to look up a route for the
    next destination in these three functions depending on the header type.
    
      * ipv6_rthdr_rcv()
      * ipv6_rpl_srh_rcv()
      * ipv6_srh_rcv()
    
    If no route is found, ip6_null_entry is set to skb, and the following
    dst_input(skb) calls ip6_pkt_drop().
    
    Finally, in icmp6_dev(), we dereference skb_rt6_info(skb)->rt6i_idev->dev
    as the input device is the loopback interface.  Then, we have to check if
    skb_rt6_info(skb)->rt6i_idev is NULL or not to avoid NULL pointer deref
    for ip6_null_entry.
    
    BUG: kernel NULL pointer dereference, address: 0000000000000000
     PF: supervisor read access in kernel mode
     PF: error_code(0x0000) - not-present page
    PGD 0 P4D 0
    Oops: 0000 [#1] PREEMPT SMP PTI
    CPU: 0 PID: 157 Comm: python3 Not tainted 6.4.0-11996-gb121d614371c #35
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    RIP: 0010:icmp6_send (net/ipv6/icmp.c:436 net/ipv6/icmp.c:503)
    Code: fe ff ff 48 c7 40 30 c0 86 5d 83 e8 c6 44 1c 00 e9 c8 fc ff ff 49 8b 46 58 48 83 e0 fe 0f 84 4a fb ff ff 48 8b 80 d0 00 00 00 <48> 8b 00 44 8b 88 e0 00 00 00 e9 34 fb ff ff 4d 85 ed 0f 85 69 01
    RSP: 0018:ffffc90000003c70 EFLAGS: 00000286
    RAX: 0000000000000000 RBX: 0000000000000001 RCX: 00000000000000e0
    RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff888006d72a18
    RBP: ffffc90000003d80 R08: 0000000000000000 R09: 0000000000000001
    R10: ffffc90000003d98 R11: 0000000000000040 R12: ffff888006d72a10
    R13: 0000000000000000 R14: ffff8880057fb800 R15: ffffffff835d86c0
    FS:  00007f9dc72ee740(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000000 CR3: 00000000057b2000 CR4: 00000000007506f0
    PKRU: 55555554
    Call Trace:
     <IRQ>
     ip6_pkt_drop (net/ipv6/route.c:4513)
     ipv6_rthdr_rcv (net/ipv6/exthdrs.c:640 net/ipv6/exthdrs.c:686)
     ip6_protocol_deliver_rcu (net/ipv6/ip6_input.c:437 (discriminator 5))
     ip6_input_finish (./include/linux/rcupdate.h:781 net/ipv6/ip6_input.c:483)
     __netif_receive_skb_one_core (net/core/dev.c:5455)
     process_backlog (./include/linux/rcupdate.h:781 net/core/dev.c:5895)
     __napi_poll (net/core/dev.c:6460)
     net_rx_action (net/core/dev.c:6529 net/core/dev.c:6660)
     __do_softirq (./arch/x86/include/asm/jump_label.h:27 ./include/linux/jump_label.h:207 ./include/trace/events/irq.h:142 kernel/softirq.c:554)
     do_softirq (kernel/softirq.c:454 kernel/softirq.c:441)
     </IRQ>
     <TASK>
     __local_bh_enable_ip (kernel/softirq.c:381)
     __dev_queue_xmit (net/core/dev.c:4231)
     ip6_finish_output2 (./include/net/neighbour.h:544 net/ipv6/ip6_output.c:135)
     rawv6_sendmsg (./include/net/dst.h:458 ./include/linux/netfilter.h:303 net/ipv6/raw.c:656 net/ipv6/raw.c:914)
     sock_sendmsg (net/socket.c:725 net/socket.c:748)
     __sys_sendto (net/socket.c:2134)
     __x64_sys_sendto (net/socket.c:2146 net/socket.c:2142 net/socket.c:2142)
     do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
     entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
    RIP: 0033:0x7f9dc751baea
    Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 7e c3 0f 1f 44 00 00 41 54 48 83 ec 30 44 89
    RSP: 002b:00007ffe98712c38 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
    RAX: ffffffffffffffda RBX: 00007ffe98712cf8 RCX: 00007f9dc751baea
    RDX: 0000000000000060 RSI: 00007f9dc6460b90 RDI: 0000000000000003
    RBP: 00007f9dc56e8be0 R08: 00007ffe98712d70 R09: 000000000000001c
    R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
    R13: ffffffffc4653600 R14: 0000000000000001 R15: 00007f9dc6af5d1b
     </TASK>
    Modules linked in:
    CR2: 0000000000000000
     ---[ end trace 0000000000000000 ]---
    RIP: 0010:icmp6_send (net/ipv6/icmp.c:436 net/ipv6/icmp.c:503)
    Code: fe ff ff 48 c7 40 30 c0 86 5d 83 e8 c6 44 1c 00 e9 c8 fc ff ff 49 8b 46 58 48 83 e0 fe 0f 84 4a fb ff ff 48 8b 80 d0 00 00 00 <48> 8b 00 44 8b 88 e0 00 00 00 e9 34 fb ff ff 4d 85 ed 0f 85 69 01
    RSP: 0018:ffffc90000003c70 EFLAGS: 00000286
    RAX: 0000000000000000 RBX: 0000000000000001 RCX: 00000000000000e0
    RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff888006d72a18
    RBP: ffffc90000003d80 R08: 0000000000000000 R09: 0000000000000001
    R10: ffffc90000003d98 R11: 0000000000000040 R12: ffff888006d72a10
    R13: 0000000000000000 R14: ffff8880057fb800 R15: ffffffff835d86c0
    FS:  00007f9dc72ee740(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000000 CR3: 00000000057b2000 CR4: 00000000007506f0
    PKRU: 55555554
    Kernel panic - not syncing: Fatal exception in interrupt
    Kernel Offset: disabled
    
    Fixes: 4832c30 ("net: ipv6: put host and anycast routes on device with address")
    Reported-by: Wang Yufen <[email protected]>
    Closes: https://lore.kernel.org/netdev/[email protected]/
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Reviewed-by: David Ahern <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    q2ven authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1462e9d View commit details
    Browse the repository at this point in the history
  34. udp6: fix udp6_ehashfn() typo

    [ Upstream commit 51d03e2 ]
    
    Amit Klein reported that udp6_ehash_secret was initialized but never used.
    
    Fixes: 1bbdcee ("inet: convert inet_ehash_secret and ipv6_hash_secret to net_get_random_once")
    Reported-by: Amit Klein <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Willy Tarreau <[email protected]>
    Cc: Willem de Bruijn <[email protected]>
    Cc: David Ahern <[email protected]>
    Cc: Hannes Frederic Sowa <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Eric Dumazet authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    360db93 View commit details
    Browse the repository at this point in the history
  35. ntb: idt: Fix error handling in idt_pci_driver_init()

    [ Upstream commit c012968 ]
    
    A problem about ntb_hw_idt create debugfs failed is triggered with the
    following log given:
    
     [ 1236.637636] IDT PCI-E Non-Transparent Bridge Driver 2.0
     [ 1236.639292] debugfs: Directory 'ntb_hw_idt' with parent '/' already present!
    
    The reason is that idt_pci_driver_init() returns pci_register_driver()
    directly without checking its return value, if pci_register_driver()
    failed, it returns without destroy the newly created debugfs, resulting
    the debugfs of ntb_hw_idt can never be created later.
    
     idt_pci_driver_init()
       debugfs_create_dir() # create debugfs directory
       pci_register_driver()
         driver_register()
           bus_add_driver()
             priv = kzalloc(...) # OOM happened
       # return without destroy debugfs directory
    
    Fix by removing debugfs when pci_register_driver() returns error.
    
    Fixes: bf2a952 ("NTB: Add IDT 89HPESxNTx PCIe-switches support")
    Signed-off-by: Yuan Can <[email protected]>
    Signed-off-by: Jon Mason <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yuan Can authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    4e5daad View commit details
    Browse the repository at this point in the history
  36. NTB: amd: Fix error handling in amd_ntb_pci_driver_init()

    [ Upstream commit 98af0a3 ]
    
    A problem about ntb_hw_amd create debugfs failed is triggered with the
    following log given:
    
     [  618.431232] AMD(R) PCI-E Non-Transparent Bridge Driver 1.0
     [  618.433284] debugfs: Directory 'ntb_hw_amd' with parent '/' already present!
    
    The reason is that amd_ntb_pci_driver_init() returns pci_register_driver()
    directly without checking its return value, if pci_register_driver()
    failed, it returns without destroy the newly created debugfs, resulting
    the debugfs of ntb_hw_amd can never be created later.
    
     amd_ntb_pci_driver_init()
       debugfs_create_dir() # create debugfs directory
       pci_register_driver()
         driver_register()
           bus_add_driver()
             priv = kzalloc(...) # OOM happened
       # return without destroy debugfs directory
    
    Fix by removing debugfs when pci_register_driver() returns error.
    
    Fixes: a1b3695 ("NTB: Add support for AMD PCI-Express Non-Transparent Bridge")
    Signed-off-by: Yuan Can <[email protected]>
    Signed-off-by: Jon Mason <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yuan Can authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d4317d4 View commit details
    Browse the repository at this point in the history
  37. ntb: intel: Fix error handling in intel_ntb_pci_driver_init()

    [ Upstream commit 4c3c796 ]
    
    A problem about ntb_hw_intel create debugfs failed is triggered with the
    following log given:
    
     [  273.112733] Intel(R) PCI-E Non-Transparent Bridge Driver 2.0
     [  273.115342] debugfs: Directory 'ntb_hw_intel' with parent '/' already present!
    
    The reason is that intel_ntb_pci_driver_init() returns
    pci_register_driver() directly without checking its return value, if
    pci_register_driver() failed, it returns without destroy the newly created
    debugfs, resulting the debugfs of ntb_hw_intel can never be created later.
    
     intel_ntb_pci_driver_init()
       debugfs_create_dir() # create debugfs directory
       pci_register_driver()
         driver_register()
           bus_add_driver()
             priv = kzalloc(...) # OOM happened
       # return without destroy debugfs directory
    
    Fix by removing debugfs when pci_register_driver() returns error.
    
    Fixes: e26a584 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
    Signed-off-by: Yuan Can <[email protected]>
    Acked-by: Dave Jiang <[email protected]>
    Signed-off-by: Jon Mason <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yuan Can authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    bece678 View commit details
    Browse the repository at this point in the history
  38. NTB: ntb_transport: fix possible memory leak while device_register() …

    …fails
    
    [ Upstream commit 8623ccb ]
    
    If device_register() returns error, the name allocated by
    dev_set_name() need be freed. As comment of device_register()
    says, it should use put_device() to give up the reference in
    the error path. So fix this by calling put_device(), then the
    name can be freed in kobject_cleanup(), and client_dev is freed
    in ntb_transport_client_release().
    
    Fixes: fce8a7b ("PCI-Express Non-Transparent Bridge Support")
    Signed-off-by: Yang Yingliang <[email protected]>
    Reviewed-by: Dave Jiang <[email protected]>
    Signed-off-by: Jon Mason <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yang Yingliang authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    8d7b875 View commit details
    Browse the repository at this point in the history
  39. NTB: ntb_tool: Add check for devm_kcalloc

    [ Upstream commit 2790143 ]
    
    As the devm_kcalloc may return NULL pointer,
    it should be better to add check for the return
    value, as same as the others.
    
    Fixes: 7f46c8b ("NTB: ntb_tool: Add full multi-port NTB API support")
    Signed-off-by: Jiasheng Jiang <[email protected]>
    Reviewed-by: Serge Semin <[email protected]>
    Reviewed-by: Dave Jiang <[email protected]>
    Signed-off-by: Jon Mason <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    JiangJias authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    5554414 View commit details
    Browse the repository at this point in the history
  40. ipv6/addrconf: fix a potential refcount underflow for idev

    [ Upstream commit 06a0716 ]
    
    Now in addrconf_mod_rs_timer(), reference idev depends on whether
    rs_timer is not pending. Then modify rs_timer timeout.
    
    There is a time gap in [1], during which if the pending rs_timer
    becomes not pending. It will miss to hold idev, but the rs_timer
    is activated. Thus rs_timer callback function addrconf_rs_timer()
    will be executed and put idev later without holding idev. A refcount
    underflow issue for idev can be caused by this.
    
    	if (!timer_pending(&idev->rs_timer))
    		in6_dev_hold(idev);
    		  <--------------[1]
    	mod_timer(&idev->rs_timer, jiffies + when);
    
    To fix the issue, hold idev if mod_timer() return 0.
    
    Fixes: b7b1bfc ("ipv6: split duplicate address detection and router solicitation timer")
    Suggested-by: Eric Dumazet <[email protected]>
    Signed-off-by: Ziyang Xuan <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ziyang Xuan authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    436b7cc View commit details
    Browse the repository at this point in the history
  41. net: dsa: qca8k: Add check for skb_copy

    [ Upstream commit 87355b7 ]
    
    Add check for the return value of skb_copy in order to avoid NULL pointer
    dereference.
    
    Fixes: 2cd5485 ("net: dsa: qca8k: add support for phy read/write with mgmt Ethernet")
    Signed-off-by: Jiasheng Jiang <[email protected]>
    Reviewed-by: Pavan Chebbi <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    JiangJias authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    89726b0 View commit details
    Browse the repository at this point in the history
  42. platform/x86: wmi: Break possible infinite loop when parsing GUID

    [ Upstream commit 028e6e2 ]
    
    The while-loop may break on one of the two conditions, either ID string
    is empty or GUID matches. The second one, may never be reached if the
    parsed string is not correct GUID. In such a case the loop will never
    advance to check the next ID.
    
    Break possible infinite loop by factoring out guid_parse_and_compare()
    helper which may be moved to the generic header for everyone later on
    and preventing from similar mistake in the future.
    
    Interestingly that firstly it appeared when WMI was turned into a bus
    driver, but later when duplicated GUIDs were checked, the while-loop
    has been replaced by for-loop and hence no mistake made again.
    
    Fixes: a48e233 ("platform/x86: wmi: add context pointer field to struct wmi_device_id")
    Fixes: 844af95 ("platform/x86: wmi: Turn WMI into a bus driver")
    Signed-off-by: Andy Shevchenko <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Armin Wolf <[email protected]>
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    andy-shev authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    7772d5c View commit details
    Browse the repository at this point in the history
  43. kernel/trace: Fix cleanup logic of enable_trace_eprobe

    [ Upstream commit cf0a624 ]
    
    The enable_trace_eprobe() function enables all event probes, attached
    to given trace probe. If an error occurs in enabling one of the event
    probes, all others should be roll backed. There is a bug in that roll
    back logic - instead of all event probes, only the failed one is
    disabled.
    
    Link: https://lore.kernel.org/all/[email protected]/
    
    Reported-by: Dan Carpenter <[email protected]>
    Fixes: 7491e2c ("tracing: Add a probe that attaches to trace events")
    Signed-off-by: Tzvetomir Stoyanov (VMware) <[email protected]>
    Acked-by: Masami Hiramatsu (Google) <[email protected]>
    Reviewed-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tzstoyanov authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    f92a82d View commit details
    Browse the repository at this point in the history
  44. igc: Fix launchtime before start of cycle

    [ Upstream commit c1bca9a ]
    
    It is possible (verified on a running system) that frames are processed
    by igc_tx_launchtime with a txtime before the start of the cycle
    (baset_est).
    
    However, the result of txtime - baset_est is written into a u32,
    leading to a wrap around to a positive number. The following
    launchtime > 0 check will only branch to executing launchtime = 0
    if launchtime is already 0.
    
    Fix it by using a s32 before checking launchtime > 0.
    
    Fixes: db0b124 ("igc: Enhance Qbv scheduling by using first flag bit")
    Signed-off-by: Florian Kauer <[email protected]>
    Reviewed-by: Kurt Kanzenbach <[email protected]>
    Tested-by: Naama Meir <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    koalo authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1b87509 View commit details
    Browse the repository at this point in the history
  45. igc: Fix inserting of empty frame for launchtime

    [ Upstream commit 0bcc628 ]
    
    The insertion of an empty frame was introduced with
    commit db0b124 ("igc: Enhance Qbv scheduling by using first flag bit")
    in order to ensure that the current cycle has at least one packet if
    there is some packet to be scheduled for the next cycle.
    
    However, the current implementation does not properly check if
    a packet is already scheduled for the current cycle. Currently,
    an empty packet is always inserted if and only if
    txtime >= end_of_cycle && txtime > last_tx_cycle
    but since last_tx_cycle is always either the end of the current
    cycle (end_of_cycle) or the end of a previous cycle, the
    second part (txtime > last_tx_cycle) is always true unless
    txtime == last_tx_cycle.
    
    What actually needs to be checked here is if the last_tx_cycle
    was already written within the current cycle, so an empty frame
    should only be inserted if and only if
    txtime >= end_of_cycle && end_of_cycle > last_tx_cycle.
    
    This patch does not only avoid an unnecessary insertion, but it
    can actually be harmful to insert an empty packet if packets
    are already scheduled in the current cycle, because it can lead
    to a situation where the empty packet is actually processed
    as the first packet in the upcoming cycle shifting the packet
    with the first_flag even one cycle into the future, finally leading
    to a TX hang.
    
    The TX hang can be reproduced on a i225 with:
    
        sudo tc qdisc replace dev enp1s0 parent root handle 100 taprio \
    	    num_tc 1 \
    	    map 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
    	    queues 1@0 \
    	    base-time 0 \
    	    sched-entry S 01 300000 \
    	    flags 0x1 \
    	    txtime-delay 500000 \
    	    clockid CLOCK_TAI
        sudo tc qdisc replace dev enp1s0 parent 100:1 etf \
    	    clockid CLOCK_TAI \
    	    delta 500000 \
    	    offload \
    	    skip_sock_check
    
    and traffic generator
    
        sudo trafgen -i traffic.cfg -o enp1s0 --cpp -n0 -q -t1400ns
    
    with traffic.cfg
    
        #define ETH_P_IP        0x0800
    
        {
          /* Ethernet Header */
          0x30, 0x1f, 0x9a, 0xd0, 0xf0, 0x0e,  # MAC Dest - adapt as needed
          0x24, 0x5e, 0xbe, 0x57, 0x2e, 0x36,  # MAC Src  - adapt as needed
          const16(ETH_P_IP),
    
          /* IPv4 Header */
          0b01000101, 0,   # IPv4 version, IHL, TOS
          const16(1028),   # IPv4 total length (UDP length + 20 bytes (IP header))
          const16(2),      # IPv4 ident
          0b01000000, 0,   # IPv4 flags, fragmentation off
          64,              # IPv4 TTL
          17,              # Protocol UDP
          csumip(14, 33),  # IPv4 checksum
    
          /* UDP Header */
          10,  0, 48, 1,   # IP Src - adapt as needed
          10,  0, 48, 10,  # IP Dest - adapt as needed
          const16(5555),   # UDP Src Port
          const16(6666),   # UDP Dest Port
          const16(1008),   # UDP length (UDP header 8 bytes + payload length)
          csumudp(14, 34), # UDP checksum
    
          /* Payload */
          fill('W', 1000),
        }
    
    and the observed message with that is for example
    
     igc 0000:01:00.0 enp1s0: Detected Tx Unit Hang
       Tx Queue             <0>
       TDH                  <32>
       TDT                  <3c>
       next_to_use          <3c>
       next_to_clean        <32>
     buffer_info[next_to_clean]
       time_stamp           <ffff26a8>
       next_to_watch        <00000000632a1828>
       jiffies              <ffff27f8>
       desc.status          <1048000>
    
    Fixes: db0b124 ("igc: Enhance Qbv scheduling by using first flag bit")
    Signed-off-by: Florian Kauer <[email protected]>
    Reviewed-by: Kurt Kanzenbach <[email protected]>
    Tested-by: Naama Meir <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    koalo authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    66afb6a View commit details
    Browse the repository at this point in the history
  46. nvme: fix the NVME_ID_NS_NVM_STS_MASK definition

    [ Upstream commit b938e66 ]
    
    As per NVMe command set specification 1.0c Storage tag size is 7 bits.
    
    Fixes: 4020aad ("nvme: add support for enhanced metadata")
    Signed-off-by: Ankit Kumar <[email protected]>
    Reviewed-by: Kanchan Joshi <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ankit-sam authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    13a30e2 View commit details
    Browse the repository at this point in the history
  47. riscv, bpf: Fix inconsistent JIT image generation

    [ Upstream commit c56fb2a ]
    
    In order to generate the prologue and epilogue, the BPF JIT needs to
    know which registers that are clobbered. Therefore, the during
    pre-final passes, the prologue is generated after the body of the
    program body-prologue-epilogue. Then, in the final pass, a proper
    prologue-body-epilogue JITted image is generated.
    
    This scheme has worked most of the time. However, for some large
    programs with many jumps, e.g. the test_kmod.sh BPF selftest with
    hardening enabled (blinding constants), this has shown to be
    incorrect. For the final pass, when the proper prologue-body-epilogue
    is generated, the image has not converged. This will lead to that the
    final image will have incorrect jump offsets. The following is an
    excerpt from an incorrect image:
    
      | ...
      |     3b8:       00c50663                beq     a0,a2,3c4 <.text+0x3c4>
      |     3bc:       0020e317                auipc   t1,0x20e
      |     3c0:       49630067                jalr    zero,1174(t1) # 20e852 <.text+0x20e852>
      | ...
      |  20e84c:       8796                    c.mv    a5,t0
      |  20e84e:       6422                    c.ldsp  s0,8(sp)    # Epilogue start
      |  20e850:       6141                    c.addi16sp      sp,16
      |  20e852:       853e                    c.mv    a0,a5       # Incorrect jump target
      |  20e854:       8082                    c.jr    ra
    
    The image has shrunk, and the epilogue offset is incorrect in the
    final pass.
    
    Correct the problem by always generating proper prologue-body-epilogue
    outputs, which means that the first pass will only generate the body
    to track what registers that are touched.
    
    Fixes: 2353ecc ("bpf, riscv: add BPF JIT for RV64G")
    Signed-off-by: Björn Töpel <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    bjorn-rivos authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ba05762 View commit details
    Browse the repository at this point in the history
  48. drm/i915: Don't preserve dpll_hw_state for slave crtc in Bigjoiner

    [ Upstream commit 5c41318 ]
    
    If we are using Bigjoiner dpll_hw_state is supposed to be exactly
    same as for master crtc, so no need to save it's state for slave crtc.
    
    Signed-off-by: Stanislav Lisovskiy <[email protected]>
    Fixes: 0ff0e21 ("drm/i915: Compute clocks earlier")
    Reviewed-by: Ville Syrjälä <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit cbaf758)
    Signed-off-by: Tvrtko Ursulin <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    StanFox1984 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    f1e746a View commit details
    Browse the repository at this point in the history
  49. drm/i915: Fix one wrong caching mode enum usage

    [ Upstream commit 113899c ]
    
    Commit a4d8624 ("drm/i915/gt: Provide a utility to create a scratch
    buffer") mistakenly passed in uapi I915_CACHING_CACHED as argument to
    i915_gem_object_set_cache_coherency(), which actually takes internal
    enum i915_cache_level.
    
    No functional issue since the value matches I915_CACHE_LLC (1 == 1), which
    is the intended caching mode, but lets clean it up nevertheless.
    
    Signed-off-by: Tvrtko Ursulin <[email protected]>
    Fixes: a4d8624 ("drm/i915/gt: Provide a utility to create a scratch buffer")
    Cc: Daniele Ceraolo Spurio <[email protected]>
    Reviewed-by: Tejas Upadhyay <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 49c60b2)
    Signed-off-by: Tvrtko Ursulin <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tursulin authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    5a9aecb View commit details
    Browse the repository at this point in the history
  50. octeontx2-pf: Add additional check for MCAM rules

    [ Upstream commit 8278ee2 ]
    
    Due to hardware limitation, MCAM drop rule with
    ether_type == 802.1Q and vlan_id == 0 is not supported. Hence rejecting
    such rules.
    
    Fixes: dce677d ("octeontx2-pf: Add vlan-etype to ntuple filters")
    Signed-off-by: Suman Ghosh <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Suman Ghosh authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2727279 View commit details
    Browse the repository at this point in the history
  51. erofs: avoid useless loops in z_erofs_pcluster_readmore() when readin…

    …g beyond EOF
    
    [ Upstream commit 936aa70 ]
    
    z_erofs_pcluster_readmore() may take a long time to loop when the page
    offset is large enough, which is unnecessary should be prevented.
    
    For example, when the following case is encountered, it will loop 4691368
    times, taking about 27 seconds:
        - offset = 19217289215
        - inode_size = 1442672
    
    Signed-off-by: Chunhai Guo <[email protected]>
    Fixes: 3862929 ("erofs: introduce readmore decompression strategy")
    Reviewed-by: Gao Xiang <[email protected]>
    Reviewed-by: Yue Hu <[email protected]>
    Reviewed-by: Chao Yu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Gao Xiang <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Chunhai Guo authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    83879f7 View commit details
    Browse the repository at this point in the history
  52. erofs: avoid infinite loop in z_erofs_do_read_page() when reading bey…

    …ond EOF
    
    [ Upstream commit 8191213 ]
    
    z_erofs_do_read_page() may loop infinitely due to the inappropriate
    truncation in the below statement. Since the offset is 64 bits and min_t()
    truncates the result to 32 bits. The solution is to replace unsigned int
    with a 64-bit type, such as erofs_off_t.
        cur = end - min_t(unsigned int, offset + end - map->m_la, end);
    
        - For example:
            - offset = 0x400160000
            - end = 0x370
            - map->m_la = 0x160370
            - offset + end - map->m_la = 0x400000000
            - offset + end - map->m_la = 0x00000000 (truncated as unsigned int)
        - Expected result:
            - cur = 0
        - Actual result:
            - cur = 0x370
    
    Signed-off-by: Chunhai Guo <[email protected]>
    Fixes: 3883a79 ("staging: erofs: introduce VLE decompression support")
    Reviewed-by: Gao Xiang <[email protected]>
    Reviewed-by: Chao Yu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Gao Xiang <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Chunhai Guo authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    dc8158a View commit details
    Browse the repository at this point in the history
  53. erofs: fix fsdax unavailability for chunk-based regular files

    [ Upstream commit 18bddc5 ]
    
    DAX can be used to share page cache between VMs, reducing guest memory
    overhead. And chunk based data format is widely used for VM and
    container image. So enable dax support for it, make erofs better used
    for VM scenarios.
    
    Fixes: c5aa903 ("erofs: support reading chunk-based uncompressed files")
    Signed-off-by: Xin Yin <[email protected]>
    Reviewed-by: Gao Xiang <[email protected]>
    Reviewed-by: Chao Yu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Gao Xiang <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Xin Yin authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    9e6474e View commit details
    Browse the repository at this point in the history
  54. wifi: airo: avoid uninitialized warning in airo_get_rate()

    [ Upstream commit 9373771 ]
    
    Quieten a gcc (11.3.0) build error or warning by checking the function
    call status and returning -EBUSY if the function call failed.
    This is similar to what several other wireless drivers do for the
    SIOCGIWRATE ioctl call when there is a locking problem.
    
    drivers/net/wireless/cisco/airo.c: error: 'status_rid.currentXmitRate' is used uninitialized [-Werror=uninitialized]
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Randy Dunlap <[email protected]>
    Reported-by: Geert Uytterhoeven <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rddunlap authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    4719576 View commit details
    Browse the repository at this point in the history
  55. bpf: cpumap: Fix memory leak in cpu_map_update_elem

    [ Upstream commit 4369016 ]
    
    Syzkaller reported a memory leak as follows:
    
    BUG: memory leak
    unreferenced object 0xff110001198ef748 (size 192):
      comm "syz-executor.3", pid 17672, jiffies 4298118891 (age 9.906s)
      hex dump (first 32 bytes):
        00 00 00 00 4a 19 00 00 80 ad e3 e4 fe ff c0 00  ....J...........
        00 b2 d3 0c 01 00 11 ff 28 f5 8e 19 01 00 11 ff  ........(.......
      backtrace:
        [<ffffffffadd28087>] __cpu_map_entry_alloc+0xf7/0xb00
        [<ffffffffadd28d8e>] cpu_map_update_elem+0x2fe/0x3d0
        [<ffffffffadc6d0fd>] bpf_map_update_value.isra.0+0x2bd/0x520
        [<ffffffffadc7349b>] map_update_elem+0x4cb/0x720
        [<ffffffffadc7d983>] __se_sys_bpf+0x8c3/0xb90
        [<ffffffffb029cc80>] do_syscall_64+0x30/0x40
        [<ffffffffb0400099>] entry_SYSCALL_64_after_hwframe+0x61/0xc6
    
    BUG: memory leak
    unreferenced object 0xff110001198ef528 (size 192):
      comm "syz-executor.3", pid 17672, jiffies 4298118891 (age 9.906s)
      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:
        [<ffffffffadd281f0>] __cpu_map_entry_alloc+0x260/0xb00
        [<ffffffffadd28d8e>] cpu_map_update_elem+0x2fe/0x3d0
        [<ffffffffadc6d0fd>] bpf_map_update_value.isra.0+0x2bd/0x520
        [<ffffffffadc7349b>] map_update_elem+0x4cb/0x720
        [<ffffffffadc7d983>] __se_sys_bpf+0x8c3/0xb90
        [<ffffffffb029cc80>] do_syscall_64+0x30/0x40
        [<ffffffffb0400099>] entry_SYSCALL_64_after_hwframe+0x61/0xc6
    
    BUG: memory leak
    unreferenced object 0xff1100010fd93d68 (size 8):
      comm "syz-executor.3", pid 17672, jiffies 4298118891 (age 9.906s)
      hex dump (first 8 bytes):
        00 00 00 00 00 00 00 00                          ........
      backtrace:
        [<ffffffffade5db3e>] kvmalloc_node+0x11e/0x170
        [<ffffffffadd28280>] __cpu_map_entry_alloc+0x2f0/0xb00
        [<ffffffffadd28d8e>] cpu_map_update_elem+0x2fe/0x3d0
        [<ffffffffadc6d0fd>] bpf_map_update_value.isra.0+0x2bd/0x520
        [<ffffffffadc7349b>] map_update_elem+0x4cb/0x720
        [<ffffffffadc7d983>] __se_sys_bpf+0x8c3/0xb90
        [<ffffffffb029cc80>] do_syscall_64+0x30/0x40
        [<ffffffffb0400099>] entry_SYSCALL_64_after_hwframe+0x61/0xc6
    
    In the cpu_map_update_elem flow, when kthread_stop is called before
    calling the threadfn of rcpu->kthread, since the KTHREAD_SHOULD_STOP bit
    of kthread has been set by kthread_stop, the threadfn of rcpu->kthread
    will never be executed, and rcpu->refcnt will never be 0, which will
    lead to the allocated rcpu, rcpu->queue and rcpu->queue->queue cannot be
    released.
    
    Calling kthread_stop before executing kthread's threadfn will return
    -EINTR. We can complete the release of memory resources in this state.
    
    Fixes: 6710e11 ("bpf: introduce new bpf cpu map type BPF_MAP_TYPE_CPUMAP")
    Signed-off-by: Pu Lehui <[email protected]>
    Acked-by: Jesper Dangaard Brouer <[email protected]>
    Acked-by: Hou Tao <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Pu Lehui authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    b11a9b4 View commit details
    Browse the repository at this point in the history
  56. net/sched: flower: Ensure both minimum and maximum ports are specified

    [ Upstream commit d3f8727 ]
    
    The kernel does not currently validate that both the minimum and maximum
    ports of a port range are specified. This can lead user space to think
    that a filter matching on a port range was successfully added, when in
    fact it was not. For example, with a patched (buggy) iproute2 that only
    sends the minimum port, the following commands do not return an error:
    
     # tc filter add dev swp1 ingress pref 1 proto ip flower ip_proto udp src_port 100-200 action pass
    
     # tc filter add dev swp1 ingress pref 1 proto ip flower ip_proto udp dst_port 100-200 action pass
    
     # tc filter show dev swp1 ingress
     filter protocol ip pref 1 flower chain 0
     filter protocol ip pref 1 flower chain 0 handle 0x1
       eth_type ipv4
       ip_proto udp
       not_in_hw
             action order 1: gact action pass
              random type none pass val 0
              index 1 ref 1 bind 1
    
     filter protocol ip pref 1 flower chain 0 handle 0x2
       eth_type ipv4
       ip_proto udp
       not_in_hw
             action order 1: gact action pass
              random type none pass val 0
              index 2 ref 1 bind 1
    
    Fix by returning an error unless both ports are specified:
    
     # tc filter add dev swp1 ingress pref 1 proto ip flower ip_proto udp src_port 100-200 action pass
     Error: Both min and max source ports must be specified.
     We have an error talking to the kernel
    
     # tc filter add dev swp1 ingress pref 1 proto ip flower ip_proto udp dst_port 100-200 action pass
     Error: Both min and max destination ports must be specified.
     We have an error talking to the kernel
    
    Fixes: 5c72299 ("net: sched: cls_flower: Classify packets using port ranges")
    Signed-off-by: Ido Schimmel <[email protected]>
    Reviewed-by: Petr Machata <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    idosch authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    174cfa0 View commit details
    Browse the repository at this point in the history
  57. riscv: mm: fix truncation warning on RV32

    [ Upstream commit b690e26 ]
    
    lkp reports below sparse warning when building for RV32:
    arch/riscv/mm/init.c:1204:48: sparse: warning: cast truncates bits from
    constant value (100000000 becomes 0)
    
    IMO, the reason we didn't see this truncates bug in real world is "0"
    means MEMBLOCK_ALLOC_ACCESSIBLE in memblock and there's no RV32 HW
    with more than 4GB memory.
    
    Fix it anyway to make sparse happy.
    
    Fixes: decf89f ("riscv: try to allocate crashkern region from 32bit addressible memory")
    Signed-off-by: Jisheng Zhang <[email protected]>
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    xhackerustc authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1b125be View commit details
    Browse the repository at this point in the history
  58. netdevsim: fix uninitialized data in nsim_dev_trap_fa_cookie_write()

    [ Upstream commit f72207a ]
    
    The simple_write_to_buffer() function is designed to handle partial
    writes.  It returns negatives on error, otherwise it returns the number
    of bytes that were able to be copied.  This code doesn't check the
    return properly.  We only know that the first byte is written, the rest
    of the buffer might be uninitialized.
    
    There is no need to use the simple_write_to_buffer() function.
    Partial writes are prohibited by the "if (*ppos != 0)" check at the
    start of the function.  Just use memdup_user() and copy the whole
    buffer.
    
    Fixes: d3cbb90 ("netdevsim: add ACL trap reporting cookie as a metadata")
    Signed-off-by: Dan Carpenter <[email protected]>
    Reviewed-by: Pavan Chebbi <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dan Carpenter authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1c806e4 View commit details
    Browse the repository at this point in the history
  59. net/sched: make psched_mtu() RTNL-less safe

    [ Upstream commit 150e33e ]
    
    Eric Dumazet says[1]:
    -------
    Speaking of psched_mtu(), I see that net/sched/sch_pie.c is using it
    without holding RTNL, so dev->mtu can be changed underneath.
    KCSAN could issue a warning.
    -------
    
    Annotate dev->mtu with READ_ONCE() so KCSAN don't issue a warning.
    
    [1] https://lore.kernel.org/all/CANn89iJoJO5VtaJ-2=_d2aOQhb0Xw8iBT_Cxqp2HyuS-zj6azw@mail.gmail.com/
    
    v1 -> v2: Fix commit message
    
    Fixes: d4b3621 ("net: pkt_sched: PIE AQM scheme")
    Suggested-by: Eric Dumazet <[email protected]>
    Signed-off-by: Pedro Tammela <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tammela authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    3d1dc71 View commit details
    Browse the repository at this point in the history
  60. wifi: rtw89: debug: fix error code in rtw89_debug_priv_send_h2c_set()

    [ Upstream commit 4f4626c ]
    
    If there is a failure during rtw89_fw_h2c_raw() rtw89_debug_priv_send_h2c
    should return negative error code instead of a positive value count.
    Fix this bug by returning correct error code.
    
    Fixes: e3ec701 ("rtw89: add Realtek 802.11ax driver")
    Signed-off-by: Zhang Shurong <[email protected]>
    Acked-by: Ping-Ke Shih <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ZhangShurong authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    0aec8da View commit details
    Browse the repository at this point in the history
  61. net/sched: sch_qfq: refactor parsing of netlink parameters

    [ Upstream commit 2536989 ]
    
    Two parameters can be transformed into netlink policies and
    validated while parsing the netlink message.
    
    Reviewed-by: Simon Horman <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Signed-off-by: Pedro Tammela <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: 3e33708 ("net/sched: sch_qfq: account for stab overhead in qfq_enqueue")
    Signed-off-by: Sasha Levin <[email protected]>
    tammela authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    4b33836 View commit details
    Browse the repository at this point in the history
  62. net/sched: sch_qfq: account for stab overhead in qfq_enqueue

    [ Upstream commit 3e33708 ]
    
    Lion says:
    -------
    In the QFQ scheduler a similar issue to CVE-2023-31436
    persists.
    
    Consider the following code in net/sched/sch_qfq.c:
    
    static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                    struct sk_buff **to_free)
    {
         unsigned int len = qdisc_pkt_len(skb), gso_segs;
    
        // ...
    
         if (unlikely(cl->agg->lmax < len)) {
             pr_debug("qfq: increasing maxpkt from %u to %u for class %u",
                  cl->agg->lmax, len, cl->common.classid);
             err = qfq_change_agg(sch, cl, cl->agg->class_weight, len);
             if (err) {
                 cl->qstats.drops++;
                 return qdisc_drop(skb, sch, to_free);
             }
    
        // ...
    
         }
    
    Similarly to CVE-2023-31436, "lmax" is increased without any bounds
    checks according to the packet length "len". Usually this would not
    impose a problem because packet sizes are naturally limited.
    
    This is however not the actual packet length, rather the
    "qdisc_pkt_len(skb)" which might apply size transformations according to
    "struct qdisc_size_table" as created by "qdisc_get_stab()" in
    net/sched/sch_api.c if the TCA_STAB option was set when modifying the qdisc.
    
    A user may choose virtually any size using such a table.
    
    As a result the same issue as in CVE-2023-31436 can occur, allowing heap
    out-of-bounds read / writes in the kmalloc-8192 cache.
    -------
    
    We can create the issue with the following commands:
    
    tc qdisc add dev $DEV root handle 1: stab mtu 2048 tsize 512 mpu 0 \
    overhead 999999999 linklayer ethernet qfq
    tc class add dev $DEV parent 1: classid 1:1 htb rate 6mbit burst 15k
    tc filter add dev $DEV parent 1: matchall classid 1:1
    ping -I $DEV 1.1.1.2
    
    This is caused by incorrectly assuming that qdisc_pkt_len() returns a
    length within the QFQ_MIN_LMAX < len < QFQ_MAX_LMAX.
    
    Fixes: 462dbc9 ("pkt_sched: QFQ Plus: fair-queueing service at DRR cost")
    Reported-by: Lion <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Signed-off-by: Jamal Hadi Salim <[email protected]>
    Signed-off-by: Pedro Tammela <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tammela authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    70feebd View commit details
    Browse the repository at this point in the history
  63. nvme-pci: fix DMA direction of unmapping integrity data

    [ Upstream commit b8f6446 ]
    
    DMA direction should be taken in dma_unmap_page() for unmapping integrity
    data.
    
    Fix this DMA direction, and reported in Guangwu's test.
    
    Reported-by: Guangwu Zhang <[email protected]>
    Fixes: 4aedb70 ("nvme-pci: split metadata handling from nvme_map_data / nvme_unmap_data")
    Signed-off-by: Ming Lei <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ming Lei authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    bf2f2c0 View commit details
    Browse the repository at this point in the history
  64. fs/ntfs3: Check fields while reading

    commit 0e8235d upstream.
    
    Added new functions index_hdr_check and index_buf_check.
    Now we check all stuff for correctness while reading from disk.
    Also fixed bug with stale nfs data.
    
    Reported-by: van fantasy <[email protected]>
    Signed-off-by: Konstantin Komarov <[email protected]>
    Fixes: 82cae26 ("fs/ntfs3: Add initialization of super block")
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    aalexandrovich authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    000a9a7 View commit details
    Browse the repository at this point in the history
  65. ovl: let helper ovl_i_path_real() return the realinode

    [ Upstream commit b2dd05f ]
    
    Let helper ovl_i_path_real() return the realinode to prepare for
    checking non-null realinode in RCU walking path.
    
    [msz] Use d_inode_rcu() since we are depending on the consitency
    between dentry and inode being non-NULL in an RCU setting.
    
    There are some changes from upstream commit:
    1. Context conflicts caused by 73db6a0 ("ovl: port to
       vfs{g,u}id_t and associated helpers") is handled.
    
    Signed-off-by: Zhihao Cheng <[email protected]>
    Signed-off-by: Amir Goldstein <[email protected]>
    Fixes: ffa5723 ("ovl: store lower path in ovl_inode")
    Cc: <[email protected]> # v5.19
    Signed-off-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Zhihao Cheng authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    06b3f0b View commit details
    Browse the repository at this point in the history
  66. ovl: fix null pointer dereference in ovl_get_acl_rcu()

    [ Upstream commit f4e19e5 ]
    
    Following process:
             P1                     P2
     path_openat
      link_path_walk
       may_lookup
        inode_permission(rcu)
         ovl_permission
          acl_permission_check
           check_acl
            get_cached_acl_rcu
    	 ovl_get_inode_acl
    	  realinode = ovl_inode_real(ovl_inode)
    	                      drop_cache
    		               __dentry_kill(ovl_dentry)
    				iput(ovl_inode)
    		                 ovl_destroy_inode(ovl_inode)
    		                  dput(oi->__upperdentry)
    		                   dentry_kill(upperdentry)
    		                    dentry_unlink_inode
    				     upperdentry->d_inode = NULL
    	    ovl_inode_upper
    	     upperdentry = ovl_i_dentry_upper(ovl_inode)
    	     d_inode(upperdentry) // returns NULL
    	  IS_POSIXACL(realinode) // NULL pointer dereference
    , will trigger an null pointer dereference at realinode:
      [  205.472797] BUG: kernel NULL pointer dereference, address:
                     0000000000000028
      [  205.476701] CPU: 2 PID: 2713 Comm: ls Not tainted
                     6.3.0-12064-g2edfa098e750-dirty #1216
      [  205.478754] RIP: 0010:do_ovl_get_acl+0x5d/0x300
      [  205.489584] Call Trace:
      [  205.489812]  <TASK>
      [  205.490014]  ovl_get_inode_acl+0x26/0x30
      [  205.490466]  get_cached_acl_rcu+0x61/0xa0
      [  205.490908]  generic_permission+0x1bf/0x4e0
      [  205.491447]  ovl_permission+0x79/0x1b0
      [  205.491917]  inode_permission+0x15e/0x2c0
      [  205.492425]  link_path_walk+0x115/0x550
      [  205.493311]  path_lookupat.isra.0+0xb2/0x200
      [  205.493803]  filename_lookup+0xda/0x240
      [  205.495747]  vfs_fstatat+0x7b/0xb0
    
    Fetch a reproducer in [Link].
    
    Use the helper ovl_i_path_realinode() to get realinode and then do
    non-nullptr checking.
    
    There are some changes from upstream commit:
    1. Corrusponds to do_ovl_get_acl() in 6.1 is ovl_get_acl()
    2. Context conflicts caused by 6c0a8bf ("ovl: implement get acl
       method") is handled.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=217404
    Fixes: 332f606 ("ovl: enable RCU'd ->get_acl()")
    Cc: <[email protected]> # v5.15
    Signed-off-by: Zhihao Cheng <[email protected]>
    Suggested-by: Christian Brauner <[email protected]>
    Suggested-by: Amir Goldstein <[email protected]>
    Signed-off-by: Amir Goldstein <[email protected]>
    Signed-off-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Zhihao Cheng authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c4a5fb1 View commit details
    Browse the repository at this point in the history
  67. cifs: fix session state check in smb2_find_smb_ses

    commit 66be5c4 upstream.
    
    Chech the session state and skip it if it's exiting.
    
    Signed-off-by: Winston Wen <[email protected]>
    Reviewed-by: Shyam Prasad N <[email protected]>
    Cc: [email protected]
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    winnscode authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    40e2ed0 View commit details
    Browse the repository at this point in the history
  68. drm/client: Send hotplug event after registering a client

    commit 27655b9 upstream.
    
    Generate a hotplug event after registering a client to allow the
    client to configure its display. Remove the hotplug calls from the
    existing clients for fbdev emulation. This change fixes a concurrency
    bug between registering a client and receiving events from the DRM
    core. The bug is present in the fbdev emulation of all drivers.
    
    The fbdev emulation currently generates a hotplug event before
    registering the client to the device. For each new output, the DRM
    core sends an additional hotplug event to each registered client.
    
    If the DRM core detects first output between sending the artificial
    hotplug and registering the device, the output's hotplug event gets
    lost. If this is the first output, the fbdev console display remains
    dark. This has been observed with amdgpu and fbdev-generic.
    
    Fix this by adding hotplug generation directly to the client's
    register helper drm_client_register(). Registering the client and
    receiving events are serialized by struct drm_device.clientlist_mutex.
    So an output is either configured by the initial hotplug event, or
    the client has already been registered.
    
    The bug was originally added in commit 6e3f17e ("drm/fb-helper:
    generic: Call drm_client_add() after setup is done"), in which adding
    a client and receiving a hotplug event switched order. It was hidden,
    as most hardware and drivers have at least on static output configured.
    Other drivers didn't use the internal DRM client or still had struct
    drm_mode_config_funcs.output_poll_changed set. That callback handled
    hotplug events as well. After not setting the callback in amdgpu in
    commit 0e3172b ("drm/amdgpu: Don't set struct
    drm_driver.output_poll_changed"), amdgpu did not show a framebuffer
    console if output events got lost. The bug got copy-pasted from
    fbdev-generic into the other fbdev emulation.
    
    Reported-by: Moritz Duge <[email protected]>
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2649
    Fixes: 6e3f17e ("drm/fb-helper: generic: Call drm_client_add() after setup is done")
    Fixes: 8ab59da ("drm/fb-helper: Move generic fbdev emulation into separate source file")
    Fixes: b79fe9a ("drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers")
    Fixes: 63c3815 ("drm/armada: Implement fbdev emulation as in-kernel client")
    Fixes: 49953b7 ("drm/exynos: Implement fbdev emulation as in-kernel client")
    Fixes: 8f1aacc ("drm/gma500: Implement client-based fbdev emulation")
    Fixes: 940b869 ("drm/msm: Implement fbdev emulation as in-kernel client")
    Fixes: 9e69bcd ("drm/omapdrm: Implement fbdev emulation as in-kernel client")
    Fixes: e317a69 ("drm/radeon: Implement client-based fbdev emulation")
    Fixes: 71ec16f ("drm/tegra: Implement fbdev emulation as in-kernel client")
    Fixes: 0e3172b ("drm/amdgpu: Don't set struct drm_driver.output_poll_changed")
    Signed-off-by: Thomas Zimmermann <[email protected]>
    Tested-by: Moritz Duge <[email protected]>
    Tested-by: Torsten Krah <[email protected]>
    Tested-by: Paul Schyska <[email protected]>
    Cc: Daniel Vetter <[email protected]>
    Cc: David Airlie <[email protected]>
    Cc: Noralf Trønnes <[email protected]>
    Cc: Maarten Lankhorst <[email protected]>
    Cc: Maxime Ripard <[email protected]>
    Cc: Javier Martinez Canillas <[email protected]>
    Cc: Russell King <[email protected]>
    Cc: Inki Dae <[email protected]>
    Cc: Seung-Woo Kim <[email protected]>
    Cc: Kyungmin Park <[email protected]>
    Cc: Krzysztof Kozlowski <[email protected]>
    Cc: Patrik Jakobsson <[email protected]>
    Cc: Rob Clark <[email protected]>
    Cc: Abhinav Kumar <[email protected]>
    Cc: Dmitry Baryshkov <[email protected]>
    Cc: Tomi Valkeinen <[email protected]>
    Cc: Alex Deucher <[email protected]>
    Cc: "Christian König" <[email protected]>
    Cc: "Pan, Xinhui" <[email protected]>
    Cc: Thierry Reding <[email protected]>
    Cc: Mikko Perttunen <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]
    Cc: <[email protected]> # v5.2+
    Reviewed-by: Javier Martinez Canillas <[email protected]>
    Reviewed-by: Dmitry Baryshkov <[email protected]> # msm
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 27655b9)
    [ Dropped changes to drivers/gpu/drm/armada/armada_fbdev.c as
      174c3c3 drm/armada: Initialize fbdev DRM client
      was introduced in 6.5-rc1.
    
      Dropped changes to exynos, msm, omapdrm, radeon, tegra drivers
      as missing code these commits introduced:
    
      9928648 drm/exynos: Initialize fbdev DRM client
      841ef55 drm/msm: Initialize fbdev DRM client
      9e69bcd drm/omapdrm: Implement fbdev emulation as in-kernel client
      e317a69 drm/radeon: Implement client-based fbdev emulation
      9b926bc drm/radeon: Only build fbdev if DRM_FBDEV_EMULATION is set
      25dda38 drm/tegra: Initialize fbdev DRM client
      8f1aacc drm/gma500: Implement client-based fbdev emulation
      b79fe9a drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers
    
      Move code for drm-fbdev-generic.c to matching file in 6.1.y because
      these commits haven't happened in 6.1.y.
      8ab59da drm/fb-helper: Move generic fbdev emulation into separate source file
      b9c93f4 drm/fbdev-generic: Rename symbols ]
    Cc: [email protected]
    Link: https://lore.kernel.org/stable/SJ0PR84MB20882EEA1ABB36F60E845E378F5AA@SJ0PR84MB2088.NAMPRD84.PROD.OUTLOOK.COM/
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Thomas Zimmermann authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    7c88018 View commit details
    Browse the repository at this point in the history
  69. drm/amdgpu/sdma4: set align mask to 255

    commit e5df16d upstream.
    
    The wptr needs to be incremented at at least 64 dword intervals,
    use 256 to align with windows.  This should fix potential hangs
    with unaligned updates.
    
    Reviewed-by: Felix Kuehling <[email protected]>
    Reviewed-by: Aaron Liu <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit e5df16d)
    The path `drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c` doesn't exist in
    6.1.y, only modify the file that does exist.
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    alexdeucher authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    4596c81 View commit details
    Browse the repository at this point in the history
  70. drm/amd/pm: revise the ASPM settings for thunderbolt attached scenario

    commit fd21987 upstream.
    
    Also, correct the comment for NAVI10_PCIE__LC_L1_INACTIVITY_TBT_DEFAULT
    as 0x0000000E stands for 400ms instead of 4ms.
    
    Signed-off-by: Evan Quan <[email protected]>
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Evan Quan authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c8c703b View commit details
    Browse the repository at this point in the history
  71. drm/amdgpu: add the fan abnormal detection feature

    commit ef5fca9 upstream.
    
    Update the SW CTF limit from existing register
    when there's a fan failure detected via SMU interrupt.
    
    Signed-off-by: lyndonli <[email protected]>
    Reviewed-by: Hawking Zhang <[email protected]>
    Reviewed-by: Kenneth Feng <[email protected]>
    Reviewed-by: Evan Quan <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    lyndonli authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d7d53c6 View commit details
    Browse the repository at this point in the history
  72. drm/amdgpu: Fix minmax warning

    commit abd5173 upstream.
    
    Fix minmax warning by using min_t() macro and explicitly specifying
    the assignment type.
    
    Cc: Alex Deucher <[email protected]>
    Signed-off-by: Luben Tuikov <[email protected]>
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Luben Tuikov authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    e8b6b7b View commit details
    Browse the repository at this point in the history
  73. drm/amd/pm: add abnormal fan detection for smu 13.0.0

    commit 2da0036 upstream.
    
    add abnormal fan detection for smu 13.0.0
    
    Signed-off-by: Kenneth Feng <[email protected]>
    Reviewed-by: Evan Quan <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Kenneth Feng authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    13e8af9 View commit details
    Browse the repository at this point in the history
  74. f2fs: fix the wrong condition to determine atomic context

    commit 633c8b9 upstream.
    
    Should use !in_task for irq context.
    
    Cc: [email protected]
    Fixes: 1aa161e ("f2fs: fix scheduling while atomic in decompression path")
    Reviewed-by: Chao Yu <[email protected]>
    Signed-off-by: Jaegeuk Kim <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Jaegeuk Kim authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2cb10f4 View commit details
    Browse the repository at this point in the history
  75. f2fs: fix deadlock in i_xattr_sem and inode page lock

    commit 5eda1ad upstream.
    
    Thread #1:
    
    [122554.641906][   T92]  f2fs_getxattr+0xd4/0x5fc
        -> waiting for f2fs_down_read(&F2FS_I(inode)->i_xattr_sem);
    
    [122554.641927][   T92]  __f2fs_get_acl+0x50/0x284
    [122554.641948][   T92]  f2fs_init_acl+0x84/0x54c
    [122554.641969][   T92]  f2fs_init_inode_metadata+0x460/0x5f0
    [122554.641990][   T92]  f2fs_add_inline_entry+0x11c/0x350
        -> Locked dir->inode_page by f2fs_get_node_page()
    
    [122554.642009][   T92]  f2fs_do_add_link+0x100/0x1e4
    [122554.642025][   T92]  f2fs_create+0xf4/0x22c
    [122554.642047][   T92]  vfs_create+0x130/0x1f4
    
    Thread #2:
    
    [123996.386358][   T92]  __get_node_page+0x8c/0x504
        -> waiting for dir->inode_page lock
    
    [123996.386383][   T92]  read_all_xattrs+0x11c/0x1f4
    [123996.386405][   T92]  __f2fs_setxattr+0xcc/0x528
    [123996.386424][   T92]  f2fs_setxattr+0x158/0x1f4
        -> f2fs_down_write(&F2FS_I(inode)->i_xattr_sem);
    
    [123996.386443][   T92]  __f2fs_set_acl+0x328/0x430
    [123996.386618][   T92]  f2fs_set_acl+0x38/0x50
    [123996.386642][   T92]  posix_acl_chmod+0xc8/0x1c8
    [123996.386669][   T92]  f2fs_setattr+0x5e0/0x6bc
    [123996.386689][   T92]  notify_change+0x4d8/0x580
    [123996.386717][   T92]  chmod_common+0xd8/0x184
    [123996.386748][   T92]  do_fchmodat+0x60/0x124
    [123996.386766][   T92]  __arm64_sys_fchmodat+0x28/0x3c
    
    Cc: <[email protected]>
    Fixes: 27161f1 "f2fs: avoid race in between read xattr & write xattr"
    Reviewed-by: Chao Yu <[email protected]>
    Signed-off-by: Jaegeuk Kim <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Jaegeuk Kim authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    a996fec View commit details
    Browse the repository at this point in the history
  76. pinctrl: amd: Add Z-state wake control bits

    commit df72b4a upstream.
    
    GPIO registers include Bit 27 for WakeCntrlZ used to enable wake in
    Z state. Hence add Z-state wake control bits to debugfs output to
    debug and analyze Z-states problems.
    
    Signed-off-by: Basavaraj Natikar <[email protected]>
    Suggested-by: Mario Limonciello <[email protected]>
    Tested-by: Guruvendra Punugupati <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Basavaraj Natikar authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    03590f9 View commit details
    Browse the repository at this point in the history
  77. pinctrl: amd: Adjust debugfs output

    commit 75358cf upstream.
    
    More fields are to be added, so to keep the display from being
    too busy, adjust it.
    
    1) Add a header to all columns
    2) Except for interrupt, when fields have no data show empty
    3) Remove otherwise blank whitespace
    
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    a56afed View commit details
    Browse the repository at this point in the history
  78. pinctrl: amd: Add fields for interrupt status and wake status

    commit 010f493 upstream.
    
    If the firmware has misconfigured a GPIO it may cause interrupt
    status or wake status bits to be set and not asserted. Add these
    to debug output to catch this case.
    
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    4484ce0 View commit details
    Browse the repository at this point in the history
  79. pinctrl: amd: Detect internal GPIO0 debounce handling

    commit 968ab92 upstream.
    
    commit 4e5a04b ("pinctrl: amd: disable and mask interrupts on probe")
    had a mistake in loop iteration 63 that it would clear offset 0xFC instead
    of 0x100.  Offset 0xFC is actually `WAKE_INT_MASTER_REG`.  This was
    clearing bits 13 and 15 from the register which significantly changed the
    expected handling for some platforms for GPIO0.
    
    commit b26cd93 ("pinctrl: amd: Disable and mask interrupts on resume")
    actually fixed this bug, but lead to regressions on Lenovo Z13 and some
    other systems.  This is because there was no handling in the driver for bit
    15 debounce behavior.
    
    Quoting a public BKDG:
    ```
    EnWinBlueBtn. Read-write. Reset: 0. 0=GPIO0 detect debounced power button;
    Power button override is 4 seconds. 1=GPIO0 detect debounced power button
    in S3/S5/S0i3, and detect "pressed less than 2 seconds" and "pressed 2~10
    seconds" in S0; Power button override is 10 seconds
    ```
    
    Cross referencing the same master register in Windows it's obvious that
    Windows doesn't use debounce values in this configuration.  So align the
    Linux driver to do this as well.  This fixes wake on lid when
    WAKE_INT_MASTER_REG is properly programmed.
    
    Cc: [email protected]
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=217315
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    8a2d8e1 View commit details
    Browse the repository at this point in the history
  80. pinctrl: amd: Fix mistake in handling clearing pins at startup

    commit a855724 upstream.
    
    commit 4e5a04b ("pinctrl: amd: disable and mask interrupts on probe")
    had a mistake in loop iteration 63 that it would clear offset 0xFC instead
    of 0x100.  Offset 0xFC is actually `WAKE_INT_MASTER_REG`.  This was
    clearing bits 13 and 15 from the register which significantly changed the
    expected handling for some platforms for GPIO0.
    
    Cc: [email protected]
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=217315
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1516518 View commit details
    Browse the repository at this point in the history
  81. pinctrl: amd: Detect and mask spurious interrupts

    commit 0cf9e48 upstream.
    
    Leverage gpiochip_line_is_irq to check whether a pin has an irq
    associated with it. The previous check ("irq == 0") didn't make much
    sense. The irq variable refers to the pinctrl irq, and has nothing do to
    with an individual pin.
    
    On some systems, during suspend/resume cycle, the firmware leaves
    an interrupt enabled on a pin that is not used by the kernel.
    Without this patch that caused an interrupt storm.
    
    Cc: [email protected]
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=217315
    Signed-off-by: Kornel Dulęba <[email protected]>
    Reviewed-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Kornel Dulęba authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1cd1a01 View commit details
    Browse the repository at this point in the history
  82. pinctrl: amd: Revert "pinctrl: amd: disable and mask interrupts on pr…

    …obe"
    
    commit 65f6c7c upstream.
    
    commit 4e5a04b ("pinctrl: amd: disable and mask interrupts on probe")
    was well intentioned to mask a firmware issue on a surface laptop, but it
    has a few problems:
    1. It had a bug in the loop handling for iteration 63 that lead to other
       problems with GPIO0 handling.
    2. It disables interrupts that are used internally by the SOC but masked
       by default.
    3. It masked a real firmware problem in some chromebooks that should have
       been caught during development but wasn't.
    
    There has been a lot of other development around s2idle; particularly
    around handling of the spurious wakeups.  If there is still a problem on
    the original reported surface laptop it should be avoided by adding a quirk
    to gpiolib-acpi for that system instead.
    
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    57f6d48 View commit details
    Browse the repository at this point in the history
  83. pinctrl: amd: Only use special debounce behavior for GPIO 0

    commit 0d5ace1 upstream.
    
    It's uncommon to use debounce on any other pin, but technically
    we should only set debounce to 0 when working off GPIO0.
    
    Cc: [email protected]
    Tested-by: Jan Visser <[email protected]>
    Fixes: 968ab92 ("pinctrl: amd: Detect internal GPIO0 debounce handling")
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    3cadcab View commit details
    Browse the repository at this point in the history
  84. pinctrl: amd: Use amd_pinconf_set() for all config options

    commit 635a750 upstream.
    
    On ASUS TUF A16 it is reported that the ITE5570 ACPI device connected to
    GPIO 7 is causing an interrupt storm.  This issue doesn't happen on
    Windows.
    
    Comparing the GPIO register configuration between Windows and Linux
    bit 20 has been configured as a pull up on Windows, but not on Linux.
    Checking GPIO declaration from the firmware it is clear it *should* have
    been a pull up on Linux as well.
    
    ```
    GpioInt (Level, ActiveLow, Exclusive, PullUp, 0x0000,
    	 "\\_SB.GPIO", 0x00, ResourceConsumer, ,)
    {   // Pin list
    0x0007
    }
    ```
    
    On Linux amd_gpio_set_config() is currently only used for programming
    the debounce. Actually the GPIO core calls it with all the arguments
    that are supported by a GPIO, pinctrl-amd just responds `-ENOTSUPP`.
    
    To solve this issue expand amd_gpio_set_config() to support the other
    arguments amd_pinconf_set() supports, namely `PIN_CONFIG_BIAS_PULL_DOWN`,
    `PIN_CONFIG_BIAS_PULL_UP`, and `PIN_CONFIG_DRIVE_STRENGTH`.
    
    Reported-by: Nik P <[email protected]>
    Reported-by: Nathan Schulte <[email protected]>
    Reported-by: Friedrich Vock <[email protected]>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217336
    Reported-by: [email protected]
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217493
    Link: https://lore.kernel.org/linux-input/[email protected]/
    Tested-by: Jan Visser <[email protected]>
    Fixes: 2956b5d ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips")
    Signed-off-by: Mario Limonciello <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    326b3f1 View commit details
    Browse the repository at this point in the history
  85. pinctrl: amd: Drop pull up select configuration

    commit 3f62312 upstream.
    
    pinctrl-amd currently tries to program bit 19 of all GPIOs to select
    either a 4kΩ or 8hΩ pull up, but this isn't what bit 19 does.  Bit
    19 is marked as reserved, even in the latest platforms documentation.
    
    Drop this programming functionality.
    
    Tested-by: Jan Visser <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    dce19c9 View commit details
    Browse the repository at this point in the history
  86. pinctrl: amd: Unify debounce handling into amd_pinconf_set()

    commit 283c5ce upstream.
    
    Debounce handling is done in two different entry points in the driver.
    Unify this to make sure that it's always handled the same.
    
    Tested-by: Jan Visser <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    6d84885 View commit details
    Browse the repository at this point in the history
  87. tpm: Do not remap from ACPI resources again for Pluton TPM

    commit b1c1b98 upstream.
    
    For Pluton TPM devices, it was assumed that there was no ACPI memory
    regions. This is not true for ASUS ROG Ally. ACPI advertises
    0xfd500000-0xfd5fffff.
    
    Since remapping is already done in `crb_map_pluton`, remapping again
    in `crb_map_io` causes EBUSY error:
    
    [    3.510453] tpm_crb MSFT0101:00: can't request region for resource [mem 0xfd500000-0xfd5fffff]
    [    3.510463] tpm_crb: probe of MSFT0101:00 failed with error -16
    
    Cc: [email protected] # v6.3+
    Fixes: 4d27328 ("tpm_crb: Add support for CRB devices based on Pluton")
    Signed-off-by: Valentin David <[email protected]>
    Reviewed-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    valentindavid authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    0028313 View commit details
    Browse the repository at this point in the history
  88. tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation

    commit f4032d6 upstream.
    
    /dev/vtpmx is made visible before 'workqueue' is initialized, which can
    lead to a memory corruption in the worst case scenario.
    
    Address this by initializing 'workqueue' as the very first step of the
    driver initialization.
    
    Cc: [email protected]
    Fixes: 6f99612 ("tpm: Proxy driver for supporting multiple emulated TPMs")
    Reviewed-by: Stefan Berger <[email protected]>
    Signed-off-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Jarkko Sakkinen authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    99b998f View commit details
    Browse the repository at this point in the history
  89. tpm: tis_i2c: Limit read bursts to I2C_SMBUS_BLOCK_MAX (32) bytes

    commit f3b70b6 upstream.
    
    Underlying I2C bus drivers not always support longer transfers and
    imx-lpi2c for instance doesn't. SLB 9673 offers 427-bytes packets.
    
    Visible symptoms are:
    
    tpm tpm0: Error left over data
    tpm tpm0: tpm_transmit: tpm_recv: error -5
    tpm_tis_i2c: probe of 1-002e failed with error -5
    
    Cc: [email protected] # v5.20+
    Fixes: bbc23a0 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
    Tested-by: Michael Haener <[email protected]>
    Signed-off-by: Alexander Sverdlin <[email protected]>
    Reviewed-by: Jarkko Sakkinen <[email protected]>
    Reviewed-by: Jerry Snitselaar <[email protected]>
    Signed-off-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ccpalex authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    f5a734a View commit details
    Browse the repository at this point in the history
  90. tpm: tis_i2c: Limit write bursts to I2C_SMBUS_BLOCK_MAX (32) bytes

    commit 83e7e5d upstream.
    
    Underlying I2C bus drivers not always support longer transfers and
    imx-lpi2c for instance doesn't. The fix is symmetric to previous patch
    which fixed the read direction.
    
    Cc: [email protected] # v5.20+
    Fixes: bbc23a0 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
    Tested-by: Michael Haener <[email protected]>
    Signed-off-by: Alexander Sverdlin <[email protected]>
    Reviewed-by: Jarkko Sakkinen <[email protected]>
    Reviewed-by: Jerry Snitselaar <[email protected]>
    Signed-off-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ccpalex authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ad24970 View commit details
    Browse the repository at this point in the history
  91. tpm: return false from tpm_amd_is_rng_defective on non-x86 platforms

    commit ecff681 upstream.
    
    tpm_amd_is_rng_defective is for dealing with an issue related to the
    AMD firmware TPM, so on non-x86 architectures just have it inline and
    return false.
    
    Cc: [email protected] # v6.3+
    Reported-by: Sachin Sant <[email protected]>
    Reported-by: Aneesh Kumar K. V <[email protected]>
    Closes: https://lore.kernel.org/lkml/[email protected]/
    Fixes: f1324bb ("tpm: disable hwrng for fTPM on some AMD designs")
    Signed-off-by: Jerry Snitselaar <[email protected]>
    Reviewed-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Jarkko Sakkinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    snits authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    bb4e824 View commit details
    Browse the repository at this point in the history
  92. mtd: rawnand: meson: fix unaligned DMA buffers handling

    commit 98480a1 upstream.
    
    Meson NAND controller requires 8 bytes alignment for DMA addresses,
    otherwise it "aligns" passed address by itself thus accessing invalid
    location in the provided buffer. This patch makes unaligned buffers to
    be reallocated to become valid.
    
    Fixes: 8fae856 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
    Cc: <[email protected]>
    Signed-off-by: Arseniy Krasnov <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/linux-mtd/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Arseniy Krasnov authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    de67dad View commit details
    Browse the repository at this point in the history
  93. net: bcmgenet: Ensure MDIO unregistration has clocks enabled

    commit 1b5ea7f upstream.
    
    With support for Ethernet PHY LEDs having been added, while
    unregistering a MDIO bus and its child device liks PHYs there may be
    "late" accesses to the MDIO bus. One typical use case is setting the PHY
    LEDs brightness to OFF for instance.
    
    We need to ensure that the MDIO bus controller remains entirely
    functional since it runs off the main GENET adapter clock.
    
    Cc: [email protected]
    Link: https://lore.kernel.org/all/[email protected]/
    Fixes: 9a4e796 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver")
    Signed-off-by: Florian Fainelli <[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]>
    ffainelli authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    eac0aac View commit details
    Browse the repository at this point in the history
  94. net: phy: dp83td510: fix kernel stall during netboot in DP83TD510E PH…

    …Y driver
    
    commit fc06493 upstream.
    
    Fix an issue where the kernel would stall during netboot, showing the
    "sched: RT throttling activated" message. This stall was triggered by
    the behavior of the mii_interrupt bit (Bit 7 - DP83TD510E_STS_MII_INT)
    in the DP83TD510E's PHY_STS Register (Address = 0x10). The DP83TD510E
    datasheet (2020) states that the bit clears on write, however, in
    practice, the bit clears on read.
    
    This discrepancy had significant implications on the driver's interrupt
    handling. The PHY_STS Register was used by handle_interrupt() to check
    for pending interrupts and by read_status() to get the current link
    status. The call to read_status() was unintentionally clearing the
    mii_interrupt status bit without deasserting the IRQ pin, causing
    handle_interrupt() to miss other pending interrupts. This issue was most
    apparent during netboot.
    
    The fix refrains from using the PHY_STS Register for interrupt handling.
    Instead, we now solely rely on the INTERRUPT_REG_1 Register (Address =
    0x12) and INTERRUPT_REG_2 Register (Address = 0x13) for this purpose.
    These registers directly influence the IRQ pin state and are latched
    high until read.
    
    Note: The INTERRUPT_REG_2 Register (Address = 0x13) exists and can also
    be used for interrupt handling, specifically for "Aneg page received
    interrupt" and "Polarity change interrupt". However, these features are
    currently not supported by this driver.
    
    Fixes: 165cd04 ("net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY")
    Cc: <[email protected]>
    Signed-off-by: Oleksij Rempel <[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]>
    olerem authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    6d80684 View commit details
    Browse the repository at this point in the history
  95. kasan: add kasan_tag_mismatch prototype

    commit fb646a4 upstream.
    
    The kasan sw-tags implementation contains one function that is only called
    from assembler and has no prototype in a header.  This causes a W=1
    warning:
    
    mm/kasan/sw_tags.c:171:6: warning: no previous prototype for 'kasan_tag_mismatch' [-Wmissing-prototypes]
      171 | void kasan_tag_mismatch(unsigned long addr, unsigned long access_info,
    
    Add a prototype in the local header to get a clean build.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    Cc: Alexander Potapenko <[email protected]>
    Cc: Andrey Konovalov <[email protected]>
    Cc: Andrey Ryabinin <[email protected]>
    Cc: Dmitry Vyukov <[email protected]>
    Cc: Marco Elver <[email protected]>
    Cc: Vincenzo Frascino <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    arndb authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    a433634 View commit details
    Browse the repository at this point in the history
  96. tracing/user_events: Fix incorrect return value for writing operation…

    … when events are disabled
    
    commit f6d026e upstream.
    
    The writing operation return the count of writes regardless of whether events
    are enabled or disabled. Switch it to return -EBADF to indicates that the event
    is disabled.
    
    Link: https://lkml.kernel.org/r/[email protected]
    
    Cc: [email protected]
    7f5a08c ("user_events: Add minimal support for trace_event into ftrace")
    Acked-by: Beau Belgrave <[email protected]>
    Signed-off-by: sunliming <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sunliming authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    5aea2ac View commit details
    Browse the repository at this point in the history
  97. powerpc: Fail build if using recordmcount with binutils v2.37

    commit 25ea739 upstream.
    
    binutils v2.37 drops unused section symbols, which prevents recordmcount
    from capturing mcount locations in sections that have no non-weak
    symbols. This results in a build failure with a message such as:
    	Cannot find symbol for section 12: .text.perf_callchain_kernel.
    	kernel/events/callchain.o: failed
    
    The change to binutils was reverted for v2.38, so this behavior is
    specific to binutils v2.37:
    https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c09c8b42021180eee9495bd50d8b35e683d3901b
    
    Objtool is able to cope with such sections, so this issue is specific to
    recordmcount.
    
    Fail the build and print a warning if binutils v2.37 is detected and if
    we are using recordmcount.
    
    Cc: [email protected]
    Suggested-by: Joel Stanley <[email protected]>
    Signed-off-by: Naveen N Rao <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rnav authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    16eceb3 View commit details
    Browse the repository at this point in the history
  98. misc: fastrpc: Create fastrpc scalar with correct buffer count

    commit 0b4e32d upstream.
    
    A process can spawn a PD on DSP with some attributes that can be
    associated with the PD during spawn and run. The invocation
    corresponding to the create request with attributes has total
    4 buffers at the DSP side implementation. If this number is not
    correct, the invocation is expected to fail on DSP. Added change
    to use correct number of buffer count for creating fastrpc scalar.
    
    Fixes: d73f71c ("misc: fastrpc: Add support for create remote init process")
    Cc: stable <[email protected]>
    Tested-by: Ekansh Gupta <[email protected]>
    Signed-off-by: Ekansh Gupta <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    quic-ekangupt authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    23ab732 View commit details
    Browse the repository at this point in the history
  99. powerpc/security: Fix Speculation_Store_Bypass reporting on Power10

    commit 5bcedc5 upstream.
    
    Nageswara reported that /proc/self/status was showing "vulnerable" for
    the Speculation_Store_Bypass feature on Power10, eg:
    
      $ grep Speculation_Store_Bypass: /proc/self/status
      Speculation_Store_Bypass:       vulnerable
    
    But at the same time the sysfs files, and lscpu, were showing "Not
    affected".
    
    This turns out to simply be a bug in the reporting of the
    Speculation_Store_Bypass, aka. PR_SPEC_STORE_BYPASS, case.
    
    When SEC_FTR_STF_BARRIER was added, so that firmware could communicate
    the vulnerability was not present, the code in ssb_prctl_get() was not
    updated to check the new flag.
    
    So add the check for SEC_FTR_STF_BARRIER being disabled. Rather than
    adding the new check to the existing if block and expanding the comment
    to cover both cases, rewrite the three cases to be separate so they can
    be commented separately for clarity.
    
    Fixes: 84ed26f ("powerpc/security: Add a security feature for STF barrier")
    Cc: [email protected] # v5.14+
    Reported-by: Nageswara R Sastry <[email protected]>
    Tested-by: Nageswara R Sastry <[email protected]>
    Reviewed-by: Russell Currey <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mpe authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    484b8fb View commit details
    Browse the repository at this point in the history
  100. powerpc/64s: Fix native_hpte_remove() to be irq-safe

    commit 8bbe9fe upstream.
    
    Lockdep warns that the use of the hpte_lock in native_hpte_remove() is
    not safe against an IRQ coming in:
    
      ================================
      WARNING: inconsistent lock state
      6.4.0-rc2-g0c54f4d30ecc #1 Not tainted
      --------------------------------
      inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
      qemu-system-ppc/93865 [HC0[0]:SC0[0]:HE1:SE1] takes:
      c0000000021f5180 (hpte_lock){+.?.}-{0:0}, at: native_lock_hpte+0x8/0xd0
      {IN-SOFTIRQ-W} state was registered at:
        lock_acquire+0x134/0x3f0
        native_lock_hpte+0x44/0xd0
        native_hpte_insert+0xd4/0x2a0
        __hash_page_64K+0x218/0x4f0
        hash_page_mm+0x464/0x840
        do_hash_fault+0x11c/0x260
        data_access_common_virt+0x210/0x220
        __ip_select_ident+0x140/0x150
        ...
        net_rx_action+0x3bc/0x440
        __do_softirq+0x180/0x534
        ...
        sys_sendmmsg+0x34/0x50
        system_call_exception+0x128/0x320
        system_call_common+0x160/0x2e4
      ...
       Possible unsafe locking scenario:
    
             CPU0
             ----
        lock(hpte_lock);
        <Interrupt>
          lock(hpte_lock);
    
       *** DEADLOCK ***
      ...
      Call Trace:
        dump_stack_lvl+0x98/0xe0 (unreliable)
        print_usage_bug.part.0+0x250/0x278
        mark_lock+0xc9c/0xd30
        __lock_acquire+0x440/0x1ca0
        lock_acquire+0x134/0x3f0
        native_lock_hpte+0x44/0xd0
        native_hpte_remove+0xb0/0x190
        kvmppc_mmu_map_page+0x650/0x698 [kvm_pr]
        kvmppc_handle_pagefault+0x534/0x6e8 [kvm_pr]
        kvmppc_handle_exit_pr+0x6d8/0xe90 [kvm_pr]
        after_sprg3_load+0x80/0x90 [kvm_pr]
        kvmppc_vcpu_run_pr+0x108/0x270 [kvm_pr]
        kvmppc_vcpu_run+0x34/0x48 [kvm]
        kvm_arch_vcpu_ioctl_run+0x340/0x470 [kvm]
        kvm_vcpu_ioctl+0x338/0x8b8 [kvm]
        sys_ioctl+0x7c4/0x13e0
        system_call_exception+0x128/0x320
        system_call_common+0x160/0x2e4
    
    I suspect kvm_pr is the only caller that doesn't already have IRQs
    disabled, which is why this hasn't been reported previously.
    
    Fix it by disabling IRQs in native_hpte_remove().
    
    Fixes: 35159b5 ("powerpc/64s: make HPTE lock and native_tlbie_lock irq-safe")
    Cc: [email protected] # v6.1+
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mpe authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    58d1c81 View commit details
    Browse the repository at this point in the history
  101. MIPS: Loongson: Fix cpu_probe_loongson() again

    commit 65fee01 upstream.
    
    Commit 7db5e9e ("MIPS: loongson64: fix FTLB configuration")
    move decode_configs() from the beginning of cpu_probe_loongson() to the
    end in order to fix FTLB configuration. However, it breaks the CPUCFG
    decoding because decode_configs() use "c->options = xxxx" rather than
    "c->options |= xxxx", all information get from CPUCFG by decode_cpucfg()
    is lost.
    
    This causes error when creating a KVM guest on Loongson-3A4000:
    Exception Code: 4 not handled @ PC: 0000000087ad5981, inst: 0xcb7a1898 BadVaddr: 0x0 Status: 0x0
    
    Fix this by moving the c->cputype setting to the beginning and moving
    decode_configs() after that.
    
    Fixes: 7db5e9e ("MIPS: loongson64: fix FTLB configuration")
    Cc: [email protected]
    Cc: Huang Pei <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    chenhuacai authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d56b7a4 View commit details
    Browse the repository at this point in the history
  102. MIPS: KVM: Fix NULL pointer dereference

    commit e4de205 upstream.
    
    After commit 45c7e8a ("MIPS: Remove KVM_TE support") we
    get a NULL pointer dereference when creating a KVM guest:
    
    [  146.243409] Starting KVM with MIPS VZ extensions
    [  149.849151] CPU 3 Unable to handle kernel paging request at virtual address 0000000000000300, epc == ffffffffc06356ec, ra == ffffffffc063568c
    [  149.849177] Oops[#1]:
    [  149.849182] CPU: 3 PID: 2265 Comm: qemu-system-mip Not tainted 6.4.0-rc3+ #1671
    [  149.849188] Hardware name: THTF CX TL630 Series/THTF-LS3A4000-7A1000-ML4A, BIOS KL4.1F.TF.D.166.201225.R 12/25/2020
    [  149.849192] $ 0   : 0000000000000000 000000007400cce0 0000000000400004 ffffffff8119c740
    [  149.849209] $ 4   : 000000007400cce1 000000007400cce1 0000000000000000 0000000000000000
    [  149.849221] $ 8   : 000000240058bb36 ffffffff81421ac0 0000000000000000 0000000000400dc0
    [  149.849233] $12   : 9800000102a07cc8 ffffffff80e40e38 0000000000000001 0000000000400dc0
    [  149.849245] $16   : 0000000000000000 9800000106cd0000 9800000106cd0000 9800000100cce000
    [  149.849257] $20   : ffffffffc0632b28 ffffffffc05b31b0 9800000100ccca00 0000000000400000
    [  149.849269] $24   : 9800000106cd09ce ffffffff802f69d0
    [  149.849281] $28   : 9800000102a04000 9800000102a07cd0 98000001106a8000 ffffffffc063568c
    [  149.849293] Hi    : 00000335b2111e66
    [  149.849295] Lo    : 6668d90061ae0ae9
    [  149.849298] epc   : ffffffffc06356ec kvm_vz_vcpu_setup+0xc4/0x328 [kvm]
    [  149.849324] ra    : ffffffffc063568c kvm_vz_vcpu_setup+0x64/0x328 [kvm]
    [  149.849336] Status: 7400cce3 KX SX UX KERNEL EXL IE
    [  149.849351] Cause : 1000000c (ExcCode 03)
    [  149.849354] BadVA : 0000000000000300
    [  149.849357] PrId  : 0014c004 (ICT Loongson-3)
    [  149.849360] Modules linked in: kvm nfnetlink_queue nfnetlink_log nfnetlink fuse sha256_generic libsha256 cfg80211 rfkill binfmt_misc vfat fat snd_hda_codec_hdmi input_leds led_class snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hda_core snd_pcm snd_timer snd serio_raw xhci_pci radeon drm_suballoc_helper drm_display_helper xhci_hcd ip_tables x_tables
    [  149.849432] Process qemu-system-mip (pid: 2265, threadinfo=00000000ae2982d2, task=0000000038e09ad4, tls=000000ffeba16030)
    [  149.849439] Stack : 9800000000000003 9800000100ccca00 9800000100ccc000 ffffffffc062cef4
    [  149.849453]         9800000102a07d18 c89b63a7ab338e00 0000000000000000 ffffffff811a0000
    [  149.849465]         0000000000000000 9800000106cd0000 ffffffff80e59938 98000001106a8920
    [  149.849476]         ffffffff80e57f30 ffffffffc062854c ffffffff811a0000 9800000102bf4240
    [  149.849488]         ffffffffc05b0000 ffffffff80e3a798 000000ff78000000 000000ff78000010
    [  149.849500]         0000000000000255 98000001021f7de0 98000001023f0078 ffffffff81434000
    [  149.849511]         0000000000000000 0000000000000000 9800000102ae0000 980000025e92ae28
    [  149.849523]         0000000000000000 c89b63a7ab338e00 0000000000000001 ffffffff8119dce0
    [  149.849535]         000000ff78000010 ffffffff804f3d3c 9800000102a07eb0 0000000000000255
    [  149.849546]         0000000000000000 ffffffff8049460c 000000ff78000010 0000000000000255
    [  149.849558]         ...
    [  149.849565] Call Trace:
    [  149.849567] [<ffffffffc06356ec>] kvm_vz_vcpu_setup+0xc4/0x328 [kvm]
    [  149.849586] [<ffffffffc062cef4>] kvm_arch_vcpu_create+0x184/0x228 [kvm]
    [  149.849605] [<ffffffffc062854c>] kvm_vm_ioctl+0x64c/0xf28 [kvm]
    [  149.849623] [<ffffffff805209c0>] sys_ioctl+0xc8/0x118
    [  149.849631] [<ffffffff80219eb0>] syscall_common+0x34/0x58
    
    The root cause is the deletion of kvm_mips_commpage_init() leaves vcpu
    ->arch.cop0 NULL. So fix it by making cop0 from a pointer to an embedded
    object.
    
    Fixes: 45c7e8a ("MIPS: Remove KVM_TE support")
    Cc: [email protected]
    Reported-by: Yu Zhao <[email protected]>
    Suggested-by: Thomas Bogendoerfer <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    chenhuacai authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    bd9cf2a View commit details
    Browse the repository at this point in the history
  103. ext4: Fix reusing stale buffer heads from last failed mounting

    commit 26fb529 upstream.
    
    Following process makes ext4 load stale buffer heads from last failed
    mounting in a new mounting operation:
    mount_bdev
     ext4_fill_super
     | ext4_load_and_init_journal
     |  ext4_load_journal
     |   jbd2_journal_load
     |    load_superblock
     |     journal_get_superblock
     |      set_buffer_verified(bh) // buffer head is verified
     |   jbd2_journal_recover // failed caused by EIO
     | goto failed_mount3a // skip 'sb->s_root' initialization
     deactivate_locked_super
      kill_block_super
       generic_shutdown_super
        if (sb->s_root)
        // false, skip ext4_put_super->invalidate_bdev->
        // invalidate_mapping_pages->mapping_evict_folio->
        // filemap_release_folio->try_to_free_buffers, which
        // cannot drop buffer head.
       blkdev_put
        blkdev_put_whole
         if (atomic_dec_and_test(&bdev->bd_openers))
         // false, systemd-udev happens to open the device. Then
         // blkdev_flush_mapping->kill_bdev->truncate_inode_pages->
         // truncate_inode_folio->truncate_cleanup_folio->
         // folio_invalidate->block_invalidate_folio->
         // filemap_release_folio->try_to_free_buffers will be skipped,
         // dropping buffer head is missed again.
    
    Second mount:
    ext4_fill_super
     ext4_load_and_init_journal
      ext4_load_journal
       ext4_get_journal
        jbd2_journal_init_inode
         journal_init_common
          bh = getblk_unmovable
           bh = __find_get_block // Found stale bh in last failed mounting
          journal->j_sb_buffer = bh
       jbd2_journal_load
        load_superblock
         journal_get_superblock
          if (buffer_verified(bh))
          // true, skip journal->j_format_version = 2, value is 0
        jbd2_journal_recover
         do_one_pass
          next_log_block += count_tags(journal, bh)
          // According to journal_tag_bytes(), 'tag_bytes' calculating is
          // affected by jbd2_has_feature_csum3(), jbd2_has_feature_csum3()
          // returns false because 'j->j_format_version >= 2' is not true,
          // then we get wrong next_log_block. The do_one_pass may exit
          // early whenoccuring non JBD2_MAGIC_NUMBER in 'next_log_block'.
    
    The filesystem is corrupted here, journal is partially replayed, and
    new journal sequence number actually is already used by last mounting.
    
    The invalidate_bdev() can drop all buffer heads even racing with bare
    reading block device(eg. systemd-udev), so we can fix it by invalidating
    bdev in error handling path in __ext4_fill_super().
    
    Fetch a reproducer in [Link].
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=217171
    Fixes: 25ed6e8 ("jbd2: enable journal clients to enable v2 checksumming")
    Cc: [email protected] # v3.5
    Signed-off-by: Zhihao Cheng <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Zhihao Cheng authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    0a90e70 View commit details
    Browse the repository at this point in the history
  104. ext4: fix wrong unit use in ext4_mb_clear_bb

    commit 247c3d2 upstream.
    
    Function ext4_issue_discard need count in cluster. Pass count_clusters
    instead of count to fix the mismatch.
    
    Signed-off-by: Kemeng Shi <[email protected]>
    Cc: [email protected]
    Reviewed-by: Ojaswin Mujoo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Kemeng Shi authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    782166a View commit details
    Browse the repository at this point in the history
  105. ext4: get block from bh in ext4_free_blocks for fast commit replay

    commit 11b6890 upstream.
    
    ext4_free_blocks will retrieve block from bh if block parameter is zero.
    Retrieve block before ext4_free_blocks_simple to avoid potentially
    passing wrong block to ext4_free_blocks_simple.
    
    Signed-off-by: Kemeng Shi <[email protected]>
    Cc: [email protected]
    Reviewed-by: Ojaswin Mujoo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Kemeng Shi authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2038d35 View commit details
    Browse the repository at this point in the history
  106. ext4: fix wrong unit use in ext4_mb_new_blocks

    commit 2ec6d0a upstream.
    
    Function ext4_free_blocks_simple needs count in cluster. Function
    ext4_free_blocks accepts count in block. Convert count to cluster
    to fix the mismatch.
    
    Signed-off-by: Kemeng Shi <[email protected]>
    Cc: [email protected]
    Reviewed-by: Ojaswin Mujoo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Kemeng Shi authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    e861961 View commit details
    Browse the repository at this point in the history
  107. ext4: fix to check return value of freeze_bdev() in ext4_shutdown()

    commit c4d1322 upstream.
    
    freeze_bdev() can fail due to a lot of reasons, it needs to check its
    reason before later process.
    
    Fixes: 783d948 ("ext4: add EXT4_IOC_GOINGDOWN ioctl")
    Cc: [email protected]
    Signed-off-by: Chao Yu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    chaseyu authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    029c6b1 View commit details
    Browse the repository at this point in the history
  108. ext4: turn quotas off if mount failed after enabling quotas

    commit d13f996 upstream.
    
    Yi found during a review of the patch "ext4: don't BUG on inconsistent
    journal feature" that when ext4_mark_recovery_complete() returns an error
    value, the error handling path does not turn off the enabled quotas,
    which triggers the following kmemleak:
    
    ================================================================
    unreferenced object 0xffff8cf68678e7c0 (size 64):
    comm "mount", pid 746, jiffies 4294871231 (age 11.540s)
    hex dump (first 32 bytes):
    00 90 ef 82 f6 8c ff ff 00 00 00 00 41 01 00 00  ............A...
    c7 00 00 00 bd 00 00 00 0a 00 00 00 48 00 00 00  ............H...
    backtrace:
    [<00000000c561ef24>] __kmem_cache_alloc_node+0x4d4/0x880
    [<00000000d4e621d7>] kmalloc_trace+0x39/0x140
    [<00000000837eee74>] v2_read_file_info+0x18a/0x3a0
    [<0000000088f6c877>] dquot_load_quota_sb+0x2ed/0x770
    [<00000000340a4782>] dquot_load_quota_inode+0xc6/0x1c0
    [<0000000089a18bd5>] ext4_enable_quotas+0x17e/0x3a0 [ext4]
    [<000000003a0268fa>] __ext4_fill_super+0x3448/0x3910 [ext4]
    [<00000000b0f2a8a8>] ext4_fill_super+0x13d/0x340 [ext4]
    [<000000004a9489c4>] get_tree_bdev+0x1dc/0x370
    [<000000006e723bf1>] ext4_get_tree+0x1d/0x30 [ext4]
    [<00000000c7cb663d>] vfs_get_tree+0x31/0x160
    [<00000000320e1bed>] do_new_mount+0x1d5/0x480
    [<00000000c074654c>] path_mount+0x22e/0xbe0
    [<0000000003e97a8e>] do_mount+0x95/0xc0
    [<000000002f3d3736>] __x64_sys_mount+0xc4/0x160
    [<0000000027d2140c>] do_syscall_64+0x3f/0x90
    ================================================================
    
    To solve this problem, we add a "failed_mount10" tag, and call
    ext4_quota_off_umount() in this tag to release the enabled qoutas.
    
    Fixes: 1121563 ("ext4: don't BUG on inconsistent journal feature")
    Cc: [email protected]
    Signed-off-by: Zhang Yi <[email protected]>
    Signed-off-by: Baokun Li <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    LiBaokun96 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    deef86f View commit details
    Browse the repository at this point in the history
  109. ext4: only update i_reserved_data_blocks on successful block allocation

    commit de25d6e upstream.
    
    In our fault injection test, we create an ext4 file, migrate it to
    non-extent based file, then punch a hole and finally trigger a WARN_ON
    in the ext4_da_update_reserve_space():
    
    EXT4-fs warning (device sda): ext4_da_update_reserve_space:369:
    ino 14, used 11 with only 10 reserved data blocks
    
    When writing back a non-extent based file, if we enable delalloc, the
    number of reserved blocks will be subtracted from the number of blocks
    mapped by ext4_ind_map_blocks(), and the extent status tree will be
    updated. We update the extent status tree by first removing the old
    extent_status and then inserting the new extent_status. If the block range
    we remove happens to be in an extent, then we need to allocate another
    extent_status with ext4_es_alloc_extent().
    
           use old    to remove   to add new
        |----------|------------|------------|
                  old extent_status
    
    The problem is that the allocation of a new extent_status failed due to a
    fault injection, and __es_shrink() did not get free memory, resulting in
    a return of -ENOMEM. Then do_writepages() retries after receiving -ENOMEM,
    we map to the same extent again, and the number of reserved blocks is again
    subtracted from the number of blocks in that extent. Since the blocks in
    the same extent are subtracted twice, we end up triggering WARN_ON at
    ext4_da_update_reserve_space() because used > ei->i_reserved_data_blocks.
    
    For non-extent based file, we update the number of reserved blocks after
    ext4_ind_map_blocks() is executed, which causes a problem that when we call
    ext4_ind_map_blocks() to create a block, it doesn't always create a block,
    but we always reduce the number of reserved blocks. So we move the logic
    for updating reserved blocks to ext4_ind_map_blocks() to ensure that the
    number of reserved blocks is updated only after we do succeed in allocating
    some new blocks.
    
    Fixes: 5f634d0 ("ext4: Fix quota accounting error with fallocate")
    Cc: [email protected]
    Signed-off-by: Baokun Li <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    LiBaokun96 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    95d49f7 View commit details
    Browse the repository at this point in the history
  110. fs: dlm: revert check required context while close

    commit c6b6d6d upstream.
    
    This patch reverts commit 2c3fa6a ("dlm: check required context
    while close"). The function dlm_midcomms_close(), which will call later
    dlm_lowcomms_close(), is called when the cluster manager tells the node
    got fenced which means on midcomms/lowcomms layer to disconnect the node
    from the cluster communication. The node can rejoin the cluster later.
    This patch was ensuring no new message were able to be triggered when we
    are in the close() function context. This was done by checking if the
    lockspace has been stopped. However there is a missing check that we
    only need to check specific lockspaces where the fenced node is member
    of. This is currently complicated because there is no way to easily
    check if a node is part of a specific lockspace without stopping the
    recovery. For now we just revert this commit as it is just a check to
    finding possible leaks of stopping lockspaces before close() is called.
    
    Cc: [email protected]
    Fixes: 2c3fa6a ("dlm: check required context while close")
    Signed-off-by: Alexander Aring <[email protected]>
    Signed-off-by: David Teigland <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Alexander Aring authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    5dc507d View commit details
    Browse the repository at this point in the history
  111. soc: qcom: mdt_loader: Fix unconditional call to scm_pas_mem_setup

    commit bcb8898 upstream.
    
    Commit ebeb20a ("soc: qcom: mdt_loader: Always invoke PAS
    mem_setup") dropped the relocate check and made pas_mem_setup run
    unconditionally. The code was later moved with commit f4e526f
    ("soc: qcom: mdt_loader: Extract PAS operations") to
    qcom_mdt_pas_init() effectively losing track of what was actually
    done.
    
    The assumption that PAS mem_setup can be done anytime was effectively
    wrong, with no good reason and this caused regression on some SoC
    that use remoteproc to bringup ath11k. One example is IPQ8074 SoC that
    effectively broke resulting in remoteproc silently die and ath11k not
    working.
    
    On this SoC FW relocate is not enabled and PAS mem_setup was correctly
    skipped in previous kernel version resulting in correct bringup and
    function of remoteproc and ath11k.
    
    To fix the regression, reintroduce the relocate check in
    qcom_mdt_pas_init() and correctly skip PAS mem_setup where relocate is
    not enabled.
    
    Fixes: ebeb20a ("soc: qcom: mdt_loader: Always invoke PAS mem_setup")
    Tested-by: Robert Marko <[email protected]>
    Co-developed-by: Robert Marko <[email protected]>
    Signed-off-by: Robert Marko <[email protected]>
    Signed-off-by: Christian Marangi <[email protected]>
    Cc: [email protected]
    Reviewed-by: Mukesh Ojha <[email protected]>
    Signed-off-by: Bjorn Andersson <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Ansuel authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    33f8dff View commit details
    Browse the repository at this point in the history
  112. ext2/dax: Fix ext2_setsize when len is page aligned

    commit fcced95 upstream.
    
    PAGE_ALIGN(x) macro gives the next highest value which is multiple of
    pagesize. But if x is already page aligned then it simply returns x.
    So, if x passed is 0 in dax_zero_range() function, that means the
    length gets passed as 0 to ->iomap_begin().
    
    In ext2 it then calls ext2_get_blocks -> max_blocks as 0 and hits bug_on
    here in ext2_get_blocks().
    	BUG_ON(maxblocks == 0);
    
    Instead we should be calling dax_truncate_page() here which takes
    care of it. i.e. it only calls dax_zero_range if the offset is not
    page/block aligned.
    
    This can be easily triggered with following on fsdax mounted pmem
    device.
    
    dd if=/dev/zero of=file count=1 bs=512
    truncate -s 0 file
    
    [79.525838] EXT2-fs (pmem0): DAX enabled. Warning: EXPERIMENTAL, use at your own risk
    [79.529376] ext2 filesystem being mounted at /mnt1/test supports timestamps until 2038 (0x7fffffff)
    [93.793207] ------------[ cut here ]------------
    [93.795102] kernel BUG at fs/ext2/inode.c:637!
    [93.796904] invalid opcode: 0000 [#1] PREEMPT SMP PTI
    [93.798659] CPU: 0 PID: 1192 Comm: truncate Not tainted 6.3.0-rc2-xfstests-00056-g131086faa369 #139
    [93.806459] RIP: 0010:ext2_get_blocks.constprop.0+0x524/0x610
    <...>
    [93.835298] Call Trace:
    [93.836253]  <TASK>
    [93.837103]  ? lock_acquire+0xf8/0x110
    [93.838479]  ? d_lookup+0x69/0xd0
    [93.839779]  ext2_iomap_begin+0xa7/0x1c0
    [93.841154]  iomap_iter+0xc7/0x150
    [93.842425]  dax_zero_range+0x6e/0xa0
    [93.843813]  ext2_setsize+0x176/0x1b0
    [93.845164]  ext2_setattr+0x151/0x200
    [93.846467]  notify_change+0x341/0x4e0
    [93.847805]  ? lock_acquire+0xf8/0x110
    [93.849143]  ? do_truncate+0x74/0xe0
    [93.850452]  ? do_truncate+0x84/0xe0
    [93.851739]  do_truncate+0x84/0xe0
    [93.852974]  do_sys_ftruncate+0x2b4/0x2f0
    [93.854404]  do_syscall_64+0x3f/0x90
    [93.855789]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
    
    CC: [email protected]
    Fixes: 2aa3048 ("iomap: switch iomap_zero_range to use iomap_iter")
    Reviewed-by: Darrick J. Wong <[email protected]>
    Signed-off-by: Ritesh Harjani (IBM) <[email protected]>
    Signed-off-by: Jan Kara <[email protected]>
    Message-Id: <046a58317f29d9603d1068b2bbae47c2332c17ae.1682069716.git.ritesh.list@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    riteshharjani authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    9e54fd1 View commit details
    Browse the repository at this point in the history
  113. jfs: jfs_dmap: Validate db_l2nbperpage while mounting

    commit 1150991 upstream.
    
    In jfs_dmap.c at line 381, BLKTODMAP is used to get a logical block
    number inside dbFree(). db_l2nbperpage, which is the log2 number of
    blocks per page, is passed as an argument to BLKTODMAP which uses it
    for shifting.
    
    Syzbot reported a shift out-of-bounds crash because db_l2nbperpage is
    too big. This happens because the large value is set without any
    validation in dbMount() at line 181.
    
    Thus, make sure that db_l2nbperpage is correct while mounting.
    
    Max number of blocks per page = Page size / Min block size
    => log2(Max num_block per page) = log2(Page size / Min block size)
    				= log2(Page size) - log2(Min block size)
    
    => Max db_l2nbperpage = L2PSIZE - L2MINBLOCKSIZE
    
    Reported-and-tested-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?id=2a70a453331db32ed491f5cbb07e81bf2d225715
    Cc: [email protected]
    Suggested-by: Dave Kleikamp <[email protected]>
    Signed-off-by: Siddh Raman Pant <[email protected]>
    Signed-off-by: Dave Kleikamp <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    siddhpant authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c7feb54 View commit details
    Browse the repository at this point in the history
  114. hwrng: imx-rngc - fix the timeout for init and self check

    commit d744ae7 upstream.
    
    Fix the timeout that is used for the initialisation and for the self
    test. wait_for_completion_timeout expects a timeout in jiffies, but
    RNGC_TIMEOUT is in milliseconds. Call msecs_to_jiffies to do the
    conversion.
    
    Cc: [email protected]
    Fixes: 1d54494 ("hwrng: mx-rngc - add a driver for Freescale RNGC")
    Signed-off-by: Martin Kaiser <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    martin-kaiser authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ef70935 View commit details
    Browse the repository at this point in the history
  115. dm integrity: reduce vmalloc space footprint on 32-bit architectures

    commit 6d50eb4 upstream.
    
    It was reported that dm-integrity runs out of vmalloc space on 32-bit
    architectures. On x86, there is only 128MiB vmalloc space and dm-integrity
    consumes it quickly because it has a 64MiB journal and 8MiB recalculate
    buffer.
    
    Fix this by reducing the size of the journal to 4MiB and the size of
    the recalculate buffer to 1MiB, so that multiple dm-integrity devices
    can be created and activated on 32-bit architectures.
    
    Cc: [email protected]
    Signed-off-by: Mikulas Patocka <[email protected]>
    Signed-off-by: Mike Snitzer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Mikulas Patocka authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    b933df9 View commit details
    Browse the repository at this point in the history
  116. scsi: mpi3mr: Propagate sense data for admin queue SCSI I/O

    commit f762326 upstream.
    
    Copy the sense data to internal driver buffer when the firmware completes
    any SCSI I/O command sent through admin queue with sense data for further
    use.
    
    Fixes: 506bc1a ("scsi: mpi3mr: Add support for MPT commands")
    Cc: <[email protected]>
    Signed-off-by: Sathya Prakash <[email protected]>
    Signed-off-by: Sumit Saxena <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Sathya Prakash authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    026e46d View commit details
    Browse the repository at this point in the history
  117. s390/zcrypt: do not retry administrative requests

    commit af40322 upstream.
    
    All kind of administrative requests should not been retried. Some card
    firmware detects this and assumes a replay attack. This patch checks
    on failure if the low level functions indicate a retry (EAGAIN) and
    checks for the ADMIN flag set on the request message.  If this both
    are true, the response code for this message is changed to EIO to make
    sure the zcrypt API layer does not attempt to retry the request. As of
    now the ADMIN flag is set for a request message when
    - for EP11 the field 'flags' of the EP11 CPRB struct has the leftmost
      bit set.
    - for CCA when the CPRB minor version is 'T3', 'T5', 'T6' or 'T7'.
    
    Please note that the do-not-retry only applies to a request
    which has been sent to the card (= has been successfully enqueued) but
    the reply indicates some kind of failure and by default it would be
    replied. It is totally fine to retry a request if a previous attempt
    to enqueue the msg into the firmware queue had some kind of failure
    and thus the card has never seen this request.
    
    Reported-by: Frank Uhlig <[email protected]>
    Signed-off-by: Harald Freudenberger <[email protected]>
    Reviewed-by: Holger Dengler <[email protected]>
    Cc: [email protected]
    Signed-off-by: Alexander Gordeev <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hfreude authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    25cb64e View commit details
    Browse the repository at this point in the history
  118. PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold

    commit 9e30fd2 upstream.
    
    The quirk for Elo i2 introduced in commit 92597f9 ("PCI/PM: Avoid
    putting Elo i2 PCIe Ports in D3cold") is also needed by EloPOS E2/S2/H2
    which uses the same Continental Z2 board.
    
    Change the quirk to match the board instead of system.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215715
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ondrej Zary <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Ondrej Zary authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    3367d4b View commit details
    Browse the repository at this point in the history
  119. PCI: Release resource invalidated by coalescing

    commit e542232 upstream.
    
    When contiguous windows are coalesced by pci_register_host_bridge(), the
    second resource is expanded to include the first, and the first is
    invalidated and consequently not added to the bus. However, it remains in
    the resource hierarchy.  For example, these windows:
    
      fec00000-fec7ffff : PCI Bus 0000:00
      fec80000-fecbffff : PCI Bus 0000:00
    
    are coalesced into this, where the first resource remains in the tree with
    start/end zeroed out:
    
      00000000-00000000 : PCI Bus 0000:00
      fec00000-fecbffff : PCI Bus 0000:00
    
    In some cases (e.g. the Xen scratch region), this causes future calls to
    allocate_resource() to choose an inappropriate location which the caller
    cannot handle.
    
    Fix by releasing the zeroed-out resource and removing it from the resource
    hierarchy.
    
    [bhelgaas: commit log]
    Fixes: 7c3855c ("PCI: Coalesce host bridge contiguous apertures")
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ross Lagerwall <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Cc: [email protected]	# v5.16+
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rosslagerwall authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    465c195 View commit details
    Browse the repository at this point in the history
  120. PCI: Add function 1 DMA alias quirk for Marvell 88SE9235

    commit 88d3417 upstream.
    
    Marvell's own product brief implies the 92xx series are a closely related
    family, and sure enough it turns out that 9235 seems to need the same quirk
    as the other three, although possibly only when certain ports are used.
    
    Link: https://lore.kernel.org/linux-iommu/[email protected]/
    Link: https://lore.kernel.org/r/731507e05d70239aec96fcbfab6e65d8ce00edd2.1686157165.git.robin.murphy@arm.com
    Reported-by: Jason Adriaanse <[email protected]>
    Signed-off-by: Robin Murphy <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rmurphy-arm authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c459365 View commit details
    Browse the repository at this point in the history
  121. PCI: qcom: Disable write access to read only registers for IP v2.3.3

    commit a33d700 upstream.
    
    In the post init sequence of v2.9.0, write access to read only registers
    are not disabled after updating the registers. Fix it by disabling the
    access after register update.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 5d76117 ("PCI: qcom: Add support for IPQ8074 PCIe controller")
    Signed-off-by: Manivannan Sadhasivam <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Mani-Sadhasivam authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    cf0d7b7 View commit details
    Browse the repository at this point in the history
  122. PCI: epf-test: Fix DMA transfer completion initialization

    commit 4aca56f upstream.
    
    Reinitialize the transfer_complete DMA transfer completion before calling
    tx_submit(), to avoid seeing the DMA transfer complete before the
    completion is initialized, thus potentially losing the completion
    notification.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 8353813 ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Manivannan Sadhasivam <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    damien-lemoal authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    bcd276f View commit details
    Browse the repository at this point in the history
  123. PCI: epf-test: Fix DMA transfer completion detection

    commit 933f31a upstream.
    
    pci_epf_test_data_transfer() and pci_epf_test_dma_callback() are not
    handling DMA transfer completion correctly, leading to completion
    notifications to the RC side that are too early. This problem can be
    detected when the RC side is running an IOMMU with messages such as:
    
      pci-endpoint-test 0000:0b:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x001c address=0xfff00000 flags=0x0000]
    
    When running the pcitest.sh tests: the address used for a previous
    test transfer generates the above error while the next test transfer is
    running.
    
    Fix this by testing the DMA transfer status in pci_epf_test_dma_callback()
    and notifying the completion only when the transfer status is DMA_COMPLETE
    or DMA_ERROR. Furthermore, in pci_epf_test_data_transfer(), be paranoid and
    check again the transfer status and always call dmaengine_terminate_sync()
    before returning.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 8353813 ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Manivannan Sadhasivam <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    damien-lemoal authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    07d997e View commit details
    Browse the repository at this point in the history
  124. PCI: rockchip: Assert PCI Configuration Enable bit after probe

    commit f397fd4 upstream.
    
    Assert PCI Configuration Enable bit after probe. When this bit is left to
    0 in the endpoint mode, the RK3399 PCIe endpoint core will generate
    configuration request retry status (CRS) messages back to the root complex.
    Assert this bit after probe to allow the RK3399 PCIe endpoint core to reply
    to configuration requests from the root complex.
    This is documented in section 17.5.8.1.2 of the RK3399 TRM.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: cf590b0 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
    Tested-by: Damien Le Moal <[email protected]>
    Signed-off-by: Rick Wertenbroek <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Reviewed-by: Damien Le Moal <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rwk-git authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    b2e2ffb View commit details
    Browse the repository at this point in the history
  125. PCI: rockchip: Write PCI Device ID to correct register

    commit 1f1c42e upstream.
    
    Write PCI Device ID (DID) to the correct register. The Device ID was not
    updated through the correct register. Device ID was written to a read-only
    register and therefore did not work. The Device ID is now set through the
    correct register. This is documented in the RK3399 TRM section 17.6.6.1.1
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: cf590b0 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
    Tested-by: Damien Le Moal <[email protected]>
    Signed-off-by: Rick Wertenbroek <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Reviewed-by: Damien Le Moal <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rwk-git authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    05f55f7 View commit details
    Browse the repository at this point in the history
  126. PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked

    commit 9dd3c7c upstream.
    
    The RK3399 PCIe controller should wait until the PHY PLLs are locked.
    Add poll and timeout to wait for PHY PLLs to be locked. If they cannot
    be locked generate error message and jump to error handler. Accessing
    registers in the PHY clock domain when PLLs are not locked causes hang
    The PHY PLLs status is checked through a side channel register.
    This is documented in the TRM section 17.5.8.1 "PCIe Initialization
    Sequence".
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: cf590b0 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
    Tested-by: Damien Le Moal <[email protected]>
    Signed-off-by: Rick Wertenbroek <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Reviewed-by: Damien Le Moal <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rwk-git authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    dfd20eb View commit details
    Browse the repository at this point in the history
  127. PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core

    commit 166e89d upstream.
    
    Fix legacy IRQ generation for RK3399 PCIe endpoint core according to
    the technical reference manual (TRM). Assert and deassert legacy
    interrupt (INTx) through the legacy interrupt control register
    ("PCIE_CLIENT_LEGACY_INT_CTRL") instead of manually generating a PCIe
    message. The generation of the legacy interrupt was tested and validated
    with the PCIe endpoint test driver.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: cf590b0 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
    Tested-by: Damien Le Moal <[email protected]>
    Signed-off-by: Rick Wertenbroek <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Reviewed-by: Damien Le Moal <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rwk-git authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1a48294 View commit details
    Browse the repository at this point in the history
  128. PCI: rockchip: Use u32 variable to access 32-bit registers

    commit 8962b2c upstream.
    
    Previously u16 variables were used to access 32-bit registers, this
    resulted in not all of the data being read from the registers. Also
    the left shift of more than 16-bits would result in moving data out
    of the variable. Use u32 variables to access 32-bit registers
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: cf590b0 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
    Tested-by: Damien Le Moal <[email protected]>
    Signed-off-by: Rick Wertenbroek <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Reviewed-by: Damien Le Moal <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rwk-git authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    5b15ebe View commit details
    Browse the repository at this point in the history
  129. PCI: rockchip: Set address alignment for endpoint mode

    commit 7e6689b upstream.
    
    The address translation unit of the rockchip EP controller does not use
    the lower 8 bits of a PCIe-space address to map local memory. Thus we
    must set the align feature field to 256 to let the user know about this
    constraint.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: cf590b0 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Rick Wertenbroek <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    damien-lemoal authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    0813bb2 View commit details
    Browse the repository at this point in the history
  130. misc: pci_endpoint_test: Free IRQs before removing the device

    commit f61b763 upstream.
    
    In pci_endpoint_test_remove(), freeing the IRQs after removing the device
    creates a small race window for IRQs to be received with the test device
    memory already released, causing the IRQ handler to access invalid memory,
    resulting in an oops.
    
    Free the device IRQs before removing the device to avoid this issue.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: e033271 ("pci_endpoint_test: Add 2 ioctl commands")
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Manivannan Sadhasivam <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    damien-lemoal authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c2dba13 View commit details
    Browse the repository at this point in the history
  131. misc: pci_endpoint_test: Re-init completion for every test

    commit fb620ae upstream.
    
    The irq_raised completion used to detect the end of a test case is
    initialized when the test device is probed, but never reinitialized again
    before a test case. As a result, the irq_raised completion synchronization
    is effective only for the first ioctl test case executed. Any subsequent
    call to wait_for_completion() by another ioctl() call will immediately
    return, potentially too early, leading to false positive failures.
    
    Fix this by reinitializing the irq_raised completion before starting a new
    ioctl() test command.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 2c156ac ("misc: Add host side PCI driver for PCI test function device")
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Lorenzo Pieralisi <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Manivannan Sadhasivam <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    damien-lemoal authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    7ef181f View commit details
    Browse the repository at this point in the history
  132. mfd: pm8008: Fix module autoloading

    commit d420c98 upstream.
    
    Add the missing module device table alias to that the driver can be
    autoloaded when built as a module.
    
    Cc: [email protected]      # 5.14
    Fixes: 6b149f3 ("mfd: pm8008: Add driver for QCOM PM8008 PMIC")
    Signed-off-by: Johan Hovold <[email protected]>
    Reviewed-by: Konrad Dybcio <[email protected]>
    Signed-off-by: Lee Jones <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jhovold authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    31df8b9 View commit details
    Browse the repository at this point in the history
  133. md/raid0: add discard support for the 'original' layout

    commit e836007 upstream.
    
    We've found that using raid0 with the 'original' layout and discard
    enabled with different disk sizes (such that at least two zones are
    created) can result in data corruption. This is due to the fact that
    the discard handling in 'raid0_handle_discard()' assumes the 'alternate'
    layout. We've seen this corruption using ext4 but other filesystems are
    likely susceptible as well.
    
    More specifically, while multiple zones are necessary to create the
    corruption, the corruption may not occur with multiple zones if they
    layout in such a way the layout matches what the 'alternate' layout
    would have produced. Thus, not all raid0 devices with the 'original'
    layout, different size disks and discard enabled will encounter this
    corruption.
    
    The 3.14 kernel inadvertently changed the raid0 disk layout for different
    size disks. Thus, running a pre-3.14 kernel and post-3.14 kernel on the
    same raid0 array could corrupt data. This lead to the creation of the
    'original' layout (to match the pre-3.14 layout) and the 'alternate' layout
    (to match the post 3.14 layout) in the 5.4 kernel time frame and an option
    to tell the kernel which layout to use (since it couldn't be autodetected).
    However, when the 'original' layout was added back to 5.4 discard support
    for the 'original' layout was not added leading this issue.
    
    I've been able to reliably reproduce the corruption with the following
    test case:
    
    1. create raid0 array with different size disks using original layout
    2. mkfs
    3. mount -o discard
    4. create lots of files
    5. remove 1/2 the files
    6. fstrim -a (or just the mount point for the raid0 array)
    7. umount
    8. fsck -fn /dev/md0 (spews all sorts of corruptions)
    
    Let's fix this by adding proper discard support to the 'original' layout.
    The fix 'maps' the 'original' layout disks to the order in which they are
    read/written such that we can compare the disks in the same way that the
    current 'alternate' layout does. A 'disk_shift' field is added to
    'struct strip_zone'. This could be computed on the fly in
    raid0_handle_discard() but by adding this field, we save some computation
    in the discard path.
    
    Note we could also potentially fix this by re-ordering the disks in the
    zones that follow the first one, and then always read/writing them using
    the 'alternate' layout. However, that is seen as a more substantial change,
    and we are attempting the least invasive fix at this time to remedy the
    corruption.
    
    I've verified the change using the reproducer mentioned above. Typically,
    the corruption is seen after less than 3 iterations, while the patch has
    run 500+ iterations.
    
    Cc: NeilBrown <[email protected]>
    Cc: Song Liu <[email protected]>
    Fixes: c84a137 ("md/raid0: avoid RAID0 data corruption due to layout confusion.")
    Cc: [email protected]
    Signed-off-by: Jason Baron <[email protected]>
    Signed-off-by: Song Liu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    almostivan authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    e301289 View commit details
    Browse the repository at this point in the history
  134. dm init: add dm-mod.waitfor to wait for asynchronously probed block d…

    …evices
    
    commit 035641b upstream.
    
    Just calling wait_for_device_probe() is not enough to ensure that
    asynchronously probed block devices are available (E.G. mmc, usb), so
    add a "dm-mod.waitfor=<device1>[,..,<deviceN>]" parameter to get
    dm-init to explicitly wait for specific block devices before
    initializing the tables with logic similar to the rootwait logic that
    was introduced with commit  cc1ed75 ("init: wait for
    asynchronously scanned block devices").
    
    E.G. with dm-verity on mmc using:
    dm-mod.waitfor="PARTLABEL=hash-a,PARTLABEL=root-a"
    
    [    0.671671] device-mapper: init: waiting for all devices to be available before creating mapped devices
    [    0.671679] device-mapper: init: waiting for device PARTLABEL=hash-a ...
    [    0.710695] mmc0: new HS200 MMC card at address 0001
    [    0.711158] mmcblk0: mmc0:0001 004GA0 3.69 GiB
    [    0.715954] mmcblk0boot0: mmc0:0001 004GA0 partition 1 2.00 MiB
    [    0.722085] mmcblk0boot1: mmc0:0001 004GA0 partition 2 2.00 MiB
    [    0.728093] mmcblk0rpmb: mmc0:0001 004GA0 partition 3 512 KiB, chardev (249:0)
    [    0.738274]  mmcblk0: p1 p2 p3 p4 p5 p6 p7
    [    0.751282] device-mapper: init: waiting for device PARTLABEL=root-a ...
    [    0.751306] device-mapper: init: all devices available
    [    0.751683] device-mapper: verity: sha256 using implementation "sha256-generic"
    [    0.759344] device-mapper: ioctl: dm-0 (vroot) is ready
    [    0.766540] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
    
    Signed-off-by: Peter Korsgaard <[email protected]>
    Signed-off-by: Mike Snitzer <[email protected]>
    Cc: Mark-PK Tsai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jacmet authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    be19cb6 View commit details
    Browse the repository at this point in the history
  135. fs: dlm: return positive pid value for F_GETLK

    commit 92655fb upstream.
    
    The GETLK pid values have all been negated since commit 9d5b86a
    ("fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks").
    Revert this for local pids, and leave in place negative pids for remote
    owners.
    
    Cc: [email protected]
    Fixes: 9d5b86a ("fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks")
    Signed-off-by: Alexander Aring <[email protected]>
    Signed-off-by: David Teigland <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Alexander Aring authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    3346ffd View commit details
    Browse the repository at this point in the history
  136. fs: dlm: fix cleanup pending ops when interrupted

    commit c847f4e upstream.
    
    Immediately clean up a posix lock request if it is interrupted
    while waiting for a result from user space (dlm_controld.)  This
    largely reverts the recent commit b92a4e3 ("fs: dlm: change
    posix lock sigint handling"). That previous commit attempted
    to defer lock cleanup to the point in time when a result from
    user space arrived. The deferred approach was not reliable
    because some dlm plock ops may not receive replies.
    
    Cc: [email protected]
    Fixes: b92a4e3 ("fs: dlm: change posix lock sigint handling")
    Signed-off-by: Alexander Aring <[email protected]>
    Signed-off-by: David Teigland <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Alexander Aring authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    a1b6adf View commit details
    Browse the repository at this point in the history
  137. fs: dlm: interrupt posix locks only when process is killed

    commit 59e45c7 upstream.
    
    If a posix lock request is waiting for a result from user space
    (dlm_controld), do not let it be interrupted unless the process
    is killed. This reverts commit a6b1533 ("dlm: make posix locks
    interruptible"). The problem with the interruptible change is
    that all locks were cleared on any signal interrupt. If a signal
    was received that did not terminate the process, the process
    could continue running after all its dlm posix locks had been
    cleared. A future patch will add cancelation to allow proper
    interruption.
    
    Cc: [email protected]
    Fixes: a6b1533 ("dlm: make posix locks interruptible")
    Signed-off-by: Alexander Aring <[email protected]>
    Signed-off-by: David Teigland <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Alexander Aring authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2a37d73 View commit details
    Browse the repository at this point in the history
  138. fs: dlm: make F_SETLK use unkillable wait_event

    commit 0f2b1cb upstream.
    
    While a non-waiting posix lock request (F_SETLK) is waiting for
    user space processing (in dlm_controld), wait for that processing
    to complete with an unkillable wait_event(). This makes F_SETLK
    behave the same way for F_RDLCK, F_WRLCK and F_UNLCK. F_SETLKW
    continues to use wait_event_killable().
    
    Cc: [email protected]
    Signed-off-by: Alexander Aring <[email protected]>
    Signed-off-by: David Teigland <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Alexander Aring authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    adeaef5 View commit details
    Browse the repository at this point in the history
  139. fs: dlm: fix mismatch of plock results from userspace

    commit 57e2c2f upstream.
    
    When a waiting plock request (F_SETLKW) is sent to userspace
    for processing (dlm_controld), the result is returned at a
    later time. That result could be incorrectly matched to a
    different waiting request in cases where the owner field is
    the same (e.g. different threads in a process.) This is fixed
    by comparing all the properties in the request and reply.
    
    The results for non-waiting plock requests are now matched
    based on list order because the results are returned in the
    same order they were sent.
    
    Cc: [email protected]
    Signed-off-by: Alexander Aring <[email protected]>
    Signed-off-by: David Teigland <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Alexander Aring authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    7adcc32 View commit details
    Browse the repository at this point in the history
  140. scsi: lpfc: Fix double free in lpfc_cmpl_els_logo_acc() caused by lpf…

    …c_nlp_not_used()
    
    commit 97f9758 upstream.
    
    Smatch detected a double free path because lpfc_nlp_not_used() releases an
    ndlp object before reaching lpfc_nlp_put() at the end of
    lpfc_cmpl_els_logo_acc().
    
    Remove the outdated lpfc_nlp_not_used() routine.  In
    lpfc_mbx_cmpl_ns_reg_login(), replace the call with lpfc_nlp_put().  In
    lpfc_cmpl_els_logo_acc(), replace the call with lpfc_unreg_rpi() and keep
    the lpfc_nlp_put() at the end of the routine.  If ndlp's rpi was
    registered, then lpfc_unreg_rpi()'s completion routine performs the final
    ndlp clean up after lpfc_nlp_put() is called from lpfc_cmpl_els_logo_acc().
    Otherwise if ndlp has no rpi registered, the lpfc_nlp_put() at the end of
    lpfc_cmpl_els_logo_acc() is the final ndlp clean up.
    
    Fixes: 4430f7f ("scsi: lpfc: Rework locations of ndlp reference taking")
    Cc: <[email protected]> # v5.11+
    Reported-by: Dan Carpenter <[email protected]>
    Link: https://lore.kernel.org/all/Y3OefhyyJNKH%2Fiaf@kili/
    Signed-off-by: Justin Tee <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Justin Tee authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    6436ca0 View commit details
    Browse the repository at this point in the history
  141. drm/atomic: Allow vblank-enabled + self-refresh "disable"

    commit 9d0e3ca upstream.
    
    The self-refresh helper framework overloads "disable" to sometimes mean
    "go into self-refresh mode," and this mode activates automatically
    (e.g., after some period of unchanging display output). In such cases,
    the display pipe is still considered "on", and user-space is not aware
    that we went into self-refresh mode. Thus, users may expect that
    vblank-related features (such as DRM_IOCTL_WAIT_VBLANK) still work
    properly.
    
    However, we trigger the WARN_ONCE() here if a CRTC driver tries to leave
    vblank enabled.
    
    Add a different expectation: that CRTCs *should* leave vblank enabled
    when going into self-refresh.
    
    This patch is preparation for another patch -- "drm/rockchip: vop: Leave
    vblank enabled in self-refresh" -- which resolves conflicts between the
    above self-refresh behavior and the API tests in IGT's kms_vblank test
    module.
    
    == Some alternatives discussed: ==
    
    It's likely that on many display controllers, vblank interrupts will
    turn off when the CRTC is disabled, and so in some cases, self-refresh
    may not support vblank. To support such cases, we might consider
    additions to the generic helpers such that we fire vblank events based
    on a timer.
    
    However, there is currently only one driver using the common
    self-refresh helpers (i.e., rockchip), and at least as of commit
    bed030a ("drm/rockchip: Don't fully disable vop on self refresh"),
    the CRTC hardware is powered enough to continue to generate vblank
    interrupts.
    
    So we chose the simpler option of leaving vblank interrupts enabled. We
    can reevaluate this decision and perhaps augment the helpers if/when we
    gain a second driver that has different requirements.
    
    v3:
     * include discussion summary
    
    v2:
     * add 'ret != 0' warning case for self-refresh
     * describe failing test case and relation to drm/rockchip patch better
    
    Cc: <[email protected]> # dependency for "drm/rockchip: vop: Leave
                                 # vblank enabled in self-refresh"
    Signed-off-by: Brian Norris <[email protected]>
    Signed-off-by: Sean Paul <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230109171809.v3.1.I3904f697863649eb1be540ecca147a66e42bfad7@changeid
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    computersforpeace authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    db0a9a2 View commit details
    Browse the repository at this point in the history
  142. drm/rockchip: vop: Leave vblank enabled in self-refresh

    commit 2bdba9d upstream.
    
    If we disable vblank when entering self-refresh, vblank APIs (like
    DRM_IOCTL_WAIT_VBLANK) no longer work. But user space is not aware when
    we enter self-refresh, so this appears to be an API violation -- that
    DRM_IOCTL_WAIT_VBLANK fails with EINVAL whenever the display is idle and
    enters self-refresh.
    
    The downstream driver used by many of these systems never used to
    disable vblank for PSR, and in fact, even upstream, we didn't do that
    until radically redesigning the state machine in commit 6c836d9
    ("drm/rockchip: Use the helpers for PSR").
    
    Thus, it seems like a reasonable API fix to simply restore that
    behavior, and leave vblank enabled.
    
    Note that this appears to potentially unbalance the
    drm_crtc_vblank_{off,on}() calls in some cases, but:
    (a) drm_crtc_vblank_on() documents this as OK and
    (b) if I do the naive balancing, I find state machine issues such that
        we're not in sync properly; so it's easier to take advantage of (a).
    
    This issue was exposed by IGT's kms_vblank tests, and reported by
    KernelCI. The bug has been around a while (longer than KernelCI
    noticed), but was only exposed once self-refresh was bugfixed more
    recently, and so KernelCI could properly test it. Some other notes in:
    
      https://lore.kernel.org/dri-devel/[email protected]/
      Re: renesas/master bisection: igt-kms-rockchip.kms_vblank.pipe-A-wait-forked on rk3399-gru-kevin
    
    == Backporting notes: ==
    
    Marking as 'Fixes' commit 6c836d9 ("drm/rockchip: Use the helpers
    for PSR"), but it probably depends on commit bed030a
    ("drm/rockchip: Don't fully disable vop on self refresh") as well.
    
    We also need the previous patch ("drm/atomic: Allow vblank-enabled +
    self-refresh "disable""), of course.
    
    v3:
     * no update
    
    v2:
     * skip unnecessary lock/unlock
    
    Fixes: 6c836d9 ("drm/rockchip: Use the helpers for PSR")
    Cc: <[email protected]>
    Reported-by: "kernelci.org bot" <[email protected]>
    Link: https://lore.kernel.org/dri-devel/[email protected]/
    Signed-off-by: Brian Norris <[email protected]>
    Signed-off-by: Sean Paul <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230109171809.v3.2.Ic07cba4ab9a7bd3618a9e4258b8f92ea7d10ae5a@changeid
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    computersforpeace authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c41963e View commit details
    Browse the repository at this point in the history
  143. drm/amd/display: fix seamless odm transitions

    commit 75c2b7e upstream.
    
    Add missing programming and function pointers
    
    Cc: Mario Limonciello <[email protected]>
    Cc: Alex Deucher <[email protected]>
    Cc: [email protected]
    Acked-by: Stylon Wang <[email protected]>
    Signed-off-by: Dmytro Laktyushkin <[email protected]>
    Reviewed-by: Charlene Liu <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Dmytro Laktyushkin authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    31fb25e View commit details
    Browse the repository at this point in the history
  144. drm/amd/display: edp do not add non-edid timings

    commit 7a0e005 upstream.
    
    [Why] most edp support only timings from edid. applying
    non-edid timings, especially those timings out of edp
    bandwidth, may damage edp.
    
    [How] do not add non-edid timings for edp.
    
    Cc: Mario Limonciello <[email protected]>
    Cc: Alex Deucher <[email protected]>
    Cc: [email protected]
    Acked-by: Stylon Wang <[email protected]>
    Signed-off-by: Hersen Wu <[email protected]>
    Reviewed-by: Roman Li <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Hersen Wu authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c4629c7 View commit details
    Browse the repository at this point in the history
  145. drm/amd/display: Remove Phantom Pipe Check When Calculating K1 and K2

    commit 1966bbf upstream.
    
    [Why]
    K1 and K2 not being setting properly when subVP is active.
    
    [How]
    Have phantom pipes use the same programing as the main pipes without
    checking the paired stream
    
    Cc: [email protected]
    Tested-by: Daniel Wheeler <[email protected]>
    Reviewed-by: Alvin Lee <[email protected]>
    Acked-by: Rodrigo Siqueira <[email protected]>
    Signed-off-by: Austin Zheng <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Austin Zheng authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    a2ef316 View commit details
    Browse the repository at this point in the history
  146. drm/amd/display: disable seamless boot if force_odm_combine is enabled

    commit 26518b3 upstream.
    
    [Why & How]
    Having seamless boot on while forcing debug option ODM combine 2 to 1
    will cause some corruptions because of some missing programmings.
    
    Cc: [email protected] # 6.1+
    Reviewed-by: Nicholas Kazlauskas <[email protected]>
    Acked-by: Hamza Mahfooz <[email protected]>
    Signed-off-by: Leo Chen <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Leo Chen authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    3546f76 View commit details
    Browse the repository at this point in the history
  147. drm/amdgpu: fix clearing mappings for BOs that are always valid in VM

    commit ea2c3c0 upstream.
    
    Per VM BOs must be marked as moved or otherwise their ranges are not
    updated on use which might be necessary when the replace operation
    splits mappings.
    
    This fixes random GPU hangs when replacing sparse mappings from the
    userspace, while OP_MAP/OP_UNMAP works fine because always valid BOs
    are correctly handled there.
    
    Cc: [email protected]
    Signed-off-by: Samuel Pitoiset <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hakzsam authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    91e69e6 View commit details
    Browse the repository at this point in the history
  148. drm/amd: Disable PSR-SU on Parade 0803 TCON

    commit 072030b upstream.
    
    A number of users have reported that there are random hangs occurring
    caused by PSR-SU specifically on panels that contain the parade 0803
    TCON.  Users have been able to work around the issue by disabling PSR
    entirely.
    
    To avoid these hangs, disable PSR-SU when this TCON is found.
    
    Cc: [email protected]
    Cc: Sean Wang <[email protected]>
    Cc: Marc Rossi <[email protected]>
    Cc: Hamza Mahfooz <[email protected]>
    Suggested-by: Tsung-hua (Ryan) Lin <[email protected]>
    Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2443
    Signed-off-by: Mario Limonciello <[email protected]>
    Reviewed-by: Hamza Mahfooz <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    3092bee View commit details
    Browse the repository at this point in the history
  149. drm/amd/display: add a NULL pointer check

    commit 0f48a4b upstream.
    
    [Why & How]
    
    We have to check if stream is properly initialized before calling
    find_matching_pll(), otherwise we might end up trying to deferecence a
    NULL pointer.
    
    Cc: [email protected] # 6.1+
    Reviewed-by: Nicholas Kazlauskas <[email protected]>
    Acked-by: Hamza Mahfooz <[email protected]>
    Signed-off-by: Sung-huai Wang <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    WangSungHuai authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ad85fc9 View commit details
    Browse the repository at this point in the history
  150. drm/amd/display: Correct DMUB_FW_VERSION macro

    commit 274d205 upstream.
    
    The `DMUB_FW_VERSION` macro has a mistake in that the revision field
    is off by one byte. The last byte is typically used for other purposes
    and not a revision.
    
    Cc: [email protected]
    Cc: Sean Wang <[email protected]>
    Cc: Marc Rossi <[email protected]>
    Cc: Hamza Mahfooz <[email protected]>
    Cc: Tsung-hua (Ryan) Lin <[email protected]>
    Reviewed-by: Leo Li <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    7ad4046 View commit details
    Browse the repository at this point in the history
  151. drm/amd/display: Add monitor specific edid quirk

    commit 613a795 upstream.
    
    Disable FAMS on a Samsung Odyssey G9 monitor. Experiments show that this
    monitor does not work well under some use cases, and is likely
    implementation specific bug on the monitor's firmware.
    
    Cc: [email protected]
    Reviewed-by: Rodrigo Siqueira <[email protected]>
    Signed-off-by: Aurabindo Pillai <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Aurabindo Pillai authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    8404d0e View commit details
    Browse the repository at this point in the history
  152. drm/amdgpu: avoid restore process run into dead loop.

    commit 8a774fe upstream.
    
    In restore process worker, pinned BO cause update PTE fail, then
    the function re-schedule the restore_work. This will generate dead loop.
    
    Signed-off-by: gaba <[email protected]>
    Reviewed-by: Felix Kuehling <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    GaryAmd authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    fe26d0f View commit details
    Browse the repository at this point in the history
  153. drm/ttm: Don't leak a resource on swapout move error

    commit a590f03 upstream.
    
    If moving the bo to system for swapout failed, we were leaking
    a resource. Fix.
    
    Fixes: bfa3357 ("drm/ttm: allocate resource object instead of embedding it v2")
    Cc: Christian König <[email protected]>
    Cc: "Christian König" <[email protected]>
    Cc: [email protected]
    Cc: <[email protected]> # v5.14+
    Signed-off-by: Thomas Hellström <[email protected]>
    Reviewed-by: Nirmoy Das <[email protected]>
    Reviewed-by: Andi Shyti <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Thomas Hellström authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    f037f60 View commit details
    Browse the repository at this point in the history
  154. serial: atmel: don't enable IRQs prematurely

    commit 27a8268 upstream.
    
    The atmel_complete_tx_dma() function disables IRQs at the start
    of the function by calling spin_lock_irqsave(&port->lock, flags);
    There is no need to disable them a second time using the
    spin_lock_irq() function and, in fact, doing so is a bug because
    it will enable IRQs prematurely when we call spin_unlock_irq().
    
    Just use spin_lock/unlock() instead without disabling or enabling
    IRQs.
    
    Fixes: 08f738b ("serial: at91: add tx dma support")
    Signed-off-by: Dan Carpenter <[email protected]>
    Reviewed-by: Jiri Slaby <[email protected]>
    Acked-by: Richard Genoud <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: stable <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Dan Carpenter authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    9fd9e1d View commit details
    Browse the repository at this point in the history
  155. tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk(…

    …) in case of error
    
    commit a9c0954 upstream.
    
    If clk_get_rate() fails, the clk that has just been allocated needs to be
    freed.
    
    Cc: <[email protected]> # v3.3+
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Reviewed-by: Andi Shyti <[email protected]>
    Fixes: 5f5a7a5 ("serial: samsung: switch to clkdev based clock lookup")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Reviewed-by: Jiri Slaby <[email protected]>
    Message-ID: <e4baf6039368f52e5a5453982ddcb9a330fc689e.1686412569.git.christophe.jaillet@wanadoo.fr>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tititiou36 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    34f5b82 View commit details
    Browse the repository at this point in the history
  156. tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk(…

    …) when iterating clk
    
    commit 832e231 upstream.
    
    When the best clk is searched, we iterate over all possible clk.
    
    If we find a better match, the previous one, if any, needs to be freed.
    If a better match has already been found, we still need to free the new
    one, otherwise it leaks.
    
    Cc: <[email protected]> # v3.3+
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Reviewed-by: Andi Shyti <[email protected]>
    Fixes: 5f5a7a5 ("serial: samsung: switch to clkdev based clock lookup")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Reviewed-by: Jiri Slaby <[email protected]>
    Message-ID: <cf3e0053d2fc7391b2d906a86cd01a5ef15fb9dc.1686412569.git.christophe.jaillet@wanadoo.fr>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tititiou36 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    f0bf102 View commit details
    Browse the repository at this point in the history
  157. tty: serial: imx: fix rs485 rx after tx

    commit 639949a upstream.
    
    Since commit 79d0224 ("tty: serial: imx: Handle RS485 DE signal
    active high") RS485 reception no longer works after a transmission.
    
    The following scenario shows the problem:
    	1) Open a port in RS485 mode
    	2) Receive data from remote (OK)
    	3) Transmit data to remote (OK)
    	4) Receive data from remote (Nothing received)
    
    In RS485 mode, imx_uart_start_tx() calls imx_uart_stop_rx() and, when the
    transmission is complete, imx_uart_stop_tx() calls imx_uart_start_rx().
    
    Since the above commit imx_uart_stop_rx() now sets the loopback bit but
    imx_uart_start_rx() does not clear it causing the hardware to remain in
    loopback mode and not receive external data.
    
    Fix this by moving the existing loopback disable code to a helper function
    and calling it from imx_uart_start_rx() too.
    
    Fixes: 79d0224 ("tty: serial: imx: Handle RS485 DE signal active high")
    Cc: [email protected]
    Signed-off-by: Martin Fuzzey <[email protected]>
    Reviewed-by: Ilpo Järvinen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Martin Fuzzey authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    5553d58 View commit details
    Browse the repository at this point in the history
  158. firmware: stratix10-svc: Fix a potential resource leak in svc_create_…

    …memory_pool()
    
    commit 1995f15 upstream.
    
    svc_create_memory_pool() is only called from stratix10_svc_drv_probe().
    Most of resources in the probe are managed, but not this memremap() call.
    
    There is also no memunmap() call in the file.
    
    So switch to devm_memremap() to avoid a resource leak.
    
    Cc: [email protected]
    Fixes: 7ca5ce8 ("firmware: add Intel Stratix10 service layer driver")
    Link: https://lore.kernel.org/all/783e9dfbba34e28505c9efa8bba41f97fd0fa1dc.1686109400.git.christophe.jaillet@wanadoo.fr/
    Signed-off-by: Christophe JAILLET <[email protected]>
    Signed-off-by: Dinh Nguyen <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tititiou36 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    cb8a31a View commit details
    Browse the repository at this point in the history
  159. libceph: harden msgr2.1 frame segment length checks

    commit a282a2f upstream.
    
    ceph_frame_desc::fd_lens is an int array.  decode_preamble() thus
    effectively casts u32 -> int but the checks for segment lengths are
    written as if on unsigned values.  While reading in HELLO or one of the
    AUTH frames (before authentication is completed), arithmetic in
    head_onwire_len() can get duped by negative ctrl_len and produce
    head_len which is less than CEPH_PREAMBLE_LEN but still positive.
    This would lead to a buffer overrun in prepare_read_control() as the
    preamble gets copied to the newly allocated buffer of size head_len.
    
    Cc: [email protected]
    Fixes: cd1a677 ("libceph, ceph: implement msgr2.1 protocol (crc and secure modes)")
    Reported-by: Thelford Williams <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Reviewed-by: Xiubo Li <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    idryomov authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    183c0ae View commit details
    Browse the repository at this point in the history
  160. ceph: add a dedicated private data for netfs rreq

    commit 23ee27d upstream.
    
    We need to save the 'f_ra.ra_pages' to expand the readahead window
    later.
    
    Cc: [email protected]
    Fixes: 4987005 ("ceph: convert ceph_readpages to ceph_readahead")
    Link: https://lore.kernel.org/ceph-devel/[email protected]
    Link: https://www.spinics.net/lists/ceph-users/msg76183.html
    Signed-off-by: Xiubo Li <[email protected]>
    Reviewed-and-tested-by: Hu Weiwen <[email protected]>
    Reviewed-by: Milind Changire <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    lxbsz authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d545ff9 View commit details
    Browse the repository at this point in the history
  161. ceph: fix blindly expanding the readahead windows

    commit dc94bb8 upstream.
    
    Blindly expanding the readahead windows will cause unneccessary
    pagecache thrashing and also will introduce the network workload.
    We should disable expanding the windows if the readahead is disabled
    and also shouldn't expand the windows too much.
    
    Expanding forward firstly instead of expanding backward for possible
    sequential reads.
    
    Bound `rreq->len` to the actual file size to restore the previous page
    cache usage.
    
    The posix_fadvise may change the maximum size of a file readahead.
    
    Cc: [email protected]
    Fixes: 4987005 ("ceph: convert ceph_readpages to ceph_readahead")
    Link: https://lore.kernel.org/ceph-devel/[email protected]
    Link: https://www.spinics.net/lists/ceph-users/msg76183.html
    Signed-off-by: Xiubo Li <[email protected]>
    Reviewed-and-tested-by: Hu Weiwen <[email protected]>
    Reviewed-by: Milind Changire <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    lxbsz authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    0471d90 View commit details
    Browse the repository at this point in the history
  162. ceph: don't let check_caps skip sending responses for revoke msgs

    commit 257e617 upstream.
    
    If a client sends out a cap update dropping caps with the prior 'seq'
    just before an incoming cap revoke request, then the client may drop
    the revoke because it believes it's already released the requested
    capabilities.
    
    This causes the MDS to wait indefinitely for the client to respond
    to the revoke. It's therefore always a good idea to ack the cap
    revoke request with the bumped up 'seq'.
    
    Cc: [email protected]
    Link: https://tracker.ceph.com/issues/61782
    Signed-off-by: Xiubo Li <[email protected]>
    Reviewed-by: Milind Changire <[email protected]>
    Reviewed-by: Patrick Donnelly <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    lxbsz authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    8293614 View commit details
    Browse the repository at this point in the history
  163. xhci: Fix resume issue of some ZHAOXIN hosts

    commit f927728 upstream.
    
    On ZHAOXIN ZX-100 project, xHCI can't work normally after resume
    from system Sx state. To fix this issue, when resume from system
    Sx state, reinitialize xHCI instead of restore.
    So, Add XHCI_RESET_ON_RESUME quirk for ZX-100 to fix issue of
    resuming from system Sx state.
    
    Cc: [email protected]
    Signed-off-by: Weitao Wang <[email protected]>
    Signed-off-by: Mathias Nyman <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Weitao Wang authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    8e273a2 View commit details
    Browse the repository at this point in the history
  164. xhci: Fix TRB prefetch issue of ZHAOXIN hosts

    commit 2a865a6 upstream.
    
    On some ZHAOXIN hosts, xHCI will prefetch TRB for performance
    improvement. However this TRB prefetch mechanism may cross page boundary,
    which may access memory not allocated by xHCI driver. In order to fix
    this issue, two pages was allocated for a segment and only the first
    page will be used. And add a quirk XHCI_ZHAOXIN_TRB_FETCH for this issue.
    
    Cc: [email protected]
    Signed-off-by: Weitao Wang <[email protected]>
    Signed-off-by: Mathias Nyman <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Weitao Wang authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    892ef75 View commit details
    Browse the repository at this point in the history
  165. xhci: Show ZHAOXIN xHCI root hub speed correctly

    commit d9b0328 upstream.
    
    Some ZHAOXIN xHCI controllers follow usb3.1 spec, but only support
    gen1 speed 5Gbps. While in Linux kernel, if xHCI suspport usb3.1,
    root hub speed will show on 10Gbps.
    To fix this issue of ZHAOXIN xHCI platforms, read usb speed ID
    supported by xHCI to determine root hub speed. And add a quirk
    XHCI_ZHAOXIN_HOST for this issue.
    
    [fix warning about uninitialized symbol -Mathias]
    
    Suggested-by: Mathias Nyman <[email protected]>
    Cc: [email protected]
    Signed-off-by: Weitao Wang <[email protected]>
    Signed-off-by: Mathias Nyman <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Weitao Wang authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    610ddd7 View commit details
    Browse the repository at this point in the history
  166. meson saradc: fix clock divider mask length

    commit c57fa00 upstream.
    
    According to the datasheets of supported meson SoCs length of ADC_CLK_DIV
    field is 6-bit. Although all supported SoCs have the register
    with that field documented later SoCs use external clock rather than
    ADC internal clock so this patch affects only meson8 family (S8* SoCs).
    
    Fixes: 3adbf34 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs")
    Signed-off-by: George Stark <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Reviewed-by: Martin Blumenstingl <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    geo-stark authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    be06ffa View commit details
    Browse the repository at this point in the history
  167. opp: Fix use-after-free in lazy_opp_tables after probe deferral

    commit b2a2ab0 upstream.
    
    When dev_pm_opp_of_find_icc_paths() in _allocate_opp_table() returns
    -EPROBE_DEFER, the opp_table is freed again, to wait until all the
    interconnect paths are available.
    
    However, if the OPP table is using required-opps then it may already
    have been added to the global lazy_opp_tables list. The error path
    does not remove the opp_table from the list again.
    
    This can cause crashes later when the provider of the required-opps
    is added, since we will iterate over OPP tables that have already been
    freed. E.g.:
    
      Unable to handle kernel NULL pointer dereference when read
      CPU: 0 PID: 7 Comm: kworker/0:0 Not tainted 6.4.0-rc3
      PC is at _of_add_opp_table_v2 (include/linux/of.h:949
      drivers/opp/of.c:98 drivers/opp/of.c:344 drivers/opp/of.c:404
      drivers/opp/of.c:1032) -> lazy_link_required_opp_table()
    
    Fix this by calling _of_clear_opp_table() to remove the opp_table from
    the list and clear other allocated resources. While at it, also add the
    missing mutex_destroy() calls in the error path.
    
    Cc: [email protected]
    Suggested-by: Viresh Kumar <[email protected]>
    Fixes: 7eba0c7 ("opp: Allow lazy-linking of required-opps")
    Signed-off-by: Stephan Gerhold <[email protected]>
    Signed-off-by: Viresh Kumar <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    stephan-gh authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    76ab057 View commit details
    Browse the repository at this point in the history
  168. soundwire: qcom: fix storing port config out-of-bounds

    commit 490937d upstream.
    
    The 'qcom_swrm_ctrl->pconfig' has size of QCOM_SDW_MAX_PORTS (14),
    however we index it starting from 1, not 0, to match real port numbers.
    This can lead to writing port config past 'pconfig' bounds and
    overwriting next member of 'qcom_swrm_ctrl' struct.  Reported also by
    smatch:
    
      drivers/soundwire/qcom.c:1269 qcom_swrm_get_port_config() error: buffer overflow 'ctrl->pconfig' 14 <= 14
    
    Fixes: 9916c02 ("soundwire: qcom: cleanup internal port config indexing")
    Cc: <[email protected]>
    Reported-by: kernel test robot <[email protected]>
    Reported-by: Dan Carpenter <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]/
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Reviewed-by: Konrad Dybcio <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    krzk authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    801daff View commit details
    Browse the repository at this point in the history
  169. Revert "8250: add support for ASIX devices with a FIFO bug"

    commit a82d62f upstream.
    
    This reverts commit eb26dfe.
    
    Commit eb26dfe ("8250: add support for ASIX devices with a FIFO
    bug") merged on Jul 13, 2012 adds a quirk for PCI_VENDOR_ID_ASIX
    (0x9710). But that ID is the same as PCI_VENDOR_ID_NETMOS defined in
    1f8b061050c7 ("[PATCH] Netmos parallel/serial/combo support") merged
    on Mar 28, 2005. In pci_serial_quirks array, the NetMos entry always
    takes precedence over the ASIX entry even since it was initially
    merged, code in that commit is always unreachable.
    
    In my tests, adding the FIFO workaround to pci_netmos_init() makes no
    difference, and the vendor driver also does not have such workaround.
    Given that the code was never used for over a decade, it's safe to
    revert it.
    
    Also, the real PCI_VENDOR_ID_ASIX should be 0x125b, which is used on
    their newer AX99100 PCIe serial controllers released on 2016. The FIFO
    workaround should not be intended for these newer controllers, and it
    was never implemented in vendor driver.
    
    Fixes: eb26dfe ("8250: add support for ASIX devices with a FIFO bug")
    Cc: stable <[email protected]>
    Signed-off-by: Jiaqing Zhao <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jiaqingz-intel authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    599c0eb View commit details
    Browse the repository at this point in the history
  170. bus: ixp4xx: fix IXP4XX_EXP_T1_MASK

    commit 6722e46 upstream.
    
    The IXP4XX_EXP_T1_MASK was shifted one bit to the right, overlapping
    IXP4XX_EXP_T2_MASK and leaving bit 29 unused. The offset being wrong is
    also confirmed at least by the datasheet of IXP45X/46X [1].
    
    Fix this by aligning it to IXP4XX_EXP_T1_SHIFT.
    
    [1] https://www.intel.com/content/dam/www/public/us/en/documents/manuals/ixp45x-ixp46x-developers-manual.pdf
    
    Cc: [email protected]
    Fixes: 1c953bd ("bus: ixp4xx: Add a driver for IXP4xx expansion bus")
    Signed-off-by: Jonas Gorski <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Linus Walleij <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    KanjiMonster authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2ebf4dd View commit details
    Browse the repository at this point in the history
  171. s390/decompressor: fix misaligned symbol build error

    commit 938f0c3 upstream.
    
    Nathan Chancellor reported a kernel build error on Fedora 39:
    
    $ clang --version | head -1
    clang version 16.0.5 (Fedora 16.0.5-1.fc39)
    
    $ s390x-linux-gnu-ld --version | head -1
    GNU ld version 2.40-1.fc39
    
    $ make -skj"$(nproc)" ARCH=s390 CC=clang CROSS_COMPILE=s390x-linux-gnu- olddefconfig all
    s390x-linux-gnu-ld: arch/s390/boot/startup.o(.text+0x5b4): misaligned symbol `_decompressor_end' (0x35b0f) for relocation R_390_PC32DBL
    make[3]: *** [.../arch/s390/boot/Makefile:78: arch/s390/boot/vmlinux] Error 1
    
    It turned out that the problem with misaligned symbols on s390 was fixed
    with commit 80ddf5c ("s390: always build relocatable kernel") for the
    kernel image, but did not take into account that the decompressor uses its
    own set of CFLAGS, which come without -fPIE.
    
    Add the -fPIE flag also to the decompresser CFLAGS to fix this.
    
    Reported-by: Nathan Chancellor <[email protected]>
    Tested-by: Nathan Chancellor <[email protected]>
    Reported-by: CKI <[email protected]>
    Suggested-by: Ulrich Weigand <[email protected]>
    Link: ClangBuiltLinux/linux#1747
    Link: https://lore.kernel.org/[email protected]/
    Link: https://lore.kernel.org/r/[email protected]
    Cc: <[email protected]>
    Signed-off-by: Heiko Carstens <[email protected]>
    Signed-off-by: Alexander Gordeev <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hcahca authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    08aaeda View commit details
    Browse the repository at this point in the history
  172. dm: verity-loadpin: Add NULL pointer check for 'bdev' parameter

    commit 47f0461 upstream.
    
    Add a NULL check for the 'bdev' parameter of
    dm_verity_loadpin_is_bdev_trusted(). The function is called
    by loadpin_check(), which passes the block device that
    corresponds to the super block of the file system from which
    a file is being loaded. Generally a super_block structure has
    an associated block device, however that is not always the
    case (e.g. tmpfs).
    
    Cc: [email protected] # v6.0+
    Fixes: b6c1c57 ("dm: Add verity helpers for LoadPin")
    Signed-off-by: Matthias Kaehlcke <[email protected]>
    Link: https://lore.kernel.org/r/20230627202800.1.Id63f7f59536d20f1ab83e1abdc1fda1471c7d031@changeid
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Matthias Kaehlcke authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    0a1dc63 View commit details
    Browse the repository at this point in the history
  173. tracing/histograms: Add histograms to hist_vars if they have referenc…

    …ed variables
    
    commit 6018b58 upstream.
    
    Hist triggers can have referenced variables without having direct
    variables fields. This can be the case if referenced variables are added
    for trigger actions. In this case the newly added references will not
    have field variables. Not taking such referenced variables into
    consideration can result in a bug where it would be possible to remove
    hist trigger with variables being refenced. This will result in a bug
    that is easily reproducable like so
    
    $ cd /sys/kernel/tracing
    $ echo 'synthetic_sys_enter char[] comm; long id' >> synthetic_events
    $ echo 'hist:keys=common_pid.execname,id.syscall:vals=hitcount:comm=common_pid.execname' >> events/raw_syscalls/sys_enter/trigger
    $ echo 'hist:keys=common_pid.execname,id.syscall:onmatch(raw_syscalls.sys_enter).synthetic_sys_enter($comm, id)' >> events/raw_syscalls/sys_enter/trigger
    $ echo '!hist:keys=common_pid.execname,id.syscall:vals=hitcount:comm=common_pid.execname' >> events/raw_syscalls/sys_enter/trigger
    
    [  100.263533] ==================================================================
    [  100.264634] BUG: KASAN: slab-use-after-free in resolve_var_refs+0xc7/0x180
    [  100.265520] Read of size 8 at addr ffff88810375d0f0 by task bash/439
    [  100.266320]
    [  100.266533] CPU: 2 PID: 439 Comm: bash Not tainted 6.5.0-rc1 #4
    [  100.267277] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-20220807_005459-localhost 04/01/2014
    [  100.268561] Call Trace:
    [  100.268902]  <TASK>
    [  100.269189]  dump_stack_lvl+0x4c/0x70
    [  100.269680]  print_report+0xc5/0x600
    [  100.270165]  ? resolve_var_refs+0xc7/0x180
    [  100.270697]  ? kasan_complete_mode_report_info+0x80/0x1f0
    [  100.271389]  ? resolve_var_refs+0xc7/0x180
    [  100.271913]  kasan_report+0xbd/0x100
    [  100.272380]  ? resolve_var_refs+0xc7/0x180
    [  100.272920]  __asan_load8+0x71/0xa0
    [  100.273377]  resolve_var_refs+0xc7/0x180
    [  100.273888]  event_hist_trigger+0x749/0x860
    [  100.274505]  ? kasan_save_stack+0x2a/0x50
    [  100.275024]  ? kasan_set_track+0x29/0x40
    [  100.275536]  ? __pfx_event_hist_trigger+0x10/0x10
    [  100.276138]  ? ksys_write+0xd1/0x170
    [  100.276607]  ? do_syscall_64+0x3c/0x90
    [  100.277099]  ? entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    [  100.277771]  ? destroy_hist_data+0x446/0x470
    [  100.278324]  ? event_hist_trigger_parse+0xa6c/0x3860
    [  100.278962]  ? __pfx_event_hist_trigger_parse+0x10/0x10
    [  100.279627]  ? __kasan_check_write+0x18/0x20
    [  100.280177]  ? mutex_unlock+0x85/0xd0
    [  100.280660]  ? __pfx_mutex_unlock+0x10/0x10
    [  100.281200]  ? kfree+0x7b/0x120
    [  100.281619]  ? ____kasan_slab_free+0x15d/0x1d0
    [  100.282197]  ? event_trigger_write+0xac/0x100
    [  100.282764]  ? __kasan_slab_free+0x16/0x20
    [  100.283293]  ? __kmem_cache_free+0x153/0x2f0
    [  100.283844]  ? sched_mm_cid_remote_clear+0xb1/0x250
    [  100.284550]  ? __pfx_sched_mm_cid_remote_clear+0x10/0x10
    [  100.285221]  ? event_trigger_write+0xbc/0x100
    [  100.285781]  ? __kasan_check_read+0x15/0x20
    [  100.286321]  ? __bitmap_weight+0x66/0xa0
    [  100.286833]  ? _find_next_bit+0x46/0xe0
    [  100.287334]  ? task_mm_cid_work+0x37f/0x450
    [  100.287872]  event_triggers_call+0x84/0x150
    [  100.288408]  trace_event_buffer_commit+0x339/0x430
    [  100.289073]  ? ring_buffer_event_data+0x3f/0x60
    [  100.292189]  trace_event_raw_event_sys_enter+0x8b/0xe0
    [  100.295434]  syscall_trace_enter.constprop.0+0x18f/0x1b0
    [  100.298653]  syscall_enter_from_user_mode+0x32/0x40
    [  100.301808]  do_syscall_64+0x1a/0x90
    [  100.304748]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    [  100.307775] RIP: 0033:0x7f686c75c1cb
    [  100.310617] Code: 73 01 c3 48 8b 0d 65 3c 10 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 21 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 35 3c 10 00 f7 d8 64 89 01 48
    [  100.317847] RSP: 002b:00007ffc60137a38 EFLAGS: 00000246 ORIG_RAX: 0000000000000021
    [  100.321200] RAX: ffffffffffffffda RBX: 000055f566469ea0 RCX: 00007f686c75c1cb
    [  100.324631] RDX: 0000000000000001 RSI: 0000000000000001 RDI: 000000000000000a
    [  100.328104] RBP: 00007ffc60137ac0 R08: 00007f686c818460 R09: 000000000000000a
    [  100.331509] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000009
    [  100.334992] R13: 0000000000000007 R14: 000000000000000a R15: 0000000000000007
    [  100.338381]  </TASK>
    
    We hit the bug because when second hist trigger has was created
    has_hist_vars() returned false because hist trigger did not have
    variables. As a result of that save_hist_vars() was not called to add
    the trigger to trace_array->hist_vars. Later on when we attempted to
    remove the first histogram find_any_var_ref() failed to detect it is
    being used because it did not find the second trigger in hist_vars list.
    
    With this change we wait until trigger actions are created so we can take
    into consideration if hist trigger has variable references. Also, now we
    check the return value of save_hist_vars() and fail trigger creation if
    save_hist_vars() fails.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Fixes: 067fe03 ("tracing: Add variable reference handling to hist triggers")
    Signed-off-by: Mohamed Khalfella <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Mohamed Khalfella authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    5fd32eb View commit details
    Browse the repository at this point in the history
  174. tracing: Fix memory leak of iter->temp when reading trace_pipe

    commit d5a8218 upstream.
    
    kmemleak reports:
      unreferenced object 0xffff88814d14e200 (size 256):
        comm "cat", pid 336, jiffies 4294871818 (age 779.490s)
        hex dump (first 32 bytes):
          04 00 01 03 00 00 00 00 08 00 00 00 00 00 00 00  ................
          0c d8 c8 9b ff ff ff ff 04 5a ca 9b ff ff ff ff  .........Z......
        backtrace:
          [<ffffffff9bdff18f>] __kmalloc+0x4f/0x140
          [<ffffffff9bc9238b>] trace_find_next_entry+0xbb/0x1d0
          [<ffffffff9bc9caef>] trace_print_lat_context+0xaf/0x4e0
          [<ffffffff9bc94490>] print_trace_line+0x3e0/0x950
          [<ffffffff9bc95499>] tracing_read_pipe+0x2d9/0x5a0
          [<ffffffff9bf03a43>] vfs_read+0x143/0x520
          [<ffffffff9bf04c2d>] ksys_read+0xbd/0x160
          [<ffffffff9d0f0edf>] do_syscall_64+0x3f/0x90
          [<ffffffff9d2000aa>] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    
    when reading file 'trace_pipe', 'iter->temp' is allocated or relocated
    in trace_find_next_entry() but not freed before 'trace_pipe' is closed.
    
    To fix it, free 'iter->temp' in tracing_release_pipe().
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Fixes: ff89510 ("tracing: Save off entry when peeking at next entry")
    Signed-off-by: Zheng Yejian <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Zheng Yejian authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    be970e2 View commit details
    Browse the repository at this point in the history
  175. nvme: don't reject probe due to duplicate IDs for single-ported PCIe …

    …devices
    
    commit ac522fc upstream.
    
    While duplicate IDs are still very harmful, including the potential to easily
    see changing devices in /dev/disk/by-id, it turn out they are extremely
    common for cheap end user NVMe devices.
    
    Relax our check for them for so that it doesn't reject the probe on
    single-ported PCIe devices, but prints a big warning instead.  In doubt
    we'd still like to see quirk entries to disable the potential for
    changing supposed stable device identifier links, but this will at least
    allow users how have two (or more) of these devices to use them without
    having to manually add a new PCI ID entry with the quirk through sysfs or
    by patching the kernel.
    
    Fixes: 2079f41 ("nvme: check that EUI/GUID/UUID are globally unique")
    Cc: [email protected] # 6.0+
    Co-developed-by: Sagi Grimberg <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Christoph Hellwig authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    9d6a260 View commit details
    Browse the repository at this point in the history
  176. samples: ftrace: Save required argument registers in sample trampolines

    commit 8564c31 upstream.
    
    The ftrace-direct-too sample traces the handle_mm_fault function whose
    signature changed since the introduction of the sample. Since:
    commit bce617e ("mm: do page fault accounting in handle_mm_fault")
    handle_mm_fault now has 4 arguments. Therefore, the sample trampoline
    should save 4 argument registers.
    
    s390 saves all argument registers already so it does not need a change
    but x86_64 needs an extra push and pop.
    
    This also evolves the signature of the tracing function to make it
    mirror the signature of the traced function.
    
    Link: https://lkml.kernel.org/r/[email protected]
    
    Cc: [email protected]
    Fixes: bce617e ("mm: do page fault accounting in handle_mm_fault")
    Reviewed-by: Steven Rostedt (Google) <[email protected]>
    Reviewed-by: Mark Rutland <[email protected]>
    Acked-by: Catalin Marinas <[email protected]>
    Signed-off-by: Florent Revest <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    FlorentRevest authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    e2c7a05 View commit details
    Browse the repository at this point in the history
  177. perf: RISC-V: Remove PERF_HES_STOPPED flag checking in riscv_pmu_start()

    commit 66843b1 upstream.
    
    Since commit 096b52f ("perf: RISC-V: throttle perf events") the
    perf_sample_event_took() function was added to report time spent in
    overflow interrupts. If the interrupt takes too long, the perf framework
    will lower the sysctl_perf_event_sample_rate and max_samples_per_tick.
    When hwc->interrupts is larger than max_samples_per_tick, the
    hwc->interrupts will be set to MAX_INTERRUPTS, and events will be
    throttled within the __perf_event_account_interrupt() function.
    
    However, the RISC-V PMU driver doesn't call riscv_pmu_stop() to update the
    PERF_HES_STOPPED flag after perf_event_overflow() in pmu_sbi_ovf_handler()
    function to avoid throttling. When the perf framework unthrottled the event
    in the timer interrupt handler, it triggers riscv_pmu_start() function
    and causes a WARN_ON_ONCE() warning, as shown below:
    
     ------------[ cut here ]------------
     WARNING: CPU: 0 PID: 240 at drivers/perf/riscv_pmu.c:184 riscv_pmu_start+0x7c/0x8e
     Modules linked in:
     CPU: 0 PID: 240 Comm: ls Not tainted 6.4-rc4-g19d0788e9ef2 #1
     Hardware name: SiFive (DT)
     epc : riscv_pmu_start+0x7c/0x8e
      ra : riscv_pmu_start+0x28/0x8e
     epc : ffffffff80aef864 ra : ffffffff80aef810 sp : ffff8f80004db6f0
      gp : ffffffff81c83750 tp : ffffaf80069f9bc0 t0 : ffff8f80004db6c0
      t1 : 0000000000000000 t2 : 000000000000001f s0 : ffff8f80004db720
      s1 : ffffaf8008ca1068 a0 : 0000ffffffffffff a1 : 0000000000000000
      a2 : 0000000000000001 a3 : 0000000000000870 a4 : 0000000000000000
      a5 : 0000000000000000 a6 : 0000000000000840 a7 : 0000000000000030
      s2 : 0000000000000000 s3 : ffffaf8005165800 s4 : ffffaf800424da00
      s5 : ffffffffffffffff s6 : ffffffff81cc7590 s7 : 0000000000000000
      s8 : 0000000000000006 s9 : 0000000000000001 s10: ffffaf807efbc340
      s11: ffffaf807efbbf00 t3 : ffffaf8006a16028 t4 : 00000000dbfbb796
      t5 : 0000000700000000 t6 : ffffaf8005269870
     status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003
     [<ffffffff80aef864>] riscv_pmu_start+0x7c/0x8e
     [<ffffffff80185b56>] perf_adjust_freq_unthr_context+0x15e/0x174
     [<ffffffff80188642>] perf_event_task_tick+0x88/0x9c
     [<ffffffff800626a8>] scheduler_tick+0xfe/0x27c
     [<ffffffff800b5640>] update_process_times+0x9a/0xba
     [<ffffffff800c5bd4>] tick_sched_handle+0x32/0x66
     [<ffffffff800c5e0c>] tick_sched_timer+0x64/0xb0
     [<ffffffff800b5e50>] __hrtimer_run_queues+0x156/0x2f4
     [<ffffffff800b6bdc>] hrtimer_interrupt+0xe2/0x1fe
     [<ffffffff80acc9e8>] riscv_timer_interrupt+0x38/0x42
     [<ffffffff80090a16>] handle_percpu_devid_irq+0x90/0x1d2
     [<ffffffff8008a9f4>] generic_handle_domain_irq+0x28/0x36
    
    After referring other PMU drivers like Arm, Loongarch, Csky, and Mips,
    they don't call *_pmu_stop() to update with PERF_HES_STOPPED flag
    after perf_event_overflow() function nor do they add PERF_HES_STOPPED
    flag checking in *_pmu_start() which don't cause this warning.
    
    Thus, it's recommended to remove this unnecessary check in
    riscv_pmu_start() function to prevent this warning.
    
    Signed-off-by: Eric Lin <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 096b52f ("perf: RISC-V: throttle perf events")
    Cc: [email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dslin1010 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    aeb62be View commit details
    Browse the repository at this point in the history
  178. regmap-irq: Fix out-of-bounds access when allocating config buffers

    commit 963b54d upstream.
    
    When allocating the 2D array for handling IRQ type registers in
    regmap_add_irq_chip_fwnode(), the intent is to allocate a matrix
    with num_config_bases rows and num_config_regs columns.
    
    This is currently handled by allocating a buffer to hold a pointer for
    each row (i.e. num_config_bases). After that, the logic attempts to
    allocate the memory required to hold the register configuration for
    each row. However, instead of doing this allocation for each row
    (i.e. num_config_bases allocations), the logic erroneously does this
    allocation num_config_regs number of times.
    
    This scenario can lead to out-of-bounds accesses when num_config_regs
    is greater than num_config_bases. Fix this by updating the terminating
    condition of the loop that allocates the memory for holding the register
    configuration to allocate memory only for each row in the matrix.
    
    Amit Pundir reported a crash that was occurring on his db845c device
    due to memory corruption (see "Closes" tag for Amit's report). The KASAN
    report below helped narrow it down to this issue:
    
    [   14.033877][    T1] ==================================================================
    [   14.042507][    T1] BUG: KASAN: invalid-access in regmap_add_irq_chip_fwnode+0x594/0x1364
    [   14.050796][    T1] Write of size 8 at addr 06ffff8081021850 by task init/1
    
    [   14.242004][    T1] The buggy address belongs to the object at ffffff8081021850
    [   14.242004][    T1]  which belongs to the cache kmalloc-8 of size 8
    [   14.255669][    T1] The buggy address is located 0 bytes inside of
    [   14.255669][    T1]  8-byte region [ffffff8081021850, ffffff8081021858)
    
    Fixes: faa87ce ("regmap-irq: Introduce config registers for irq types")
    Reported-by: Amit Pundir <[email protected]>
    Closes: https://lore.kernel.org/all/CAMi1Hd04mu6JojT3y6wyN2YeVkPR5R3qnkKJ8iR8if_YByCn4w@mail.gmail.com/
    Tested-by: John Stultz <[email protected]>
    Tested-by: Amit Pundir <[email protected]> # tested on Dragonboard 845c
    Cc: [email protected] # v6.0+
    Cc: Aidan MacDonald <[email protected]>
    Cc: Saravana Kannan <[email protected]>
    Cc: Catalin Marinas <[email protected]>
    Signed-off-by: "Isaac J. Manjarres" <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Isaac J. Manjarres authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    b1a726a View commit details
    Browse the repository at this point in the history
  179. net: ena: fix shift-out-of-bounds in exponential backoff

    commit 1e9cb76 upstream.
    
    The ENA adapters on our instances occasionally reset.  Once recently
    logged a UBSAN failure to console in the process:
    
      UBSAN: shift-out-of-bounds in build/linux/drivers/net/ethernet/amazon/ena/ena_com.c:540:13
      shift exponent 32 is too large for 32-bit type 'unsigned int'
      CPU: 28 PID: 70012 Comm: kworker/u72:2 Kdump: loaded not tainted 5.15.117
      Hardware name: Amazon EC2 c5d.9xlarge/, BIOS 1.0 10/16/2017
      Workqueue: ena ena_fw_reset_device [ena]
      Call Trace:
      <TASK>
      dump_stack_lvl+0x4a/0x63
      dump_stack+0x10/0x16
      ubsan_epilogue+0x9/0x36
      __ubsan_handle_shift_out_of_bounds.cold+0x61/0x10e
      ? __const_udelay+0x43/0x50
      ena_delay_exponential_backoff_us.cold+0x16/0x1e [ena]
      wait_for_reset_state+0x54/0xa0 [ena]
      ena_com_dev_reset+0xc8/0x110 [ena]
      ena_down+0x3fe/0x480 [ena]
      ena_destroy_device+0xeb/0xf0 [ena]
      ena_fw_reset_device+0x30/0x50 [ena]
      process_one_work+0x22b/0x3d0
      worker_thread+0x4d/0x3f0
      ? process_one_work+0x3d0/0x3d0
      kthread+0x12a/0x150
      ? set_kthread_struct+0x50/0x50
      ret_from_fork+0x22/0x30
      </TASK>
    
    Apparently, the reset delays are getting so large they can trigger a
    UBSAN panic.
    
    Looking at the code, the current timeout is capped at 5000us.  Using a
    base value of 100us, the current code will overflow after (1<<29).  Even
    at values before 32, this function wraps around, perhaps
    unintentionally.
    
    Cap the value of the exponent used for this backoff at (1<<16) which is
    larger than currently necessary, but large enough to support bigger
    values in the future.
    
    Cc: [email protected]
    Fixes: 4bb7f4c ("net: ena: reduce driver load time")
    Signed-off-by: Krister Johansen <[email protected]>
    Reviewed-by: Leon Romanovsky <[email protected]>
    Reviewed-by: Shay Agroskin <[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]>
    kmjohansen authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    90947eb View commit details
    Browse the repository at this point in the history
  180. ring-buffer: Fix deadloop issue on reading trace_pipe

    commit 7e42907 upstream.
    
    Soft lockup occurs when reading file 'trace_pipe':
    
      watchdog: BUG: soft lockup - CPU#6 stuck for 22s! [cat:4488]
      [...]
      RIP: 0010:ring_buffer_empty_cpu+0xed/0x170
      RSP: 0018:ffff88810dd6fc48 EFLAGS: 00000246
      RAX: 0000000000000000 RBX: 0000000000000246 RCX: ffffffff93d1aaeb
      RDX: ffff88810a280040 RSI: 0000000000000008 RDI: ffff88811164b218
      RBP: ffff88811164b218 R08: 0000000000000000 R09: ffff88815156600f
      R10: ffffed102a2acc01 R11: 0000000000000001 R12: 0000000051651901
      R13: 0000000000000000 R14: ffff888115e49500 R15: 0000000000000000
      [...]
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007f8d853c2000 CR3: 000000010dcd8000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       __find_next_entry+0x1a8/0x4b0
       ? peek_next_entry+0x250/0x250
       ? down_write+0xa5/0x120
       ? down_write_killable+0x130/0x130
       trace_find_next_entry_inc+0x3b/0x1d0
       tracing_read_pipe+0x423/0xae0
       ? tracing_splice_read_pipe+0xcb0/0xcb0
       vfs_read+0x16b/0x490
       ksys_read+0x105/0x210
       ? __ia32_sys_pwrite64+0x200/0x200
       ? switch_fpu_return+0x108/0x220
       do_syscall_64+0x33/0x40
       entry_SYSCALL_64_after_hwframe+0x61/0xc6
    
    Through the vmcore, I found it's because in tracing_read_pipe(),
    ring_buffer_empty_cpu() found some buffer is not empty but then it
    cannot read anything due to "rb_num_of_entries() == 0" always true,
    Then it infinitely loop the procedure due to user buffer not been
    filled, see following code path:
    
      tracing_read_pipe() {
        ... ...
        waitagain:
          tracing_wait_pipe() // 1. find non-empty buffer here
          trace_find_next_entry_inc()  // 2. loop here try to find an entry
            __find_next_entry()
              ring_buffer_empty_cpu();  // 3. find non-empty buffer
              peek_next_entry()  // 4. but peek always return NULL
                ring_buffer_peek()
                  rb_buffer_peek()
                    rb_get_reader_page()
                      // 5. because rb_num_of_entries() == 0 always true here
                      //    then return NULL
          // 6. user buffer not been filled so goto 'waitgain'
          //    and eventually leads to an deadloop in kernel!!!
      }
    
    By some analyzing, I found that when resetting ringbuffer, the 'entries'
    of its pages are not all cleared (see rb_reset_cpu()). Then when reducing
    the ringbuffer, and if some reduced pages exist dirty 'entries' data, they
    will be added into 'cpu_buffer->overrun' (see rb_remove_pages()), which
    cause wrong 'overrun' count and eventually cause the deadloop issue.
    
    To fix it, we need to clear every pages in rb_reset_cpu().
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Fixes: a5fb833 ("ring-buffer: Fix uninitialized read_stamp")
    Signed-off-by: Zheng Yejian <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Zheng Yejian authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    8b0b63f View commit details
    Browse the repository at this point in the history
  181. ftrace: Fix possible warning on checking all pages used in ftrace_pro…

    …cess_locs()
    
    commit 26efd79 upstream.
    
    As comments in ftrace_process_locs(), there may be NULL pointers in
    mcount_loc section:
     > Some architecture linkers will pad between
     > the different mcount_loc sections of different
     > object files to satisfy alignments.
     > Skip any NULL pointers.
    
    After commit 20e5227 ("ftrace: allow NULL pointers in mcount_loc"),
    NULL pointers will be accounted when allocating ftrace pages but skipped
    before adding into ftrace pages, this may result in some pages not being
    used. Then after commit 706c81f ("ftrace: Remove extra helper
    functions"), warning may occur at:
      WARN_ON(pg->next);
    
    To fix it, only warn for case that no pointers skipped but pages not used
    up, then free those unused pages after releasing ftrace_lock.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Fixes: 706c81f ("ftrace: Remove extra helper functions")
    Suggested-by: Steven Rostedt <[email protected]>
    Signed-off-by: Zheng Yejian <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Zheng Yejian authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    99fe81d View commit details
    Browse the repository at this point in the history
  182. drm/amd/pm: share the code around SMU13 pcie parameters update

    commit dcb489b upstream.
    
    So that SMU13.0.0 and SMU13.0.7 do not need to have one copy each.
    
    Signed-off-by: Evan Quan <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected] # 6.1.x
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Evan Quan authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    11dc77a View commit details
    Browse the repository at this point in the history
  183. drm/amd/pm: conditionally disable pcie lane/speed switching for SMU13

    commit 31c7a3b upstream.
    
    Intel platforms such as Sapphire Rapids and Raptor Lake don't support
    dynamic pcie lane or speed switching.
    
    This limitation seems to carry over from one generation to another.
    To be safer, disable dynamic pcie lane width and speed switching when
    running on an Intel platform.
    
    Link: https://edc.intel.com/content/www/us/en/design/products/platforms/details/raptor-lake-s/13th-generation-core-processors-datasheet-volume-1-of-2/005/pci-express-support/
    Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2663
    Co-developed-by: Evan Quan <[email protected]>
    Signed-off-by: Evan Quan <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected] # 6.1.x
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    bd8cd38 View commit details
    Browse the repository at this point in the history
  184. cifs: if deferred close is disabled then close files immediately

    commit df9d70c upstream.
    
    If defer close timeout value is set to 0, then there is no
    need to include files in the deferred close list and utilize
    the delayed worker for closing. Instead, we can close them
    immediately.
    
    Signed-off-by: Bharath SM <[email protected]>
    Reviewed-by: Shyam Prasad N <[email protected]>
    Cc: [email protected]
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bharathsm-ms authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    6a05de6 View commit details
    Browse the repository at this point in the history
  185. xtensa: ISS: fix call to split_if_spec

    commit bc8d591 upstream.
    
    split_if_spec expects a NULL-pointer as an end marker for the argument
    list, but tuntap_probe never supplied that terminating NULL. As a result
    incorrectly formatted interface specification string may cause a crash
    because of the random memory access. Fix that by adding NULL terminator
    to the split_if_spec argument list.
    
    Cc: [email protected]
    Fixes: 7282bee ("[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 8")
    Signed-off-by: Max Filippov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jcmvbkbc authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    22fc9fd View commit details
    Browse the repository at this point in the history
  186. perf/x86: Fix lockdep warning in for_each_sibling_event() on SPR

    commit 27c68c2 upstream.
    
    On SPR, the load latency event needs an auxiliary event in the same
    group to work properly.  There's a check in intel_pmu_hw_config()
    for this to iterate sibling events and find a mem-loads-aux event.
    
    The for_each_sibling_event() has a lockdep assert to make sure if it
    disabled hardirq or hold leader->ctx->mutex.  This works well if the
    given event has a separate leader event since perf_try_init_event()
    grabs the leader->ctx->mutex to protect the sibling list.  But it can
    cause a problem when the event itself is a leader since the event is
    not initialized yet and there's no ctx for the event.
    
    Actually I got a lockdep warning when I run the below command on SPR,
    but I guess it could be a NULL pointer dereference.
    
      $ perf record -d -e cpu/mem-loads/uP true
    
    The code path to the warning is:
    
      sys_perf_event_open()
        perf_event_alloc()
          perf_init_event()
            perf_try_init_event()
              x86_pmu_event_init()
                hsw_hw_config()
                  intel_pmu_hw_config()
                    for_each_sibling_event()
                      lockdep_assert_event_ctx()
    
    We don't need for_each_sibling_event() when it's a standalone event.
    Let's return the error code directly.
    
    Fixes: f3c0eba ("perf: Add a few assertions")
    Reported-by: Greg Thelen <[email protected]>
    Signed-off-by: Namhyung Kim <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Cc: [email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    namhyung authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    15ec83d View commit details
    Browse the repository at this point in the history
  187. PM: QoS: Restore support for default value on frequency QoS

    commit 3a8395b upstream.
    
    Commit 8d36694 ("PM: QoS: Add check to make sure CPU freq is
    non-negative") makes sure CPU freq is non-negative to avoid negative
    value converting to unsigned data type. However, when the value is
    PM_QOS_DEFAULT_VALUE, pm_qos_update_target specifically uses
    c->default_value which is set to FREQ_QOS_MIN/MAX_DEFAULT_VALUE when
    cpufreq_policy_alloc is executed, for this case handling.
    
    Adding check for PM_QOS_DEFAULT_VALUE to let default setting work will
    fix this problem.
    
    Fixes: 8d36694 ("PM: QoS: Add check to make sure CPU freq is non-negative")
    Link: https://lore.kernel.org/lkml/[email protected]/
    Link: https://lore.kernel.org/lkml/[email protected]/
    Link: https://lore.kernel.org/lkml/CAJZ5v0gxNOWhC58PHeUhW_tgf6d1fGJVZ1x91zkDdht11yUv-A@mail.gmail.com/
    Signed-off-by: Chungkai Yang <[email protected]>
    Cc: 6.0+ <[email protected]> # 6.0+
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Chungkai Yang authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    9a2c57f View commit details
    Browse the repository at this point in the history
  188. pwm: meson: modify and simplify calculation in meson_pwm_get_state

    commit 6b9352f upstream.
    
    I don't see a reason why we should treat the case lo < hi differently
    and return 0 as period and duty_cycle. The current logic was added with
    c375bcb ("pwm: meson: Read the full hardware state in
    meson_pwm_get_state()"), Martin as original author doesn't remember why
    it was implemented this way back then.
    So let's handle it as normal use case and also remove the optimization
    for lo == 0. I think the improved readability is worth it.
    
    Fixes: c375bcb ("pwm: meson: Read the full hardware state in meson_pwm_get_state()")
    Reviewed-by: Uwe Kleine-König <[email protected]>
    Reviewed-by: Dmitry Rokosov <[email protected]>
    Acked-by: Martin Blumenstingl <[email protected]>
    Cc: [email protected]
    Signed-off-by: Heiner Kallweit <[email protected]>
    Signed-off-by: Thierry Reding <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hkallweit authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ba1ede1 View commit details
    Browse the repository at this point in the history
  189. pwm: meson: fix handling of period/duty if greater than UINT_MAX

    commit 87a2cbf upstream.
    
    state->period/duty are of type u64, and if their value is greater than
    UINT_MAX, then the cast to uint will cause problems. Fix this by
    changing the type of the respective local variables to u64.
    
    Fixes: b79c367 ("pwm: meson: Don't duplicate the polarity internally")
    Cc: [email protected]
    Suggested-by: Uwe Kleine-König <[email protected]>
    Reviewed-by: Martin Blumenstingl <[email protected]>
    Signed-off-by: Heiner Kallweit <[email protected]>
    Signed-off-by: Thierry Reding <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hkallweit authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2e9a46e View commit details
    Browse the repository at this point in the history
  190. fprobe: Release rethook after the ftrace_ops is unregistered

    commit 5f81018 upstream.
    
    While running bpf selftests it's possible to get following fault:
    
      general protection fault, probably for non-canonical address \
      0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC NOPTI
      ...
      Call Trace:
       <TASK>
       fprobe_handler+0xc1/0x270
       ? __pfx_bpf_testmod_init+0x10/0x10
       ? __pfx_bpf_testmod_init+0x10/0x10
       ? bpf_fentry_test1+0x5/0x10
       ? bpf_fentry_test1+0x5/0x10
       ? bpf_testmod_init+0x22/0x80
       ? do_one_initcall+0x63/0x2e0
       ? rcu_is_watching+0xd/0x40
       ? kmalloc_trace+0xaf/0xc0
       ? do_init_module+0x60/0x250
       ? __do_sys_finit_module+0xac/0x120
       ? do_syscall_64+0x37/0x90
       ? entry_SYSCALL_64_after_hwframe+0x72/0xdc
       </TASK>
    
    In unregister_fprobe function we can't release fp->rethook while it's
    possible there are some of its users still running on another cpu.
    
    Moving rethook_free call after fp->ops is unregistered with
    unregister_ftrace_function call.
    
    Link: https://lore.kernel.org/all/[email protected]/
    
    Fixes: 5b0ab78 ("fprobe: Add exit_handler support")
    Cc: [email protected]
    Reviewed-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Jiri Olsa <[email protected]>
    Acked-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    olsajiri authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ce3ec57 View commit details
    Browse the repository at this point in the history
  191. fprobe: Ensure running fprobe_exit_handler() finished before calling …

    …rethook_free()
    
    commit 195b9cb upstream.
    
    Ensure running fprobe_exit_handler() has finished before
    calling rethook_free() in the unregister_fprobe() so that caller can free
    the fprobe right after unregister_fprobe().
    
    unregister_fprobe() ensured that all running fprobe_entry/exit_handler()
    have finished by calling unregister_ftrace_function() which synchronizes
    RCU. But commit 5f81018 ("fprobe: Release rethook after the ftrace_ops
    is unregistered") changed to call rethook_free() after
    unregister_ftrace_function(). So call rethook_stop() to make rethook
    disabled before unregister_ftrace_function() and ensure it again.
    
    Here is the possible code flow that can call the exit handler after
    unregister_fprobe().
    
    ------
     CPU1                              CPU2
     call unregister_fprobe(fp)
     ...
                                       __fprobe_handler()
                                       rethook_hook() on probed function
     unregister_ftrace_function()
                                       return from probed function
                                       rethook hooks
                                       find rh->handler == fprobe_exit_handler
                                       call fprobe_exit_handler()
     rethook_free():
       set rh->handler = NULL;
     return from unreigster_fprobe;
                                       call fp->exit_handler() <- (*)
    ------
    
    (*) At this point, the exit handler is called after returning from
    unregister_fprobe().
    
    This fixes it as following;
    ------
     CPU1                              CPU2
     call unregister_fprobe()
     ...
     rethook_stop():
       set rh->handler = NULL;
                                       __fprobe_handler()
                                       rethook_hook() on probed function
     unregister_ftrace_function()
                                       return from probed function
                                       rethook hooks
                                       find rh->handler == NULL
                                       return from rethook
     rethook_free()
     return from unreigster_fprobe;
    ------
    
    Link: https://lore.kernel.org/all/168873859949.156157.13039240432299335849.stgit@devnote2/
    
    Fixes: 5f81018 ("fprobe: Release rethook after the ftrace_ops is unregistered")
    Cc: [email protected]
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Reviewed-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mhiramat authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    fbcd0c2 View commit details
    Browse the repository at this point in the history
  192. tracing: Fix null pointer dereference in tracing_err_log_open()

    commit 02b0095 upstream.
    
    Fix an issue in function 'tracing_err_log_open'.
    The function doesn't call 'seq_open' if the file is opened only with
    write permissions, which results in 'file->private_data' being left as null.
    If we then use 'lseek' on that opened file, 'seq_lseek' dereferences
    'file->private_data' in 'mutex_lock(&m->lock)', resulting in a kernel panic.
    Writing to this node requires root privileges, therefore this bug
    has very little security impact.
    
    Tracefs node: /sys/kernel/tracing/error_log
    
    Example Kernel panic:
    
    Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038
    Call trace:
     mutex_lock+0x30/0x110
     seq_lseek+0x34/0xb8
     __arm64_sys_lseek+0x6c/0xb8
     invoke_syscall+0x58/0x13c
     el0_svc_common+0xc4/0x10c
     do_el0_svc+0x24/0x98
     el0_svc+0x24/0x88
     el0t_64_sync_handler+0x84/0xe4
     el0t_64_sync+0x1b4/0x1b8
    Code: d503201f aa0803e0 aa1f03e1 aa0103e9 (c8e97d02)
    ---[ end trace 561d1b49c12cf8a5 ]---
    Kernel panic - not syncing: Oops: Fatal exception
    
    Link: https://lore.kernel.org/linux-trace-kernel/20230703155237eucms1p4dfb6a19caa14c79eb6c823d127b39024@eucms1p4
    Link: https://lore.kernel.org/linux-trace-kernel/20230704102706eucms1p30d7ecdcc287f46ad67679fc8491b2e0f@eucms1p3
    
    Cc: [email protected]
    Fixes: 8a06290 ("tracing: Add tracing error log")
    Signed-off-by: Mateusz Stachyra <[email protected]>
    Suggested-by: Steven Rostedt <[email protected]>
    Acked-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mstachyraa authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    938d5b7 View commit details
    Browse the repository at this point in the history
  193. selftests: mptcp: connect: fail if nft supposed to work

    commit 221e455 upstream.
    
    In case of "external" errors when preparing the environment for the
    TProxy tests, the subtests were marked as skipped.
    
    This is fine but it means these errors are ignored. On MPTCP Public CI,
    we do want to catch such issues and mark the selftest as failed if there
    are such issues. We can then use mptcp_lib_fail_if_expected_feature()
    helper that has been recently added to fail if needed.
    
    Link: multipath-tcp/mptcp_net-next#368
    Fixes: 5fb62e9 ("selftests: mptcp: add tproxy test case")
    Cc: [email protected]
    Acked-by: Paolo Abeni <[email protected]>
    Signed-off-by: Matthieu Baerts <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    matttbe authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    6714867 View commit details
    Browse the repository at this point in the history
  194. selftests: mptcp: sockopt: return error if wrong mark

    commit 9ac4c28 upstream.
    
    When an error was detected when checking the marks, a message was
    correctly printed mentioning the error but followed by another one
    saying everything was OK and the selftest was not marked as failed as
    expected.
    
    Now the 'ret' variable is directly set to 1 in order to make sure the
    exit is done with an error, similar to what is done in other functions.
    While at it, the error is correctly propagated to the caller.
    
    Link: multipath-tcp/mptcp_net-next#368
    Fixes: dc65fe8 ("selftests: mptcp: add packet mark test case")
    Cc: [email protected]
    Acked-by: Paolo Abeni <[email protected]>
    Signed-off-by: Matthieu Baerts <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    matttbe authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c118baa View commit details
    Browse the repository at this point in the history
  195. selftests: mptcp: userspace_pm: use correct server port

    commit d8566d0 upstream.
    
    "server4_port" variable is not set but "app4_port" is the server port in
    v4 and the correct variable name to use.
    
    The port is optional so there was no visible impact.
    
    Link: multipath-tcp/mptcp_net-next#368
    Fixes: ca188a2 ("selftests: mptcp: userspace PM support for MP_PRIO signals")
    Cc: [email protected]
    Acked-by: Paolo Abeni <[email protected]>
    Signed-off-by: Matthieu Baerts <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    matttbe authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    4098a43 View commit details
    Browse the repository at this point in the history
  196. selftests: mptcp: userspace_pm: report errors with 'remove' tests

    commit 966c6c3 upstream.
    
    A message was mentioning an issue with the "remove" tests but the
    selftest was not marked as failed.
    
    Directly exit with an error like it is done everywhere else in this
    selftest.
    
    Link: multipath-tcp/mptcp_net-next#368
    Fixes: 259a834 ("selftests: mptcp: functional tests for the userspace PM type")
    Cc: [email protected]
    Acked-by: Paolo Abeni <[email protected]>
    Signed-off-by: Matthieu Baerts <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    matttbe authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    08daab1 View commit details
    Browse the repository at this point in the history
  197. selftests: mptcp: depend on SYN_COOKIES

    commit 6c8880f upstream.
    
    MPTCP selftests are using TCP SYN Cookies for quite a while now, since
    v5.9.
    
    Some CIs don't have this config option enabled and this is causing
    issues in the tests:
    
      # ns1 MPTCP -> ns1 (10.0.1.1:10000      ) MPTCP     (duration   167ms) sysctl: cannot stat /proc/sys/net/ipv4/tcp_syncookies: No such file or directory
      # [ OK ]./mptcp_connect.sh: line 554: [: -eq: unary operator expected
    
    There is no impact in the results but the test is not doing what it is
    supposed to do.
    
    Fixes: fed61c4 ("selftests: mptcp: make 2nd net namespace use tcp syn cookies unconditionally")
    Cc: [email protected]
    Signed-off-by: Matthieu Baerts <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    matttbe authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ee35229 View commit details
    Browse the repository at this point in the history
  198. selftests: mptcp: pm_nl_ctl: fix 32-bit support

    commit 61d9658 upstream.
    
    When using pm_nl_ctl to validate userspace path-manager's behaviours, it
    was failing on 32-bit architectures ~half of the time.
    
    pm_nl_ctl was not reporting any error but the command was not doing what
    it was expected to do. As a result, the expected linked event was not
    triggered after and the test failed.
    
    This is due to the fact the token given in argument to the application
    was parsed as an integer with atoi(): in a 32-bit arch, if the number
    was bigger than INT_MAX, 2147483647 was used instead.
    
    This can simply be fixed by using strtoul() instead of atoi().
    
    The errors have been seen "by chance" when manually looking at the
    results from LKFT.
    
    Fixes: 9a0b365 ("selftests: mptcp: support MPTCP_PM_CMD_ANNOUNCE")
    Cc: [email protected]
    Fixes: ecd2a77 ("selftests: mptcp: support MPTCP_PM_CMD_REMOVE")
    Fixes: cf8d0a6 ("selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_CREATE")
    Fixes: 57cc361 ("selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_DESTROY")
    Fixes: ca188a2 ("selftests: mptcp: userspace PM support for MP_PRIO signals")
    Signed-off-by: Matthieu Baerts <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    matttbe authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2f41d35 View commit details
    Browse the repository at this point in the history
  199. tracing/probes: Fix not to count error code to total length

    commit b41326b upstream.
    
    Fix not to count the error code (which is minus value) to the total
    used length of array, because it can mess up the return code of
    process_fetch_insn_bottom(). Also clear the 'ret' value because it
    will be used for calculating next data_loc entry.
    
    Link: https://lore.kernel.org/all/168908493827.123124.2175257289106364229.stgit@devnote2/
    
    Reported-by: Dan Carpenter <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Fixes: 9b960a3 ("tracing: probeevent: Unify fetch_insn processing common part")
    Cc: [email protected]
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Reviewed-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mhiramat authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    837f92d View commit details
    Browse the repository at this point in the history
  200. tracing/probes: Fix to update dynamic data counter if fetcharg uses it

    commit e38e2c6 upstream.
    
    Fix to update dynamic data counter ('dyndata') and max length ('maxlen')
    only if the fetcharg uses the dynamic data. Also get out arg->dynamic
    from unlikely(). This makes dynamic data address wrong if
    process_fetch_insn() returns error on !arg->dynamic case.
    
    Link: https://lore.kernel.org/all/168908494781.123124.8160245359962103684.stgit@devnote2/
    
    Suggested-by: Steven Rostedt <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]/
    Fixes: 9178412 ("tracing: probeevent: Return consumed bytes of dynamic area")
    Cc: [email protected]
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Reviewed-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mhiramat authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    a95c1fe View commit details
    Browse the repository at this point in the history
  201. tracing/user_events: Fix struct arg size match check

    commit d0a3022 upstream.
    
    When users register an event the name of the event and it's argument are
    checked to ensure they match if the event already exists. Normally all
    arguments are in the form of "type name", except for when the type
    starts with "struct ". In those cases, the size of the struct is passed
    in addition to the name, IE: "struct my_struct a 20" for an argument
    that is of type "struct my_struct" with a field name of "a" and has the
    size of 20 bytes.
    
    The current code does not honor the above case properly when comparing
    a match. This causes the event register to fail even when the same
    string was used for events that contain a struct argument within them.
    The example above "struct my_struct a 20" generates a match string of
    "struct my_struct a" omitting the size field.
    
    Add the struct size of the existing field when generating a comparison
    string for a struct field to ensure proper match checking.
    
    Link: https://lkml.kernel.org/r/[email protected]
    
    Cc: [email protected]
    Fixes: e6f89a1 ("tracing/user_events: Ensure user provided strings are safely formatted")
    Signed-off-by: Beau Belgrave <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    beaubelgrave authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    95e3412 View commit details
    Browse the repository at this point in the history
  202. scsi: qla2xxx: Multi-que support for TMF

    commit d90171d upstream.
    
    Add queue flush for task management command, before
    placing it on the wire.
    Do IO flush for all Request Q's.
    
    Reported-by: kernel test robot <[email protected]>
    Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected] <mailto:[email protected]>>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Quinn Tran authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ff92567 View commit details
    Browse the repository at this point in the history
  203. scsi: qla2xxx: Fix task management cmd failure

    commit 9803fb5 upstream.
    
    Task management cmd failed with status 30h which means
    FW is not able to finish processing one task management
    before another task management for the same lun.
    Hence add wait for completion of marker to space it out.
    
    Reported-by: kernel test robot <[email protected]>
    Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected] <mailto:[email protected]>>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Quinn Tran authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    843665c View commit details
    Browse the repository at this point in the history
  204. scsi: qla2xxx: Fix task management cmd fail due to unavailable resource

    commit 6a87679 upstream.
    
    Task management command failed with status 2Ch which is
    a result of too many task management commands sent
    to the same target. Hence limit task management commands
    to 8 per target.
    
    Reported-by: kernel test robot <[email protected]>
    Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Quinn Tran authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    35985b0 View commit details
    Browse the repository at this point in the history
  205. scsi: qla2xxx: Fix hang in task management

    commit 9ae615c upstream.
    
    Task management command hangs where a side
    band chip reset failed to nudge the TMF
    from it's current send path.
    
    Add additional error check to block TMF
    from entering during chip reset and along
    the TMF path to cause it to bail out, skip
    over abort of marker.
    
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Quinn Tran authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1802e5d View commit details
    Browse the repository at this point in the history
  206. scsi: qla2xxx: Wait for io return on terminate rport

    commit fc0cba0 upstream.
    
    System crash due to use after free.
    Current code allows terminate_rport_io to exit before making
    sure all IOs has returned. For FCP-2 device, IO's can hang
    on in HW because driver has not tear down the session in FW at
    first sign of cable pull. When dev_loss_tmo timer pops,
    terminate_rport_io is called and upper layer is about to
    free various resources. Terminate_rport_io trigger qla to do
    the final cleanup, but the cleanup might not be fast enough where it
    leave qla still holding on to the same resource.
    
    Wait for IO's to return to upper layer before resources are freed.
    
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Quinn Tran authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    90770da View commit details
    Browse the repository at this point in the history
  207. scsi: qla2xxx: Fix mem access after free

    commit b843add upstream.
    
    System crash, where driver is accessing scsi layer's
    memory (scsi_cmnd->device->host) to search for a well known internal
    pointer (vha). The scsi_cmnd was released back to upper layer which
    could be freed, but the driver is still accessing it.
    
    7 [ffffa8e8d2c3f8d0] page_fault at ffffffff86c010fe
      [exception RIP: __qla2x00_eh_wait_for_pending_commands+240]
      RIP: ffffffffc0642350  RSP: ffffa8e8d2c3f988  RFLAGS: 00010286
      RAX: 0000000000000165  RBX: 0000000000000002  RCX: 00000000000036d8
      RDX: 0000000000000000  RSI: ffff9c5c56535188  RDI: 0000000000000286
      RBP: ffff9c5bf7aa4a58   R8: ffff9c589aecdb70   R9: 00000000000003d1
      R10: 0000000000000001  R11: 0000000000380000 R12: ffff9c5c5392bc78
      R13: ffff9c57044ff5c0 R14: ffff9c56b5a3aa00  R15: 00000000000006db
      ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
    8 [ffffa8e8d2c3f9c8] qla2x00_eh_wait_for_pending_commands at ffffffffc0646dd5 [qla2xxx]
    9 [ffffa8e8d2c3fa00] __qla2x00_async_tm_cmd at ffffffffc0658094 [qla2xxx]
    
    Remove access of freed memory. Currently the driver was checking to see if
    scsi_done was called by seeing if the sp->type has changed. Instead,
    check to see if the command has left the  oustanding_cmds[] array as
    sign of scsi_done was called.
    
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Quinn Tran authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d994ac7 View commit details
    Browse the repository at this point in the history
  208. scsi: qla2xxx: Array index may go out of bound

    commit d721b59 upstream.
    
    Klocwork reports array 'vha->host_str' of size 16 may use index value(s)
    16..19.  Use snprintf() instead of sprintf().
    
    Cc: [email protected]
    Co-developed-by: Bikash Hazarika <[email protected]>
    Signed-off-by: Bikash Hazarika <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    njavali authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2b3bdef View commit details
    Browse the repository at this point in the history
  209. scsi: qla2xxx: Avoid fcport pointer dereference

    commit 6b504d0 upstream.
    
    Klocwork reported warning of NULL pointer may be dereferenced.  The routine
    exits when sa_ctl is NULL and fcport is allocated after the exit call thus
    causing NULL fcport pointer to dereference at the time of exit.
    
    To avoid fcport pointer dereference, exit the routine when sa_ctl is NULL.
    
    Cc: [email protected]
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    njavali authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    477bc74 View commit details
    Browse the repository at this point in the history
  210. scsi: qla2xxx: Fix buffer overrun

    commit b68710a upstream.
    
    Klocwork warning: Buffer Overflow - Array Index Out of Bounds
    
    Driver uses fc_els_flogi to calculate size of buffer.  The actual buffer is
    nested inside of fc_els_flogi which is smaller.
    
    Replace structure name to allow proper size calculation.
    
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Quinn Tran authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2dddbf8 View commit details
    Browse the repository at this point in the history
  211. scsi: qla2xxx: Fix potential NULL pointer dereference

    commit 464ea49 upstream.
    
    Klocwork tool reported 'cur_dsd' may be dereferenced.  Add fix to validate
    pointer before dereferencing the pointer.
    
    Cc: [email protected]
    Signed-off-by: Bikash Hazarika <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Bikash Hazarika authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ce2cdbe View commit details
    Browse the repository at this point in the history
  212. scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()

    commit af73f23 upstream.
    
    Klocwork reported warning of rport maybe NULL and will be dereferenced.
    rport returned by call to fc_bsg_to_rport() could be NULL and dereferenced.
    
    Check valid rport returned by fc_bsg_to_rport().
    
    Cc: [email protected]
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    njavali authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    e466930 View commit details
    Browse the repository at this point in the history
  213. scsi: qla2xxx: Correct the index of array

    commit b1b9d38 upstream.
    
    Klocwork reported array 'port_dstate_str' of size 10 may use index value(s)
    10..15.
    
    Add a fix to correct the index of array.
    
    Cc: [email protected]
    Signed-off-by: Bikash Hazarika <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Bikash Hazarika authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    b88b124 View commit details
    Browse the repository at this point in the history
  214. scsi: qla2xxx: Pointer may be dereferenced

    commit 00eca15 upstream.
    
    Klocwork tool reported pointer 'rport' returned from call to function
    fc_bsg_to_rport() may be NULL and will be dereferenced.
    
    Add a fix to validate rport before dereferencing.
    
    Cc: [email protected]
    Signed-off-by: Shreyas Deodhar <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Shreyas Deodhar authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    b06d1b5 View commit details
    Browse the repository at this point in the history
  215. scsi: qla2xxx: Remove unused nvme_ls_waitq wait queue

    commit 20fce50 upstream.
    
    System crash when qla2x00_start_sp(sp) returns error code EGAIN and wake_up
    gets called for uninitialized wait queue sp->nvme_ls_waitq.
    
        qla2xxx [0000:37:00.1]-2121:5: Returning existing qpair of ffff8ae2c0513400 for idx=0
        qla2xxx [0000:37:00.1]-700e:5: qla2x00_start_sp failed = 11
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
        PGD 0 P4D 0
        Oops: 0000 [#1] SMP NOPTI
        Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 09/03/2021
        Workqueue: nvme-wq nvme_fc_connect_ctrl_work [nvme_fc]
        RIP: 0010:__wake_up_common+0x4c/0x190
        RSP: 0018:ffff95f3e0cb7cd0 EFLAGS: 00010086
        RAX: 0000000000000000 RBX: ffff8b08d3b26328 RCX: 0000000000000000
        RDX: 0000000000000001 RSI: 0000000000000003 RDI: ffff8b08d3b26320
        RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffffffffffe8
        R10: 0000000000000000 R11: ffff95f3e0cb7a60 R12: ffff95f3e0cb7d20
        R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
        FS:  0000000000000000(0000) GS:ffff8b2fdf6c0000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 0000000000000000 CR3: 0000002f1e410002 CR4: 00000000007706e0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        PKRU: 55555554
        Call Trace:
         __wake_up_common_lock+0x7c/0xc0
         qla_nvme_ls_req+0x355/0x4c0 [qla2xxx]
         ? __nvme_fc_send_ls_req+0x260/0x380 [nvme_fc]
         ? nvme_fc_send_ls_req.constprop.42+0x1a/0x45 [nvme_fc]
         ? nvme_fc_connect_ctrl_work.cold.63+0x1e3/0xa7d [nvme_fc]
    
    Remove unused nvme_ls_waitq wait queue. nvme_ls_waitq logic was removed
    previously in the commits tagged Fixed: below.
    
    Fixes: 219d27d ("scsi: qla2xxx: Fix race conditions in the code for aborting SCSI commands")
    Fixes: 5621b0d ("scsi: qla2xxx: Simpify unregistration of FC-NVMe local/remote ports")
    Cc: [email protected]
    Signed-off-by: Manish Rangankar <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Manish Rangankar authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    f459d58 View commit details
    Browse the repository at this point in the history
  216. scsi: qla2xxx: Fix end of loop test

    commit 3390200 upstream.
    
    This loop will exit successfully when "found" is false or in the failure
    case it times out with "wait_iter" set to -1.  The test for timeouts is
    impossible as is.
    
    Fixes: b843add ("scsi: qla2xxx: Fix mem access after free")
    Signed-off-by: Dan Carpenter <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Dan Carpenter authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    fec55ec View commit details
    Browse the repository at this point in the history
  217. MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled

    commit 3a6dbb6 upstream.
    
    Commit e4de205 ("MIPS: KVM: Fix NULL pointer dereference") missed
    converting one place accessing cop0 registers, which results in a build
    error, if KVM_MIPS_DEBUG_COP0_COUNTERS is enabled.
    
    Fixes: e4de205 ("MIPS: KVM: Fix NULL pointer dereference")
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tsbogend authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    fbfb6b7 View commit details
    Browse the repository at this point in the history
  218. Revert "drm/amd: Disable PSR-SU on Parade 0803 TCON"

    commit 1e66a17 upstream.
    
    This reverts commit 072030b.
    This is no longer necessary when using newer DMUB F/W.
    
    Cc: [email protected]
    Cc: Sean Wang <[email protected]>
    Cc: Marc Rossi <[email protected]>
    Cc: Hamza Mahfooz <[email protected]>
    Cc: Tsung-hua (Ryan) Lin <[email protected]>
    Reviewed-by: Leo Li <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d64b70d View commit details
    Browse the repository at this point in the history
  219. swiotlb: mark swiotlb_memblock_alloc() as __init

    commit 9b07d27 upstream.
    
    swiotlb_memblock_alloc() calls memblock_alloc(), which calls
    (__init) memblock_alloc_try_nid(). However, swiotlb_membloc_alloc()
    can be marked as __init since it is only called by swiotlb_init_remap(),
    which is already marked as __init. This prevents a modpost build
    warning/error:
    
    WARNING: modpost: vmlinux.o: section mismatch in reference: swiotlb_memblock_alloc (section: .text) -> memblock_alloc_try_nid (section: .init.text)
    WARNING: modpost: vmlinux.o: section mismatch in reference: swiotlb_memblock_alloc (section: .text) -> memblock_alloc_try_nid (section: .init.text)
    
    This fixes the build warning/error seen on ARM64, PPC64, S390, i386,
    and x86_64.
    
    Fixes: 8d58aa4 ("swiotlb: reduce the swiotlb buffer size on allocation failure")
    Signed-off-by: Randy Dunlap <[email protected]>
    Cc: Alexey Kardashevskiy <[email protected]>
    Cc: Christoph Hellwig <[email protected]>
    Cc: [email protected]
    Cc: Mike Rapoport <[email protected]>
    Cc: [email protected]
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rddunlap authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ff06cd4 View commit details
    Browse the repository at this point in the history
  220. net/sched: sch_qfq: reintroduce lmax bound check for MTU

    commit 158810b upstream.
    
    2536989 deletes a check for the case where no 'lmax' is
    specified which 3037933 previously fixed as 'lmax'
    could be set to the device's MTU without any bound checking
    for QFQ_LMAX_MIN and QFQ_LMAX_MAX. Therefore, reintroduce the check.
    
    Fixes: 2536989 ("net/sched: sch_qfq: refactor parsing of netlink parameters")
    Acked-by: Jamal Hadi Salim <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Signed-off-by: Pedro Tammela <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tammela authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d34a347 View commit details
    Browse the repository at this point in the history
  221. drm/atomic: Fix potential use-after-free in nonblocking commits

    commit 4e076c7 upstream.
    
    This requires a bit of background.  Properly done a modeset driver's
    unload/remove sequence should be
    
    	drm_dev_unplug();
    	drm_atomic_helper_shutdown();
    	drm_dev_put();
    
    The trouble is that the drm_dev_unplugged() checks are by design racy,
    they do not synchronize against all outstanding ioctl.  This is because
    those ioctl could block forever (both for modeset and for driver
    specific ioctls), leading to deadlocks in hotunplug.  Instead the code
    sections that touch the hardware need to be annotated with
    drm_dev_enter/exit, to avoid accessing hardware resources after the
    unload/remove has finished.
    
    To avoid use-after-free issues all the involved userspace visible
    objects are supposed to hold a reference on the underlying drm_device,
    like drm_file does.
    
    The issue now is that we missed one, the atomic modeset ioctl can be run
    in a nonblocking fashion, and in that case it cannot rely on the implied
    drm_device reference provided by the ioctl calling context.  This can
    result in a use-after-free if an nonblocking atomic commit is carefully
    raced against a driver unload.
    
    Fix this by unconditionally grabbing a drm_device reference for any
    drm_atomic_state structures.  Strictly speaking this isn't required for
    blocking commits and TEST_ONLY calls, but it's the simpler approach.
    
    Thanks to shanzhulig for the initial idea of grabbing an unconditional
    reference, I just added comments, a condensed commit message and fixed a
    minor potential issue in where exactly we drop the final reference.
    
    Reported-by: shanzhulig <[email protected]>
    Suggested-by: shanzhulig <[email protected]>
    Reviewed-by: Maxime Ripard <[email protected]>
    Cc: Maarten Lankhorst <[email protected]>
    Cc: Thomas Zimmermann <[email protected]>
    Cc: David Airlie <[email protected]>
    Cc: [email protected]
    Signed-off-by: Daniel Vetter <[email protected]>
    Signed-off-by: Daniel Vetter <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    danvet authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    e4a0e09 View commit details
    Browse the repository at this point in the history
  222. net/ncsi: make one oem_gma function for all mfr id

    commit 74b449b upstream.
    
    Make the one Get Mac Address function for all manufacturers and change
    this call in handlers accordingly.
    
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: Ivan Mikhaylov <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    fr0st61te authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    e2c3356 View commit details
    Browse the repository at this point in the history
  223. net/ncsi: change from ndo_set_mac_address to dev_set_mac_address

    commit 7900713 upstream.
    
    Change ndo_set_mac_address to dev_set_mac_address because
    dev_set_mac_address provides a way to notify network layer about MAC
    change. In other case, services may not aware about MAC change and keep
    using old one which set from network adapter driver.
    
    As example, DHCP client from systemd do not update MAC address without
    notification from net subsystem which leads to the problem with acquiring
    the right address from DHCP server.
    
    Fixes: cb10c7c ("net/ncsi: Add NCSI Broadcom OEM command")
    Cc: [email protected] # v6.0+ 2f38e84 net/ncsi: make one oem_gma function for all mfr id
    Signed-off-by: Paul Fertser <[email protected]>
    Signed-off-by: Ivan Mikhaylov <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    fr0st61te authored and gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    9879d6e View commit details
    Browse the repository at this point in the history
  224. Linux 6.1.40

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: SeongJae Park <[email protected]>
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Bagas Sanjaya <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Conor Dooley <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    7538911 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2023

  1. Merge tag 'v6.1.40' into NAS-123179

    This is the 6.1.40 stable release
    
    Signed-off-by: Umer Saleem <[email protected]>
    usaleem-ix committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    f26e7aa View commit details
    Browse the repository at this point in the history
  2. Bump changelog after merging v6.1.40

    Signed-off-by: Umer Saleem <[email protected]>
    usaleem-ix committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    74b0fad View commit details
    Browse the repository at this point in the history