óÐÉÓÏË ÉÚÍÅÎÅÎÉÊ × Linux 4.19.310

 
btrfs: ref-verify: free ref cache before clearing mount opt [+ + +]
Author: Fedor Pchelkin <pchelkin@ispras.ru>
Date:   Wed Jan 3 13:31:27 2024 +0300

    btrfs: ref-verify: free ref cache before clearing mount opt
    
    [ Upstream commit f03e274a8b29d1d1c1bbd7f764766cb5ca537ab7 ]
    
    As clearing REF_VERIFY mount option indicates there were some errors in a
    ref-verify process, a ref cache is not relevant anymore and should be
    freed.
    
    btrfs_free_ref_cache() requires REF_VERIFY option being set so call
    it just before clearing the mount option.
    
    Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
    
    Reported-by: syzbot+be14ed7728594dc8bd42@syzkaller.appspotmail.com
    Fixes: fd708b81d972 ("Btrfs: add a extent ref verify tool")
    CC: stable@vger.kernel.org # 5.4+
    Closes: https://lore.kernel.org/lkml/000000000000e5a65c05ee832054@google.com/
    Reported-by: syzbot+c563a3c79927971f950f@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/lkml/0000000000007fe09705fdc6086c@google.com/
    Reviewed-by: Anand Jain <anand.jain@oracle.com>
    Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
