1. Jul 30, 2022
  2. Jul 29, 2022
    • Tiezhu Yang's avatar
      LoongArch: Fix wrong "ROM Size" of boardinfo · 45b53c90
      Tiezhu Yang authored
      We can see the "ROM Size" is different in the following outputs:
      
      [root@linux loongson]# cat /sys/firmware/loongson/boardinfo
      BIOS Information
      Vendor                  : Loongson
      Version                 : vUDK2018-LoongArch-V2.0.pre-beta8
      ROM Size                : 63 KB
      Release Date            : 06/15/2022
      
      Board Information
      Manufacturer            : Loongson
      Board Name              : Loongson-LS3A5000-7A1000-1w-A2101
      Family                  : LOONGSON64
      
      [root@linux loongson]# dmidecode | head -11
      ...
      Handle 0x0000, DMI type 0, 26 bytes
      BIOS Information
      	Vendor: Loongson
      	Version: vUDK2018-LoongArch-V2.0.pre-beta8
      	Release Date: 06/15/2022
      	ROM Size: 4 MB
      
      According to "BIOS Information (Type 0) structure" in the SMBIOS
      Reference Specification [1], it shows 64K * (n+1) is the size of
      the physical device containing the BIOS if the size is less than
      16M.
      
      Additionally, we can see the related code in dmidecode [2]:
      
        u64 s = { .l = (code1 + 1) << 6 };
      
      So the output of dmidecode is correct, the output of boardinfo
      is wrong, fix it.
      
      By the way, at present no need to consider the size is 16M or
      greater on LoongArch, because it is usually 4M or 8M which is
      enough to use.
      
      [1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.6.0.pdf
      [2] https://git.savannah.nongnu.org/cgit/dmidecode.git/tree/dmidecode.c#n347
      
      Fixes: 628c3bb4
      
       ("LoongArch: Add boot and setup routines")
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      45b53c90
    • Qi Hu's avatar
      LoongArch: Fix missing fcsr in ptrace's fpr_set · b0f3bdc0
      Qi Hu authored
      
      
      In file ptrace.c, function fpr_set does not copy fcsr data from ubuf
      to kbuf. That's the reason why fcsr cannot be modified by ptrace.
      
      This patch fixs this problem and allows users using ptrace to modify
      the fcsr.
      
      Co-developed-by: default avatarXu Li <lixu@loongson.cn>
      Signed-off-by: default avatarQi Hu <huqi@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      b0f3bdc0
    • Huacai Chen's avatar
      LoongArch: Fix shared cache size calculation · 1aea29d7
      Huacai Chen authored
      
      
      Current calculation of shared cache size is from the node (die) scope,
      but we hope 'lscpu' to show the shared cache size of the whole package
      for multi-die chips (e.g., Loongson-3C5000L, which contains 4 dies in
      one package). So fix it by multiplying nodes_per_package.
      
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      1aea29d7
    • Huacai Chen's avatar
      LoongArch: Disable executable stack by default · 317980e6
      Huacai Chen authored
      
      
      Disable executable stack for LoongArch by default, as all modern
      architectures do.
      
      Reported-by: default avatarAndreas Schwab <schwab@suse.de>
      Suggested-by: default avatarWANG Xuerui <git@xen0n.name>
      Link: https://sourceware.org/pipermail/binutils/2022-July/121992.html
      
      
      Tested-by: default avatarWANG Xuerui <git@xen0n.name>
      Tested-by: default avatarXi Ruoyao <xry111@xry111.site>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      317980e6
    • Bibo Mao's avatar
      LoongArch: Remove unused variables · 3a3a4f7a
      Bibo Mao authored
      
      
      There are some variables never used or referenced, this patch
      removes these varaibles and make the code cleaner.
      
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarBibo Mao <maobibo@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      3a3a4f7a
    • Bibo Mao's avatar
      LoongArch: Remove clock setting during cpu hotplug stage · 71610ab1
      Bibo Mao authored
      
      
      On physical machine we can save power by disabling clock of hot removed
      cpu. However as different platforms require different methods to
      configure clocks, the code is platform-specific, and probably belongs to
      firmware/pmu or cpu regulator, rather than generic arch/loongarch code.
      
      Also, there is no such register on QEMU virt machine since the
      clock/frequency regulation is not emulated.
      
      This patch removes the hard-coded clock register accesses in generic
      LoongArch cpu hotplug flow.
      
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarBibo Mao <maobibo@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      71610ab1
    • Jun Yi's avatar
      LoongArch: Remove useless header compiler.h · f62b7626
      Jun Yi authored
      
      
      The content of LoongArch's compiler.h is trivial, with some unused
      anywhere, so inline the definitions and remove the header.
      
      Signed-off-by: default avatarJun Yi <yijun@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      f62b7626
    • WANG Xuerui's avatar
      LoongArch: Remove several syntactic sugar macros for branches · ab6e57a6
      WANG Xuerui authored
      
      
      These syntactic sugars have been supported by upstream binutils from the
      beginning, so no need to patch them locally.
      
      Signed-off-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      ab6e57a6
    • WANG Xuerui's avatar
      LoongArch: Re-tab the assembly files · f5c3c22f
      WANG Xuerui authored
      
      
      Reflow the *.S files for better stylistic consistency, namely hard tabs
      after mnemonic position, and vertical alignment of the first operand
      with hard tabs. Tab width is obviously 8. Some pre-existing intra-block
      vertical alignments are preserved.
      
      Signed-off-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      f5c3c22f
    • WANG Xuerui's avatar
      LoongArch: Simplify "BGT foo, zero" with BGTZ · 1fdb9a92
      WANG Xuerui authored
      
      
      Support for the syntactic sugar is present in upstream binutils port
      from the beginning. Use it for shorter lines and better consistency.
      Generated code should be identical.
      
      Signed-off-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      1fdb9a92
    • WANG Xuerui's avatar
      LoongArch: Simplify "BLT foo, zero" with BLTZ · d1bc75d7
      WANG Xuerui authored
      
      
      Support for the syntactic sugar is present in upstream binutils port
      from the beginning. Use it for shorter lines and better consistency.
      Generated code should be identical.
      
      Signed-off-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      d1bc75d7
    • WANG Xuerui's avatar
      LoongArch: Simplify "BEQ/BNE foo, zero" with BEQZ/BNEZ · d47b2dc8
      WANG Xuerui authored
      
      
      While B{EQ,NE}Z and B{EQ,NE} are different instructions, and the vastly
      expanded range for branch destination does not really matter in the few
      cases touched, use the B{EQ,NE}Z where possible for shorter lines and
      better consistency (e.g. some places used "BEQ foo, zero", while some
      used "BEQ zero, foo").
      
      Signed-off-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      d47b2dc8
    • WANG Xuerui's avatar
      LoongArch: Use the "move" pseudo-instruction where applicable · 57ce5d3e
      WANG Xuerui authored
      
      
      Some of the assembly code in the LoongArch port likely originated
      from a time when the assembler did not support pseudo-instructions like
      "move" or "jr", so the desugared form was used and readability suffers
      (to a minor degree) as a result.
      
      As the upstream toolchain supports these pseudo-instructions from the
      beginning, migrate the existing few usages to them for better
      readability.
      
      Signed-off-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      57ce5d3e
    • WANG Xuerui's avatar
      LoongArch: Use the "jr" pseudo-instruction where applicable · 07b48069
      WANG Xuerui authored
      
      
      Some of the assembly code in the LoongArch port likely originated
      from a time when the assembler did not support pseudo-instructions like
      "move" or "jr", so the desugared form was used and readability suffers
      (to a minor degree) as a result.
      
      As the upstream toolchain supports these pseudo-instructions from the
      beginning, migrate the existing few usages to them for better
      readability.
      
      Signed-off-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      07b48069
    • WANG Xuerui's avatar
      LoongArch: Use ABI names of registers where appropriate · d8e7f201
      WANG Xuerui authored
      
      
      Some of the assembly in the LoongArch port seem to come from a
      prehistoric time, when the assembler didn't even have support for the
      ABI names we all come to know and love, thus used raw register numbers
      which hampered readability.
      
      The usages are found with a regex match inside arch/loongarch, then
      manually adjusted for those non-definitions.
      
      Signed-off-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      d8e7f201
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-07-29' of git://anongit.freedesktop.org/drm/drm · 6e2c0490
      Linus Torvalds authored
      Pull drm fix from Dave Airlie:
       "Quiet extra week, just a single fix for i915 workaround with execlist
        backend.
      
        i915:
      
         - Further reset robustness improvements for execlists [Wa_22011802037]"
      
      * tag 'drm-fixes-2022-07-29' of git://anongit.freedesktop.org/drm/drm:
        drm/i915/reset: Add additional steps for Wa_22011802037 for execlist backend
      6e2c0490
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2022-07-28-1' of... · f16a2f59
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2022-07-28-1' of git://anongit.freedesktop.org/drm/drm-intel
      
       into drm-fixes
      
      - Further reset robustness improvements for execlists [Wa_22011802037] (Umesh Nerlige Ramappa)
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/YuJIWaEbKcs/q0NY@tursulin-desk
      f16a2f59
    • Linus Torvalds's avatar
      Merge tag 'net-5.19-final' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 33ea1340
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from bluetooth and netfilter, no known blockers for
        the release.
      
        Current release - regressions:
      
         - wifi: mac80211: do not abuse fq.lock in ieee80211_do_stop(), fix
           taking the lock before its initialized
      
         - Bluetooth: mgmt: fix double free on error path
      
        Current release - new code bugs:
      
         - eth: ice: fix tunnel checksum offload with fragmented traffic
      
        Previous releases - regressions:
      
         - tcp: md5: fix IPv4-mapped support after refactoring, don't take the
           pure v6 path
      
         - Revert "tcp: change pingpong threshold to 3", improving detection
           of interactive sessions
      
         - mld: fix netdev refcount leak in mld_{query | report}_work() due to
           a race
      
         - Bluetooth:
            - always set event mask on suspend, avoid early wake ups
            - L2CAP: fix use-after-free caused by l2cap_chan_put
      
         - bridge: do not send empty IFLA_AF_SPEC attribute
      
        Previous releases - always broken:
      
         - ping6: fix memleak in ipv6_renew_options()
      
         - sctp: prevent null-deref caused by over-eager error paths
      
         - virtio-net: fix the race between refill work and close, resulting
           in NAPI scheduled after close and a BUG()
      
         - macsec:
            - fix three netlink parsing bugs
            - avoid breaking the device state on invalid change requests
            - fix a memleak in another error path
      
        Misc:
      
         - dt-bindings: net: ethernet-controller: rework 'fixed-link' schema
      
         - two more batches of sysctl data race adornment"
      
      * tag 'net-5.19-final' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (67 commits)
        stmmac: dwmac-mediatek: fix resource leak in probe
        ipv6/addrconf: fix a null-ptr-deref bug for ip6_ptr
        net: ping6: Fix memleak in ipv6_renew_options().
        net/funeth: Fix fun_xdp_tx() and XDP packet reclaim
        sctp: leave the err path free in sctp_stream_init to sctp_stream_free
        sfc: disable softirqs for ptp TX
        ptp: ocp: Select CRC16 in the Kconfig.
        tcp: md5: fix IPv4-mapped support
        virtio-net: fix the race between refill work and close
        mptcp: Do not return EINPROGRESS when subflow creation succeeds
        Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put
        Bluetooth: Always set event mask on suspend
        Bluetooth: mgmt: Fix double free on error path
        wifi: mac80211: do not abuse fq.lock in ieee80211_do_stop()
        ice: do not setup vlan for loopback VSI
        ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS)
        ice: Fix VSIs unable to share unicast MAC
        ice: Fix tunnel checksum offload with fragmented traffic
        ice: Fix max VLANs available for VF
        netfilter: nft_queue: only allow supported familes and hooks
        ...
      33ea1340
    • Dan Carpenter's avatar
      stmmac: dwmac-mediatek: fix resource leak in probe · 4d3d3a1b
      Dan Carpenter authored
      If mediatek_dwmac_clks_config() fails, then call stmmac_remove_config_dt()
      before returning.  Otherwise it is a resource leak.
      
      Fixes: fa4b3ca6
      
       ("stmmac: dwmac-mediatek: fix clock issue")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Link: https://lore.kernel.org/r/YuJ4aZyMUlG6yGGa@kili
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4d3d3a1b
    • Ziyang Xuan's avatar
      ipv6/addrconf: fix a null-ptr-deref bug for ip6_ptr · 85f0173d
      Ziyang Xuan authored
      Change net device's MTU to smaller than IPV6_MIN_MTU or unregister
      device while matching route. That may trigger null-ptr-deref bug
      for ip6_ptr probability as following.
      
      =========================================================
      BUG: KASAN: null-ptr-deref in find_match.part.0+0x70/0x134
      Read of size 4 at addr 0000000000000308 by task ping6/263
      
      CPU: 2 PID: 263 Comm: ping6 Not tainted 5.19.0-rc7+ #14
      Call trace:
       dump_backtrace+0x1a8/0x230
       show_stack+0x20/0x70
       dump_stack_lvl+0x68/0x84
       print_report+0xc4/0x120
       kasan_report+0x84/0x120
       __asan_load4+0x94/0xd0
       find_match.part.0+0x70/0x134
       __find_rr_leaf+0x408/0x470
       fib6_table_lookup+0x264/0x540
       ip6_pol_route+0xf4/0x260
       ip6_pol_route_output+0x58/0x70
       fib6_rule_lookup+0x1a8/0x330
       ip6_route_output_flags_noref+0xd8/0x1a0
       ip6_route_output_flags+0x58/0x160
       ip6_dst_lookup_tail+0x5b4/0x85c
       ip6_dst_lookup_flow+0x98/0x120
       rawv6_sendmsg+0x49c/0xc70
       inet_sendmsg+0x68/0x94
      
      Reproducer as following:
      Firstly, prepare conditions:
      $ip netns add ns1
      $ip netns add ns2
      $ip link add veth1 type veth peer name veth2
      $ip link set veth1 netns ns1
      $ip link set veth2 netns ns2
      $ip netns exec ns1 ip -6 addr add 2001:0db8:0:f101::1/64 dev veth1
      $ip netns exec ns2 ip -6 addr add 2001:0db8:0:f101::2/64 dev veth2
      $ip netns exec ns1 ifconfig veth1 up
      $ip netns exec ns2 ifconfig veth2 up
      $ip netns exec ns1 ip -6 route add 2000::/64 dev veth1 metric 1
      $ip netns exec ns2 ip -6 route add 2001::/64 dev veth2 metric 1
      
      Secondly, execute the following two commands in two ssh windows
      respectively:
      $ip netns exec ns1 sh
      $while true; do ip -6 addr add 2001:0db8:0:f101::1/64 dev veth1; ip -6 route add 2000::/64 dev veth1 metric 1; ping6 2000::2; done
      
      $ip netns exec ns1 sh
      $while true; do ip link set veth1 mtu 1000; ip link set veth1 mtu 1500; sleep 5; done
      
      It is because ip6_ptr has been assigned to NULL in addrconf_ifdown() firstly,
      then ip6_ignore_linkdown() accesses ip6_ptr directly without NULL check.
      
      	cpu0			cpu1
      fib6_table_lookup
      __find_rr_leaf
      			addrconf_notify [ NETDEV_CHANGEMTU ]
      			addrconf_ifdown
      			RCU_INIT_POINTER(dev->ip6_ptr, NULL)
      find_match
      ip6_ignore_linkdown
      
      So we can add NULL check for ip6_ptr before using in ip6_ignore_linkdown() to
      fix the null-ptr-deref bug.
      
      Fixes: dcd1f572
      
       ("net/ipv6: Remove fib6_idev")
      Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Link: https://lore.kernel.org/r/20220728013307.656257-1-william.xuanziyang@huawei.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      85f0173d
    • Kuniyuki Iwashima's avatar
      net: ping6: Fix memleak in ipv6_renew_options(). · e2732600
      Kuniyuki Iwashima authored
      When we close ping6 sockets, some resources are left unfreed because
      pingv6_prot is missing sk->sk_prot->destroy().  As reported by
      syzbot [0], just three syscalls leak 96 bytes and easily cause OOM.
      
          struct ipv6_sr_hdr *hdr;
          char data[24] = {0};
          int fd;
      
          hdr = (struct ipv6_sr_hdr *)data;
          hdr->hdrlen = 2;
          hdr->type = IPV6_SRCRT_TYPE_4;
      
          fd = socket(AF_INET6, SOCK_DGRAM, NEXTHDR_ICMP);
          setsockopt(fd, IPPROTO_IPV6, IPV6_RTHDR, data, 24);
          close(fd);
      
      To fix memory leaks, let's add a destroy function.
      
      Note the socket() syscall checks if the GID is within the range of
      net.ipv4.ping_group_range.  The default value is [1, 0] so that no
      GID meets the condition (1 <= GID <= 0).  Thus, the local DoS does
      not succeed until we change the default value.  However, at least
      Ubuntu/Fedora/RHEL loosen it.
      
          $ cat /usr/lib/sysctl.d/50-default.conf
          ...
          -net.ipv4.ping_group_range = 0 2147483647
      
      Also, there could be another path reported with these options, and
      some of them require CAP_NET_RAW.
      
        setsockopt
            IPV6_ADDRFORM (inet6_sk(sk)->pktoptions)
            IPV6_RECVPATHMTU (inet6_sk(sk)->rxpmtu)
            IPV6_HOPOPTS (inet6_sk(sk)->opt)
            IPV6_RTHDRDSTOPTS (inet6_sk(sk)->opt)
            IPV6_RTHDR (inet6_sk(sk)->opt)
            IPV6_DSTOPTS (inet6_sk(sk)->opt)
            IPV6_2292PKTOPTIONS (inet6_sk(sk)->opt)
      
        getsockopt
            IPV6_FLOWLABEL_MGR (inet6_sk(sk)->ipv6_fl_list)
      
      For the record, I left a different splat with syzbot's one.
      
        unreferenced object 0xffff888006270c60 (size 96):
          comm "repro2", pid 231, jiffies 4294696626 (age 13.118s)
          hex dump (first 32 bytes):
            01 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00  ....D...........
            00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          backtrace:
            [<00000000f6bc7ea9>] sock_kmalloc (net/core/sock.c:2564 net/core/sock.c:2554)
            [<000000006d699550>] do_ipv6_setsockopt.constprop.0 (net/ipv6/ipv6_sockglue.c:715)
            [<00000000c3c3b1f5>] ipv6_setsockopt (net/ipv6/ipv6_sockglue.c:1024)
            [<000000007096a025>] __sys_setsockopt (net/socket.c:2254)
            [<000000003a8ff47b>] __x64_sys_setsockopt (net/socket.c:2265 net/socket.c:2262 net/socket.c:2262)
            [<000000007c409dcb>] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
            [<00000000e939c4a9>] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
      
      [0]: https://syzkaller.appspot.com/bug?extid=a8430774139ec3ab7176
      
      Fixes: 6d0bfe22
      
       ("net: ipv6: Add IPv6 support to the ping socket.")
      Reported-by: default avatar <syzbot+a8430774139ec3ab7176@syzkaller.appspotmail.com>
      Reported-by: default avatarAyushman Dutta <ayudutta@amazon.com>
      Signed-off-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://lore.kernel.org/r/20220728012220.46918-1-kuniyu@amazon.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e2732600
    • Linus Torvalds's avatar
      watch_queue: Fix missing locking in add_watch_to_object() · e64ab2db
      Linus Torvalds authored
      If a watch is being added to a queue, it needs to guard against
      interference from addition of a new watch, manual removal of a watch and
      removal of a watch due to some other queue being destroyed.
      
      KEYCTL_WATCH_KEY guards against this for the same {key,queue} pair by
      holding the key->sem writelocked and by holding refs on both the key and
      the queue - but that doesn't prevent interaction from other {key,queue}
      pairs.
      
      While add_watch_to_object() does take the spinlock on the event queue,
      it doesn't take the lock on the source's watch list.  The assumption was
      that the caller would prevent that (say by taking key->sem) - but that
      doesn't prevent interference from the destruction of another queue.
      
      Fix this by locking the watcher list in add_watch_to_object().
      
      Fixes: c73be61c
      
       ("pipe: Add general notification queue support")
      Reported-by: default avatar <syzbot+03d7b43290037d1f87ca@syzkaller.appspotmail.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: keyrings@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e64ab2db
    • David Howells's avatar
      watch_queue: Fix missing rcu annotation · e0339f03
      David Howells authored
      Since __post_watch_notification() walks wlist->watchers with only the
      RCU read lock held, we need to use RCU methods to add to the list (we
      already use RCU methods to remove from the list).
      
      Fix add_watch_to_object() to use hlist_add_head_rcu() instead of
      hlist_add_head() for that list.
      
      Fixes: c73be61c
      
       ("pipe: Add general notification queue support")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e0339f03
  3. Jul 28, 2022
  4. Jul 27, 2022