geneve: make sure to pull inner header in geneve_rx() [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Thu Feb 29 13:11:52 2024 +0000

    geneve: make sure to pull inner header in geneve_rx()
    
    [ Upstream commit 1ca1ba465e55b9460e4e75dec9fff31e708fec74 ]
    
    syzbot triggered a bug in geneve_rx() [1]
    
    Issue is similar to the one I fixed in commit 8d975c15c0cd
    ("ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv()")
    
    We have to save skb->network_header in a temporary variable
    in order to be able to recompute the network_header pointer
    after a pskb_inet_may_pull() call.
    
    pskb_inet_may_pull() makes sure the needed headers are in skb->head.
    
    [1]
    BUG: KMSAN: uninit-value in IP_ECN_decapsulate include/net/inet_ecn.h:302 [inline]
     BUG: KMSAN: uninit-value in geneve_rx drivers/net/geneve.c:279 [inline]
     BUG: KMSAN: uninit-value in geneve_udp_encap_recv+0x36f9/0x3c10 drivers/net/geneve.c:391
      IP_ECN_decapsulate include/net/inet_ecn.h:302 [inline]
      geneve_rx drivers/net/geneve.c:279 [inline]
      geneve_udp_encap_recv+0x36f9/0x3c10 drivers/net/geneve.c:391
      udp_queue_rcv_one_skb+0x1d39/0x1f20 net/ipv4/udp.c:2108
      udp_queue_rcv_skb+0x6ae/0x6e0 net/ipv4/udp.c:2186
      udp_unicast_rcv_skb+0x184/0x4b0 net/ipv4/udp.c:2346
      __udp4_lib_rcv+0x1c6b/0x3010 net/ipv4/udp.c:2422
      udp_rcv+0x7d/0xa0 net/ipv4/udp.c:2604
      ip_protocol_deliver_rcu+0x264/0x1300 net/ipv4/ip_input.c:205
      ip_local_deliver_finish+0x2b8/0x440 net/ipv4/ip_input.c:233
      NF_HOOK include/linux/netfilter.h:314 [inline]
      ip_local_deliver+0x21f/0x490 net/ipv4/ip_input.c:254
      dst_input include/net/dst.h:461 [inline]
      ip_rcv_finish net/ipv4/ip_input.c:449 [inline]
      NF_HOOK include/linux/netfilter.h:314 [inline]
      ip_rcv+0x46f/0x760 net/ipv4/ip_input.c:569
      __netif_receive_skb_one_core net/core/dev.c:5534 [inline]
      __netif_receive_skb+0x1a6/0x5a0 net/core/dev.c:5648
      process_backlog+0x480/0x8b0 net/core/dev.c:5976
      __napi_poll+0xe3/0x980 net/core/dev.c:6576
      napi_poll net/core/dev.c:6645 [inline]
      net_rx_action+0x8b8/0x1870 net/core/dev.c:6778
      __do_softirq+0x1b7/0x7c5 kernel/softirq.c:553
      do_softirq+0x9a/0xf0 kernel/softirq.c:454
      __local_bh_enable_ip+0x9b/0xa0 kernel/softirq.c:381
      local_bh_enable include/linux/bottom_half.h:33 [inline]
      rcu_read_unlock_bh include/linux/rcupdate.h:820 [inline]
      __dev_queue_xmit+0x2768/0x51c0 net/core/dev.c:4378
      dev_queue_xmit include/linux/netdevice.h:3171 [inline]
      packet_xmit+0x9c/0x6b0 net/packet/af_packet.c:276
      packet_snd net/packet/af_packet.c:3081 [inline]
      packet_sendmsg+0x8aef/0x9f10 net/packet/af_packet.c:3113
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg net/socket.c:745 [inline]
      __sys_sendto+0x735/0xa10 net/socket.c:2191
      __do_sys_sendto net/socket.c:2203 [inline]
      __se_sys_sendto net/socket.c:2199 [inline]
      __x64_sys_sendto+0x125/0x1c0 net/socket.c:2199
      do_syscall_x64 arch/x86/entry/common.c:52 [inline]
      do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
     entry_SYSCALL_64_after_hwframe+0x63/0x6b
    
    Uninit was created at:
      slab_post_alloc_hook mm/slub.c:3819 [inline]
      slab_alloc_node mm/slub.c:3860 [inline]
      kmem_cache_alloc_node+0x5cb/0xbc0 mm/slub.c:3903
      kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:560
      __alloc_skb+0x352/0x790 net/core/skbuff.c:651
      alloc_skb include/linux/skbuff.h:1296 [inline]
      alloc_skb_with_frags+0xc8/0xbd0 net/core/skbuff.c:6394
      sock_alloc_send_pskb+0xa80/0xbf0 net/core/sock.c:2783
      packet_alloc_skb net/packet/af_packet.c:2930 [inline]
      packet_snd net/packet/af_packet.c:3024 [inline]
      packet_sendmsg+0x70c2/0x9f10 net/packet/af_packet.c:3113
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg net/socket.c:745 [inline]
      __sys_sendto+0x735/0xa10 net/socket.c:2191
      __do_sys_sendto net/socket.c:2203 [inline]
      __se_sys_sendto net/socket.c:2199 [inline]
      __x64_sys_sendto+0x125/0x1c0 net/socket.c:2199
      do_syscall_x64 arch/x86/entry/common.c:52 [inline]
      do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
     entry_SYSCALL_64_after_hwframe+0x63/0x6b
    
    Fixes: 2d07dc79fe04 ("geneve: add initial netdev driver for GENEVE tunnels")
    Reported-and-tested-by: syzbot+6a1423ff3f97159aae64@syzkaller.appspotmail.com
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
getrusage: add the "signal_struct *sig" local variable [+ + +]
Author: Oleg Nesterov <oleg@redhat.com>
Date:   Sat Sep 9 19:25:54 2023 +0200

    getrusage: add the "signal_struct *sig" local variable
    
    [ Upstream commit c7ac8231ace9b07306d0299969e42073b189c70a ]
    
    No functional changes, cleanup/preparation.
    
    Link: https://lkml.kernel.org/r/20230909172554.GA20441@redhat.com
    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Stable-dep-of: daa694e41375 ("getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand() [+ + +]
Author: Oleg Nesterov <oleg@redhat.com>
Date:   Mon Jan 22 16:50:50 2024 +0100

    getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()
    
    [ Upstream commit daa694e4137571b4ebec330f9a9b4d54aa8b8089 ]
    
    Patch series "getrusage: use sig->stats_lock", v2.
    
    This patch (of 2):
    
    thread_group_cputime() does its own locking, we can safely shift
    thread_group_cputime_adjusted() which does another for_each_thread loop
    outside of ->siglock protected section.
    
    This is also preparation for the next patch which changes getrusage() to
    use stats_lock instead of siglock, thread_group_cputime() takes the same
    lock.  With the current implementation recursive read_seqbegin_or_lock()
    is fine, thread_group_cputime() can't enter the slow mode if the caller
    holds stats_lock, yet this looks more safe and better performance-wise.
    
    Link: https://lkml.kernel.org/r/20240122155023.GA26169@redhat.com
    Link: https://lkml.kernel.org/r/20240122155050.GA26205@redhat.com
    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    Reported-by: Dylan Hatch <dylanbhatch@google.com>
    Tested-by: Dylan Hatch <dylanbhatch@google.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

getrusage: use __for_each_thread() [+ + +]
Author: Oleg Nesterov <oleg@redhat.com>
Date:   Sat Sep 9 19:26:29 2023 +0200

    getrusage: use __for_each_thread()
    
    [ Upstream commit 13b7bc60b5353371460a203df6c38ccd38ad7a3a ]
    
    do/while_each_thread should be avoided when possible.
    
    Plus this change allows to avoid lock_task_sighand(), we can use rcu
    and/or sig->stats_lock instead.
    
    Link: https://lkml.kernel.org/r/20230909172629.GA20454@redhat.com
    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Stable-dep-of: f7ec1cd5cc7e ("getrusage: use sig->stats_lock rather than lock_task_sighand()")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

getrusage: use sig->stats_lock rather than lock_task_sighand() [+ + +]
Author: Oleg Nesterov <oleg@redhat.com>
Date:   Mon Jan 22 16:50:53 2024 +0100

    getrusage: use sig->stats_lock rather than lock_task_sighand()
    
    [ Upstream commit f7ec1cd5cc7ef3ad964b677ba82b8b77f1c93009 ]
    
    lock_task_sighand() can trigger a hard lockup. If NR_CPUS threads call
    getrusage() at the same time and the process has NR_THREADS, spin_lock_irq
    will spin with irqs disabled O(NR_CPUS * NR_THREADS) time.
    
    Change getrusage() to use sig->stats_lock, it was specifically designed
    for this type of use. This way it runs lockless in the likely case.
    
    TODO:
            - Change do_task_stat() to use sig->stats_lock too, then we can
              remove spin_lock_irq(siglock) in wait_task_zombie().
    
            - Turn sig->stats_lock into seqcount_rwlock_t, this way the
              readers in the slow mode won't exclude each other. See
              https://lore.kernel.org/all/20230913154907.GA26210@redhat.com/
    
            - stats_lock has to disable irqs because ->siglock can be taken
              in irq context, it would be very nice to change __exit_signal()
              to avoid the siglock->stats_lock dependency.
    
    Link: https://lkml.kernel.org/r/20240122155053.GA26214@redhat.com
    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    Reported-by: Dylan Hatch <dylanbhatch@google.com>
    Tested-by: Dylan Hatch <dylanbhatch@google.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
hv_netvsc: Make netvsc/VF binding check both MAC and serial number [+ + +]
Author: Dexuan Cui <decui@microsoft.com>
Date:   Fri Apr 23 18:12:35 2021 -0700

    hv_netvsc: Make netvsc/VF binding check both MAC and serial number
    
    [ Upstream commit 64ff412ad41fe3a5bf759ff4844dc1382176485c ]
    
    Currently the netvsc/VF binding logic only checks the PCI serial number.
    
    The Microsoft Azure Network Adapter (MANA) supports multiple net_device
    interfaces (each such interface is called a "vPort", and has its unique
    MAC address) which are backed by the same VF PCI device, so the binding
    logic should check both the MAC address and the PCI serial number.
    
    The change should not break any other existing VF drivers, because
    Hyper-V NIC SR-IOV implementation requires the netvsc network
    interface and the VF network interface have the same MAC address.
    
    Co-developed-by: Haiyang Zhang <haiyangz@microsoft.com>
    Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
    Co-developed-by: Shachar Raindel <shacharr@microsoft.com>
    Signed-off-by: Shachar Raindel <shacharr@microsoft.com>
    Acked-by: Stephen Hemminger <stephen@networkplumber.org>
    Signed-off-by: Dexuan Cui <decui@microsoft.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Stable-dep-of: 9cae43da9867 ("hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed [+ + +]
Author: Shradha Gupta <shradhagupta@linux.microsoft.com>
Date:   Thu Feb 1 20:40:38 2024 -0800

    hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed
    
    [ Upstream commit 9cae43da9867412f8bd09aee5c8a8dc5e8dc3dc2 ]
    
    If hv_netvsc driver is unloaded and reloaded, the NET_DEVICE_REGISTER
    handler cannot perform VF register successfully as the register call
    is received before netvsc_probe is finished. This is because we
    register register_netdevice_notifier() very early( even before
    vmbus_driver_register()).
    To fix this, we try to register each such matching VF( if it is visible
    as a netdevice) at the end of netvsc_probe.
    
    Cc: stable@vger.kernel.org
    Fixes: 85520856466e ("hv_netvsc: Fix race of register_netdevice_notifier and VF register")
    Suggested-by: Dexuan Cui <decui@microsoft.com>
    Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
    Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
    Reviewed-by: Dexuan Cui <decui@microsoft.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

hv_netvsc: use netif_is_bond_master() instead of open code [+ + +]
Author: Juhee Kang <claudiajkang@gmail.com>
Date:   Sun Oct 10 13:03:28 2021 +0900

    hv_netvsc: use netif_is_bond_master() instead of open code
    
    [ Upstream commit c60882a4566a0a62dc3a40c85131103aad83dcb3 ]
    
    Use netif_is_bond_master() function instead of open code, which is
    ((event_dev->priv_flags & IFF_BONDING) && (event_dev->flags & IFF_MASTER)).
    This patch doesn't change logic.
    
    Signed-off-by: Juhee Kang <claudiajkang@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Stable-dep-of: 9cae43da9867 ("hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU [+ + +]
Author: Werner Sembach <wse@tuxedocomputers.com>
Date:   Tue Dec 5 17:36:01 2023 +0100

    Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU
    
    [ Upstream commit a60e6c3918d20848906ffcdfcf72ca6a8cfbcf2e ]
    
    When closing the laptop lid with an external screen connected, the mouse
    pointer has a constant movement to the lower right corner. Opening the
    lid again stops this movement, but after that the touchpad does no longer
    register clicks.
    
    The touchpad is connected both via i2c-hid and PS/2, the predecessor of
    this device (NS70MU) has the same layout in this regard and also strange
    behaviour caused by the psmouse and the i2c-hid driver fighting over
    touchpad control. This fix is reusing the same workaround by just
    disabling the PS/2 aux port, that is only used by the touchpad, to give the
    i2c-hid driver the lone control over the touchpad.
    
    v2: Rebased on current master
    
    Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20231205163602.16106-1-wse@tuxedocomputers.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
lan78xx: Add missing return code checks [+ + +]
Author: John Efstathiades <john.efstathiades@pebblebay.com>
Date:   Tue Aug 24 19:56:08 2021 +0100

    lan78xx: Add missing return code checks
    
    [ Upstream commit 3415f6baaddb9b39d7112247ab39ef3c700f882e ]
    
    There are many places in the driver where the return code from a
    function call is captured but without a subsequent test of the
    return code and appropriate action taken.
    
    This patch adds the missing return code tests and action. In most
    cases the action is an early exit from the calling function.
    
    The function lan78xx_set_suspend() was also updated to make it
    consistent with lan78xx_suspend().
    
    Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Stable-dep-of: 1eecc7ab82c4 ("net: lan78xx: fix runtime PM count underflow on link stop")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

lan78xx: Fix partial packet errors on suspend/resume [+ + +]
Author: John Efstathiades <john.efstathiades@pebblebay.com>
Date:   Tue Aug 24 19:56:10 2021 +0100

    lan78xx: Fix partial packet errors on suspend/resume
    
    [ Upstream commit e1210fe63bf8b080edd0805240e90b81b6b069c1 ]
    
    The MAC can get out of step with the internal packet FIFOs if the
    system goes to sleep when the link is active, especially at high
    data rates. This can result in partial frames in the packet FIFOs
    that in result in malformed frames being delivered to the host.
    This occurs because the driver does not enable/disable the internal
    packet FIFOs in step with the corresponding MAC data path. The
    following changes fix this problem.
    
    Update code that enables/disables the MAC receiver and transmitter
    to the more general Rx and Tx data path, where the data path in each
    direction consists of both the MAC function (Tx or Rx) and the
    corresponding packet FIFO.
    
    In the receive path the packet FIFO must be enabled before the MAC
    receiver but disabled after the MAC receiver.
    
    In the transmit path the opposite is true: the packet FIFO must be
    enabled after the MAC transmitter but disabled before the MAC
    transmitter.
    
    The packet FIFOs can be flushed safely once the corresponding data
    path is stopped.
    
    Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Stable-dep-of: 1eecc7ab82c4 ("net: lan78xx: fix runtime PM count underflow on link stop")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

lan78xx: Fix race conditions in suspend/resume handling [+ + +]
Author: John Efstathiades <john.efstathiades@pebblebay.com>
Date:   Tue Aug 24 19:56:11 2021 +0100

    lan78xx: Fix race conditions in suspend/resume handling
    
    [ Upstream commit 5f4cc6e25148cc141f97afb41b4dfe9eb1cce613 ]
    
    If the interface is given an IP address while the device is
    suspended (as a result of an auto-suspend event) there is a race
    between lan78xx_resume() and lan78xx_open() that can result in an
    exception or failure to handle incoming packets. The following
    changes fix this problem.
    
    Introduce a mutex to serialise operations in the network interface
    open and stop entry points with respect to the USB driver suspend
    and resume entry points.
    
    Move Tx and Rx data path start/stop to lan78xx_start() and
    lan78xx_stop() respectively and flush the packet FIFOs before
    starting the Tx and Rx data paths. This prevents the MAC and FIFOs
    getting out of step and delivery of malformed packets to the network
    stack.
    
    Stop processing of received packets before disconnecting the
    PHY from the MAC to prevent a kernel exception caused by handling
    packets after the PHY device has been removed.
    
    Refactor device auto-suspend code to make it consistent with the
    the system suspend code and make the suspend handler easier to read.
    
    Add new code to stop wake-on-lan packets or PHY events resuming the
    host or device from suspend if the device has not been opened
    (typically after an IP address is assigned).
    
    This patch is dependent on changes to lan78xx_suspend() and
    lan78xx_resume() introduced in the previous patch of this patch set.
    
    Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Stable-dep-of: 1eecc7ab82c4 ("net: lan78xx: fix runtime PM count underflow on link stop")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

lan78xx: Fix white space and style issues [+ + +]
Author: John Efstathiades <john.efstathiades@pebblebay.com>
Date:   Tue Aug 24 19:56:04 2021 +0100

    lan78xx: Fix white space and style issues
    
    [ Upstream commit 9ceec7d33adf9647293f24d2fd9a055b89c63864 ]
    
    Fix white space and code style issues identified by checkpatch.
    
    Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Stable-dep-of: 1eecc7ab82c4 ("net: lan78xx: fix runtime PM count underflow on link stop")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Linux: Linux 4.19.310 [+ + +]
Author: Sasha Levin <sashal@kernel.org>
Date:   Wed Mar 13 07:44:15 2024 -0400

    Linux 4.19.310
    
    Tested-by: Pavel Machek (CIP) <pavel@denx.de>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net/ipv6: avoid possible UAF in ip6_route_mpath_notify() [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Sun Mar 3 14:48:00 2024 +0000

    net/ipv6: avoid possible UAF in ip6_route_mpath_notify()
    
    [ Upstream commit 685f7d531264599b3f167f1e94bbd22f120e5fab ]
    
    syzbot found another use-after-free in ip6_route_mpath_notify() [1]
    
    Commit f7225172f25a ("net/ipv6: prevent use after free in
    ip6_route_mpath_notify") was not able to fix the root cause.
    
    We need to defer the fib6_info_release() calls after
    ip6_route_mpath_notify(), in the cleanup phase.
    
    [1]
    BUG: KASAN: slab-use-after-free in rt6_fill_node+0x1460/0x1ac0
    Read of size 4 at addr ffff88809a07fc64 by task syz-executor.2/23037
    
    CPU: 0 PID: 23037 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-01035-gea7f3cfaa588 #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
    Call Trace:
     <TASK>
      __dump_stack lib/dump_stack.c:88 [inline]
      dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106
      print_address_description mm/kasan/report.c:377 [inline]
      print_report+0x167/0x540 mm/kasan/report.c:488
      kasan_report+0x142/0x180 mm/kasan/report.c:601
     rt6_fill_node+0x1460/0x1ac0
      inet6_rt_notify+0x13b/0x290 net/ipv6/route.c:6184
      ip6_route_mpath_notify net/ipv6/route.c:5198 [inline]
      ip6_route_multipath_add net/ipv6/route.c:5404 [inline]
      inet6_rtm_newroute+0x1d0f/0x2300 net/ipv6/route.c:5517
      rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6597
      netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543
      netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
      netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367
      netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x221/0x270 net/socket.c:745
      ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
      ___sys_sendmsg net/socket.c:2638 [inline]
      __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
     do_syscall_64+0xf9/0x240
     entry_SYSCALL_64_after_hwframe+0x6f/0x77
    RIP: 0033:0x7f73dd87dda9
    Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007f73de6550c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
    RAX: ffffffffffffffda RBX: 00007f73dd9ac050 RCX: 00007f73dd87dda9
    RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000005
    RBP: 00007f73dd8ca47a R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
    R13: 000000000000006e R14: 00007f73dd9ac050 R15: 00007ffdbdeb7858
     </TASK>
    
    Allocated by task 23037:
      kasan_save_stack mm/kasan/common.c:47 [inline]
      kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
      poison_kmalloc_redzone mm/kasan/common.c:372 [inline]
      __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:389
      kasan_kmalloc include/linux/kasan.h:211 [inline]
      __do_kmalloc_node mm/slub.c:3981 [inline]
      __kmalloc+0x22e/0x490 mm/slub.c:3994
      kmalloc include/linux/slab.h:594 [inline]
      kzalloc include/linux/slab.h:711 [inline]
      fib6_info_alloc+0x2e/0xf0 net/ipv6/ip6_fib.c:155
      ip6_route_info_create+0x445/0x12b0 net/ipv6/route.c:3758
      ip6_route_multipath_add net/ipv6/route.c:5298 [inline]
      inet6_rtm_newroute+0x744/0x2300 net/ipv6/route.c:5517
      rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6597
      netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543
      netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
      netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367
      netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x221/0x270 net/socket.c:745
      ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
      ___sys_sendmsg net/socket.c:2638 [inline]
      __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
     do_syscall_64+0xf9/0x240
     entry_SYSCALL_64_after_hwframe+0x6f/0x77
    
    Freed by task 16:
      kasan_save_stack mm/kasan/common.c:47 [inline]
      kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
      kasan_save_free_info+0x4e/0x60 mm/kasan/generic.c:640
      poison_slab_object+0xa6/0xe0 mm/kasan/common.c:241
      __kasan_slab_free+0x34/0x70 mm/kasan/common.c:257
      kasan_slab_free include/linux/kasan.h:184 [inline]
      slab_free_hook mm/slub.c:2121 [inline]
      slab_free mm/slub.c:4299 [inline]
      kfree+0x14a/0x380 mm/slub.c:4409
      rcu_do_batch kernel/rcu/tree.c:2190 [inline]
      rcu_core+0xd76/0x1810 kernel/rcu/tree.c:2465
      __do_softirq+0x2bb/0x942 kernel/softirq.c:553
    
    Last potentially related work creation:
      kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47
      __kasan_record_aux_stack+0xae/0x100 mm/kasan/generic.c:586
      __call_rcu_common kernel/rcu/tree.c:2715 [inline]
      call_rcu+0x167/0xa80 kernel/rcu/tree.c:2829
      fib6_info_release include/net/ip6_fib.h:341 [inline]
      ip6_route_multipath_add net/ipv6/route.c:5344 [inline]
      inet6_rtm_newroute+0x114d/0x2300 net/ipv6/route.c:5517
      rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6597
      netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543
      netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
      netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367
      netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x221/0x270 net/socket.c:745
      ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
      ___sys_sendmsg net/socket.c:2638 [inline]
      __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
     do_syscall_64+0xf9/0x240
     entry_SYSCALL_64_after_hwframe+0x6f/0x77
    
    The buggy address belongs to the object at ffff88809a07fc00
     which belongs to the cache kmalloc-512 of size 512
    The buggy address is located 100 bytes inside of
     freed 512-byte region [ffff88809a07fc00, ffff88809a07fe00)
    
    The buggy address belongs to the physical page:
    page:ffffea0002681f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9a07c
    head:ffffea0002681f00 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
    flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
    page_type: 0xffffffff()
    raw: 00fff00000000840 ffff888014c41c80 dead000000000122 0000000000000000
    raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
    page dumped because: kasan: bad access detected
    page_owner tracks the page as allocated
    page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 23028, tgid 23027 (syz-executor.4), ts 2340253595219, free_ts 2339107097036
      set_page_owner include/linux/page_owner.h:31 [inline]
      post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1533
      prep_new_page mm/page_alloc.c:1540 [inline]
      get_page_from_freelist+0x33ea/0x3580 mm/page_alloc.c:3311
      __alloc_pages+0x255/0x680 mm/page_alloc.c:4567
      __alloc_pages_node include/linux/gfp.h:238 [inline]
      alloc_pages_node include/linux/gfp.h:261 [inline]
      alloc_slab_page+0x5f/0x160 mm/slub.c:2190
      allocate_slab mm/slub.c:2354 [inline]
      new_slab+0x84/0x2f0 mm/slub.c:2407
      ___slab_alloc+0xd17/0x13e0 mm/slub.c:3540
      __slab_alloc mm/slub.c:3625 [inline]
      __slab_alloc_node mm/slub.c:3678 [inline]
      slab_alloc_node mm/slub.c:3850 [inline]
      __do_kmalloc_node mm/slub.c:3980 [inline]
      __kmalloc+0x2e0/0x490 mm/slub.c:3994
      kmalloc include/linux/slab.h:594 [inline]
      kzalloc include/linux/slab.h:711 [inline]
      new_dir fs/proc/proc_sysctl.c:956 [inline]
      get_subdir fs/proc/proc_sysctl.c:1000 [inline]
      sysctl_mkdir_p fs/proc/proc_sysctl.c:1295 [inline]
      __register_sysctl_table+0xb30/0x1440 fs/proc/proc_sysctl.c:1376
      neigh_sysctl_register+0x416/0x500 net/core/neighbour.c:3859
      devinet_sysctl_register+0xaf/0x1f0 net/ipv4/devinet.c:2644
      inetdev_init+0x296/0x4d0 net/ipv4/devinet.c:286
      inetdev_event+0x338/0x15c0 net/ipv4/devinet.c:1555
      notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93
      call_netdevice_notifiers_extack net/core/dev.c:1987 [inline]
      call_netdevice_notifiers net/core/dev.c:2001 [inline]
      register_netdevice+0x15b2/0x1a20 net/core/dev.c:10340
      br_dev_newlink+0x27/0x100 net/bridge/br_netlink.c:1563
      rtnl_newlink_create net/core/rtnetlink.c:3497 [inline]
      __rtnl_newlink net/core/rtnetlink.c:3717 [inline]
      rtnl_newlink+0x158f/0x20a0 net/core/rtnetlink.c:3730
    page last free pid 11583 tgid 11583 stack trace:
      reset_page_owner include/linux/page_owner.h:24 [inline]
      free_pages_prepare mm/page_alloc.c:1140 [inline]
      free_unref_page_prepare+0x968/0xa90 mm/page_alloc.c:2346
      free_unref_page+0x37/0x3f0 mm/page_alloc.c:2486
      kasan_depopulate_vmalloc_pte+0x74/0x90 mm/kasan/shadow.c:415
      apply_to_pte_range mm/memory.c:2619 [inline]
      apply_to_pmd_range mm/memory.c:2663 [inline]
      apply_to_pud_range mm/memory.c:2699 [inline]
      apply_to_p4d_range mm/memory.c:2735 [inline]
      __apply_to_page_range+0x8ec/0xe40 mm/memory.c:2769
      kasan_release_vmalloc+0x9a/0xb0 mm/kasan/shadow.c:532
      __purge_vmap_area_lazy+0x163f/0x1a10 mm/vmalloc.c:1770
      drain_vmap_area_work+0x40/0xd0 mm/vmalloc.c:1804
      process_one_work kernel/workqueue.c:2633 [inline]
      process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706
      worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787
      kthread+0x2ef/0x390 kernel/kthread.c:388
      ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
      ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242
    
    Memory state around the buggy address:
     ffff88809a07fb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
     ffff88809a07fb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    >ffff88809a07fc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                           ^
     ffff88809a07fc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
     ffff88809a07fd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    
    Fixes: 3b1137fe7482 ("net: ipv6: Change notifications for multipath add to RTA_MULTIPATH")
    Reported-by: syzbot <syzkaller@googlegroups.com>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Link: https://lore.kernel.org/r/20240303144801.702646-1-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net/rds: fix WARNING in rds_conn_connect_if_down [+ + +]
Author: Edward Adam Davis <eadavis@qq.com>
Date:   Tue Mar 5 08:13:08 2024 +0800

    net/rds: fix WARNING in rds_conn_connect_if_down
    
    [ Upstream commit c055fc00c07be1f0df7375ab0036cebd1106ed38 ]
    
    If connection isn't established yet, get_mr() will fail, trigger connection after
    get_mr().
    
    Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures")
    Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com
    Signed-off-by: Edward Adam Davis <eadavis@qq.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net: lan78xx: fix runtime PM count underflow on link stop [+ + +]
Author: Oleksij Rempel <o.rempel@pengutronix.de>
Date:   Wed Feb 28 13:45:17 2024 +0100

    net: lan78xx: fix runtime PM count underflow on link stop
    
    [ Upstream commit 1eecc7ab82c42133b748e1895275942a054a7f67 ]
    
    Current driver has some asymmetry in the runtime PM calls. On lan78xx_open()
    it will call usb_autopm_get() and unconditionally usb_autopm_put(). And
    on lan78xx_stop() it will call only usb_autopm_put(). So far, it was
    working only because this driver do not activate autosuspend by default,
    so it was visible only by warning "Runtime PM usage count underflow!".
    
    Since, with current driver, we can't use runtime PM with active link,
    execute lan78xx_open()->usb_autopm_put() only in error case. Otherwise,
    keep ref counting high as long as interface is open.
    
    Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
    Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: move definition of pcpu_lstats to header file [+ + +]
Author: Li RongQing <lirongqing@baidu.com>
Date:   Fri Sep 14 16:00:51 2018 +0800

    net: move definition of pcpu_lstats to header file
    
    [ Upstream commit 52bb6677d530d37055092d86b4eab69dce6c166a ]
    
    pcpu_lstats is defined in several files, so unify them as one
    and move to header file
    
    Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
    Signed-off-by: Li RongQing <lirongqing@baidu.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Stable-dep-of: 1ca1ba465e55 ("geneve: make sure to pull inner header in geneve_rx()")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: usb: lan78xx: Remove lots of set but unused 'ret' variables [+ + +]
Author: Lee Jones <lee@kernel.org>
Date:   Mon Nov 2 11:45:06 2020 +0000

    net: usb: lan78xx: Remove lots of set but unused 'ret' variables
    
    [ Upstream commit 06cd7c46b3ab3f2252c61bf85b191236cf0254e1 ]
    
    Fixes the following W=1 kernel build warning(s):
    
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_read_raw_otp’:
     drivers/net/usb/lan78xx.c:825:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_write_raw_otp’:
     drivers/net/usb/lan78xx.c:879:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_deferred_multicast_write’:
     drivers/net/usb/lan78xx.c:1041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_update_flowcontrol’:
     drivers/net/usb/lan78xx.c:1127:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_init_mac_address’:
     drivers/net/usb/lan78xx.c:1666:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_link_status_change’:
     drivers/net/usb/lan78xx.c:1841:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_irq_bus_sync_unlock’:
     drivers/net/usb/lan78xx.c:1920:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan8835_fixup’:
     drivers/net/usb/lan78xx.c:1994:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_rx_max_frame_length’:
     drivers/net/usb/lan78xx.c:2192:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_change_mtu’:
     drivers/net/usb/lan78xx.c:2270:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_mac_addr’:
     drivers/net/usb/lan78xx.c:2299:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_features’:
     drivers/net/usb/lan78xx.c:2333:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_suspend’:
     drivers/net/usb/lan78xx.c:3807:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
    
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Link: https://lore.kernel.org/r/20201102114512.1062724-25-lee.jones@linaro.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Stable-dep-of: 1eecc7ab82c4 ("net: lan78xx: fix runtime PM count underflow on link stop")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
 
netfilter: nf_conntrack_h323: Add protection for bmp length out of range [+ + +]
Author: Lena Wang <lena.wang@mediatek.com>
Date:   Tue Mar 5 11:38:55 2024 +0000

    netfilter: nf_conntrack_h323: Add protection for bmp length out of range
    
    [ Upstream commit 767146637efc528b5e3d31297df115e85a2fd362 ]
    
    UBSAN load reports an exception of BRK#5515 SHIFT_ISSUE:Bitwise shifts
    that are out of bounds for their data type.
    
    vmlinux   get_bitmap(b=75) + 712
    <net/netfilter/nf_conntrack_h323_asn1.c:0>
    vmlinux   decode_seq(bs=0xFFFFFFD008037000, f=0xFFFFFFD008037018, level=134443100) + 1956
    <net/netfilter/nf_conntrack_h323_asn1.c:592>
    vmlinux   decode_choice(base=0xFFFFFFD0080370F0, level=23843636) + 1216
    <net/netfilter/nf_conntrack_h323_asn1.c:814>
    vmlinux   decode_seq(f=0xFFFFFFD0080371A8, level=134443500) + 812
    <net/netfilter/nf_conntrack_h323_asn1.c:576>
    vmlinux   decode_choice(base=0xFFFFFFD008037280, level=0) + 1216
    <net/netfilter/nf_conntrack_h323_asn1.c:814>
    vmlinux   DecodeRasMessage() + 304
    <net/netfilter/nf_conntrack_h323_asn1.c:833>
    vmlinux   ras_help() + 684
    <net/netfilter/nf_conntrack_h323_main.c:1728>
    vmlinux   nf_confirm() + 188
    <net/netfilter/nf_conntrack_proto.c:137>
    
    Due to abnormal data in skb->data, the extension bitmap length
    exceeds 32 when decoding ras message then uses the length to make
    a shift operation. It will change into negative after several loop.
    UBSAN load could detect a negative shift as an undefined behaviour
    and reports exception.
    So we add the protection to avoid the length exceeding 32. Or else
    it will return out of range error and stop decoding.
    
    Fixes: 5e35941d9901 ("[NETFILTER]: Add H.323 conntrack/NAT helper")
    Signed-off-by: Lena Wang <lena.wang@mediatek.com>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
netrom: Fix a data-race around sysctl_netrom_default_path_quality [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:35 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_default_path_quality
    
    [ Upstream commit 958d6145a6d9ba9e075c921aead8753fb91c9101 ]
    
    We need to protect the reader reading sysctl_netrom_default_path_quality
    because the value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix a data-race around sysctl_netrom_link_fails_count [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:45 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_link_fails_count
    
    [ Upstream commit bc76645ebdd01be9b9994dac39685a3d0f6f7985 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:36 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser
    
    [ Upstream commit cfd9f4a740f772298308b2e6070d2c744fb5cf79 ]
    
    We need to protect the reader reading the sysctl value
    because the value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix a data-race around sysctl_netrom_routing_control [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:44 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_routing_control
    
    [ Upstream commit b5dffcb8f71bdd02a4e5799985b51b12f4eeaf76 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:40 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay
    
    [ Upstream commit 806f462ba9029d41aadf8ec93f2f99c5305deada ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix a data-race around sysctl_netrom_transport_busy_delay [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:41 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_transport_busy_delay
    
    [ Upstream commit 43547d8699439a67b78d6bb39015113f7aa360fd ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:39 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries
    
    [ Upstream commit e799299aafed417cc1f32adccb2a0e5268b3f6d5 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:43 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout
    
    [ Upstream commit f99b494b40431f0ca416859f2345746199398e2b ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix a data-race around sysctl_netrom_transport_requested_window_size [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:42 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_transport_requested_window_size
    
    [ Upstream commit a2e706841488f474c06e9b33f71afc947fb3bf56 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix a data-race around sysctl_netrom_transport_timeout [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:38 2024 +0800

    netrom: Fix a data-race around sysctl_netrom_transport_timeout
    
    [ Upstream commit 60a7a152abd494ed4f69098cf0f322e6bb140612 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix data-races around sysctl_net_busy_read [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:46 2024 +0800

    netrom: Fix data-races around sysctl_net_busy_read
    
    [ Upstream commit d380ce70058a4ccddc3e5f5c2063165dc07672c6 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser [+ + +]
Author: Jason Xing <kernelxing@tencent.com>
Date:   Mon Mar 4 16:20:37 2024 +0800

    netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser
    
    [ Upstream commit 119cae5ea3f9e35cdada8e572cc067f072fa825a ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
selftests/vm: fix display of page size in map_hugetlb [+ + +]
Author: Christophe Leroy <christophe.leroy@csgroup.eu>
Date:   Fri Sep 18 21:20:28 2020 -0700

    selftests/vm: fix display of page size in map_hugetlb
    
    [ Upstream commit 1ec882fc81e3177faf055877310dbdb0c68eb7db ]
    
    The displayed size is in bytes while the text says it is in kB.
    
    Shift it by 10 to really display kBytes.
    
    Fixes: fa7b9a805c79 ("tools/selftest/vm: allow choosing mem size and page size in map_hugetlb")
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Cc: <stable@vger.kernel.org>
    Link: https://lkml.kernel.org/r/e27481224564a93d14106e750de31189deaa8bc8.1598861977.git.christophe.leroy@csgroup.eu
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

selftests/vm: fix map_hugetlb length used for testing read and write [+ + +]
Author: Christophe Leroy <christophe.leroy@c-s.fr>
Date:   Wed Apr 1 21:11:51 2020 -0700

    selftests/vm: fix map_hugetlb length used for testing read and write
    
    [ Upstream commit cabc30da10e677c67ab9a136b1478175734715c5 ]
    
    Commit fa7b9a805c79 ("tools/selftest/vm: allow choosing mem size and page
    size in map_hugetlb") added the possibility to change the size of memory
    mapped for the test, but left the read and write test using the default
    value.  This is unnoticed when mapping a length greater than the default
    one, but segfaults otherwise.
    
    Fix read_bytes() and write_bytes() by giving them the real length.
    
    Also fix the call to munmap().
    
    Fixes: fa7b9a805c79 ("tools/selftest/vm: allow choosing mem size and page size in map_hugetlb")
    Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Reviewed-by: Leonardo Bras <leonardo@linux.ibm.com>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Shuah Khan <shuah@kernel.org>
    Cc: <stable@vger.kernel.org>
    Link: http://lkml.kernel.org/r/9a404a13c871c4bd0ba9ede68f69a1225180dd7e.1580978385.git.christophe.leroy@c-s.fr
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
selftests: mm: fix map_hugetlb failure on 64K page size systems [+ + +]
Author: Nico Pache <npache@redhat.com>
Date:   Fri Jan 19 06:14:29 2024 -0700

    selftests: mm: fix map_hugetlb failure on 64K page size systems
    
    [ Upstream commit 91b80cc5b39f00399e8e2d17527cad2c7fa535e2 ]
    
    On systems with 64k page size and 512M huge page sizes, the allocation and
    test succeeds but errors out at the munmap.  As the comment states, munmap
    will failure if its not HUGEPAGE aligned.  This is due to the length of
    the mapping being 1/2 the size of the hugepage causing the munmap to not
    be hugepage aligned.  Fix this by making the mapping length the full
    hugepage if the hugepage is larger than the length of the mapping.
    
    Link: https://lkml.kernel.org/r/20240119131429.172448-1-npache@redhat.com
    Signed-off-by: Nico Pache <npache@redhat.com>
    Cc: Donet Tom <donettom@linux.vnet.ibm.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Cc: Christophe Leroy <christophe.leroy@c-s.fr>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
tools/selftest/vm: allow choosing mem size and page size in map_hugetlb [+ + +]
Author: Christophe Leroy <christophe.leroy@c-s.fr>
Date:   Fri Feb 8 15:02:55 2019 +0000

    tools/selftest/vm: allow choosing mem size and page size in map_hugetlb
    
    [ Upstream commit fa7b9a805c797b729022029aaa3a2b7c35fff4c6 ]
    
    map_hugetlb maps 256Mbytes of memory with default hugepage size.
    
    This patch allows the user to pass the size and page shift as an
    argument in order to use different size and page size.
    
    Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Stable-dep-of: 91b80cc5b39f ("selftests: mm: fix map_hugetlb failure on 64K page size systems")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
um: allow not setting extra rpaths in the linux binary [+ + +]
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Mon Mar 8 14:02:37 2021 +0100

    um: allow not setting extra rpaths in the linux binary
    
    [ Upstream commit 386093c68ba3e8bcfe7f46deba901e0e80713c29 ]
    
    There doesn't seem to be any reason for the rpath being set in
    the binaries, at on systems that I tested on. On the other hand,
    setting rpath is actually harming binaries in some cases, e.g.
    if using nix-based compilation environments where /lib & /lib64
    are not part of the actual environment.
    
    Add a new Kconfig option (under EXPERT, for less user confusion)
    that allows disabling the rpath additions.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Richard Weinberger <richard@nod.at>
    Stable-dep-of: 846cfbeed09b ("um: Fix adding '-no-pie' for clang")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
y2038: rusage: use __kernel_old_timeval [+ + +]
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Fri Oct 25 22:46:48 2019 +0200

    y2038: rusage: use __kernel_old_timeval
    
    [ Upstream commit bdd565f817a74b9e30edec108f7cb1dbc762b8a6 ]
    
    There are two 'struct timeval' fields in 'struct rusage'.
    
    Unfortunately the definition of timeval is now ambiguous when used in
    user space with a libc that has a 64-bit time_t, and this also changes
    the 'rusage' definition in user space in a way that is incompatible with
    the system call interface.
    
    While there is no good solution to avoid all ambiguity here, change
    the definition in the kernel headers to be compatible with the kernel
    ABI, using __kernel_old_timeval as an unambiguous base type.
    
    In previous discussions, there was also a plan to add a replacement
    for rusage based on 64-bit timestamps and nanosecond resolution,
    i.e. 'struct __kernel_timespec'. I have patches for that as well,
    if anyone thinks we should do that.
    
    Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Stable-dep-of: daa694e41375 ("getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()")
    Signed-off-by: Sasha Levin <sashal@kernel.org>