1. 30 4月, 2022 8 次提交
  2. 29 4月, 2022 19 次提交
  3. 28 4月, 2022 13 次提交
    • R
      Merge branch 'thermal-int340x' · a12475f9
      Rafael J. Wysocki 提交于
      Merge a fix for the attr.show callback prototype in the int340x thermal
      driver (Kees Cook).
      
      * thermal-int340x:
        thermal: int340x: Fix attr.show callback prototype
      a12475f9
    • F
      netfilter: nft_socket: only do sk lookups when indev is available · 743b83f1
      Florian Westphal 提交于
      Check if the incoming interface is available and NFT_BREAK
      in case neither skb->sk nor input device are set.
      
      Because nf_sk_lookup_slow*() assume packet headers are in the
      'in' direction, use in postrouting is not going to yield a meaningful
      result.  Same is true for the forward chain, so restrict the use
      to prerouting, input and output.
      
      Use in output work if a socket is already attached to the skb.
      
      Fixes: 554ced0a ("netfilter: nf_tables: add support for native socket matching")
      Reported-and-tested-by: NTopi Miettinen <toiwoton@gmail.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      743b83f1
    • R
      Merge branch 'pm-cpuidle' · edbd9772
      Rafael J. Wysocki 提交于
      Merge cpuidle fixes for 5.18-rc5:
      
       - Make intel_idle enable C1E promotion on all CPUs when C1E is
         preferred to C1 (Artem Bityutskiy).
      
       - Make C6 optimization on Sapphire Rapids added recently work as
         expected if both C1E and C1 are "preferred" (Artem Bityutskiy).
      
      * pm-cpuidle:
        intel_idle: Fix SPR C6 optimization
        intel_idle: Fix the 'preferred_cstates' module parameter
      edbd9772
    • A
      gfs2: No short reads or writes upon glock contention · 296abc0d
      Andreas Gruenbacher 提交于
      Commit 00bfe02f ("gfs2: Fix mmap + page fault deadlocks for buffered
      I/O") changed gfs2_file_read_iter() and gfs2_file_buffered_write() to
      allow dropping the inode glock while faulting in user buffers.  When the
      lock was dropped, a short result was returned to indicate that the
      operation was interrupted.
      
      As pointed out by Linus (see the link below), this behavior is broken
      and the operations should always re-acquire the inode glock and resume
      the operation instead.
      
      Link: https://lore.kernel.org/lkml/CAHk-=whaz-g_nOOoo8RRiWNjnv2R+h6_xk2F1J4TuSRxk1MtLw@mail.gmail.com/
      Fixes: 00bfe02f ("gfs2: Fix mmap + page fault deadlocks for buffered I/O")
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      296abc0d
    • P
      Merge tag 'for-net-2022-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth · febb2d2f
      Paolo Abeni 提交于
      Luiz Augusto von Dentz says:
      
      ====================
      bluetooth pull request for net:
      
       - Fix regression causing some HCI events to be discarded when they
         shouldn't.
      
      * tag 'for-net-2022-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth:
        Bluetooth: hci_sync: Cleanup hci_conn if it cannot be aborted
        Bluetooth: hci_event: Fix creating hci_conn object on error status
        Bluetooth: hci_event: Fix checking for invalid handle on error status
      ====================
      
      Link: https://lore.kernel.org/r/20220427234031.1257281-1-luiz.dentz@gmail.comSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
      febb2d2f
    • Y
      net: fec: add missing of_node_put() in fec_enet_init_stop_mode() · d2b52ec0
      Yang Yingliang 提交于
      Put device node in error path in fec_enet_init_stop_mode().
      
      Fixes: 8a448bf8 ("net: ethernet: fec: move GPR register offset and bit into DT")
      Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
      Link: https://lore.kernel.org/r/20220426125231.375688-1-yangyingliang@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      d2b52ec0
    • M
      bnx2x: fix napi API usage sequence · af68656d
      Manish Chopra 提交于
      While handling PCI errors (AER flow) driver tries to
      disable NAPI [napi_disable()] after NAPI is deleted
      [__netif_napi_del()] which causes unexpected system
      hang/crash.
      
      System message log shows the following:
      =======================================
      [ 3222.537510] EEH: Detected PCI bus error on PHB#384-PE#800000 [ 3222.537511] EEH: This PCI device has failed 2 times in the last hour and will be permanently disabled after 5 failures.
      [ 3222.537512] EEH: Notify device drivers to shutdown [ 3222.537513] EEH: Beginning: 'error_detected(IO frozen)'
      [ 3222.537514] EEH: PE#800000 (PCI 0384:80:00.0): Invoking
      bnx2x->error_detected(IO frozen)
      [ 3222.537516] bnx2x: [bnx2x_io_error_detected:14236(eth14)]IO error detected [ 3222.537650] EEH: PE#800000 (PCI 0384:80:00.0): bnx2x driver reports:
      'need reset'
      [ 3222.537651] EEH: PE#800000 (PCI 0384:80:00.1): Invoking
      bnx2x->error_detected(IO frozen)
      [ 3222.537651] bnx2x: [bnx2x_io_error_detected:14236(eth13)]IO error detected [ 3222.537729] EEH: PE#800000 (PCI 0384:80:00.1): bnx2x driver reports:
      'need reset'
      [ 3222.537729] EEH: Finished:'error_detected(IO frozen)' with aggregate recovery state:'need reset'
      [ 3222.537890] EEH: Collect temporary log [ 3222.583481] EEH: of node=0384:80:00.0 [ 3222.583519] EEH: PCI device/vendor: 168e14e4 [ 3222.583557] EEH: PCI cmd/status register: 00100140 [ 3222.583557] EEH: PCI-E capabilities and status follow:
      [ 3222.583744] EEH: PCI-E 00: 00020010 012c8da2 00095d5e 00455c82 [ 3222.583892] EEH: PCI-E 10: 10820000 00000000 00000000 00000000 [ 3222.583893] EEH: PCI-E 20: 00000000 [ 3222.583893] EEH: PCI-E AER capability register set follows:
      [ 3222.584079] EEH: PCI-E AER 00: 13c10001 00000000 00000000 00062030 [ 3222.584230] EEH: PCI-E AER 10: 00002000 000031c0 000001e0 00000000 [ 3222.584378] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 [ 3222.584416] EEH: PCI-E AER 30: 00000000 00000000 [ 3222.584416] EEH: of node=0384:80:00.1 [ 3222.584454] EEH: PCI device/vendor: 168e14e4 [ 3222.584491] EEH: PCI cmd/status register: 00100140 [ 3222.584492] EEH: PCI-E capabilities and status follow:
      [ 3222.584677] EEH: PCI-E 00: 00020010 012c8da2 00095d5e 00455c82 [ 3222.584825] EEH: PCI-E 10: 10820000 00000000 00000000 00000000 [ 3222.584826] EEH: PCI-E 20: 00000000 [ 3222.584826] EEH: PCI-E AER capability register set follows:
      [ 3222.585011] EEH: PCI-E AER 00: 13c10001 00000000 00000000 00062030 [ 3222.585160] EEH: PCI-E AER 10: 00002000 000031c0 000001e0 00000000 [ 3222.585309] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 [ 3222.585347] EEH: PCI-E AER 30: 00000000 00000000 [ 3222.586872] RTAS: event: 5, Type: Platform Error (224), Severity: 2 [ 3222.586873] EEH: Reset without hotplug activity [ 3224.762767] EEH: Beginning: 'slot_reset'
      [ 3224.762770] EEH: PE#800000 (PCI 0384:80:00.0): Invoking
      bnx2x->slot_reset()
      [ 3224.762771] bnx2x: [bnx2x_io_slot_reset:14271(eth14)]IO slot reset initializing...
      [ 3224.762887] bnx2x 0384:80:00.0: enabling device (0140 -> 0142) [ 3224.768157] bnx2x: [bnx2x_io_slot_reset:14287(eth14)]IO slot reset
      --> driver unload
      
      Uninterruptible tasks
      =====================
      crash> ps | grep UN
           213      2  11  c000000004c89e00  UN   0.0       0      0  [eehd]
           215      2   0  c000000004c80000  UN   0.0       0      0
      [kworker/0:2]
          2196      1  28  c000000004504f00  UN   0.1   15936  11136  wickedd
          4287      1   9  c00000020d076800  UN   0.0    4032   3008  agetty
          4289      1  20  c00000020d056680  UN   0.0    7232   3840  agetty
         32423      2  26  c00000020038c580  UN   0.0       0      0
      [kworker/26:3]
         32871   4241  27  c0000002609ddd00  UN   0.1   18624  11648  sshd
         32920  10130  16  c00000027284a100  UN   0.1   48512  12608  sendmail
         33092  32987   0  c000000205218b00  UN   0.1   48512  12608  sendmail
         33154   4567  16  c000000260e51780  UN   0.1   48832  12864  pickup
         33209   4241  36  c000000270cb6500  UN   0.1   18624  11712  sshd
         33473  33283   0  c000000205211480  UN   0.1   48512  12672  sendmail
         33531   4241  37  c00000023c902780  UN   0.1   18624  11648  sshd
      
      EEH handler hung while bnx2x sleeping and holding RTNL lock
      ===========================================================
      crash> bt 213
      PID: 213    TASK: c000000004c89e00  CPU: 11  COMMAND: "eehd"
        #0 [c000000004d477e0] __schedule at c000000000c70808
        #1 [c000000004d478b0] schedule at c000000000c70ee0
        #2 [c000000004d478e0] schedule_timeout at c000000000c76dec
        #3 [c000000004d479c0] msleep at c0000000002120cc
        #4 [c000000004d479f0] napi_disable at c000000000a06448
                                              ^^^^^^^^^^^^^^^^
        #5 [c000000004d47a30] bnx2x_netif_stop at c0080000018dba94 [bnx2x]
        #6 [c000000004d47a60] bnx2x_io_slot_reset at c0080000018a551c [bnx2x]
        #7 [c000000004d47b20] eeh_report_reset at c00000000004c9bc
        #8 [c000000004d47b90] eeh_pe_report at c00000000004d1a8
        #9 [c000000004d47c40] eeh_handle_normal_event at c00000000004da64
      
      And the sleeping source code
      ============================
      crash> dis -ls c000000000a06448
      FILE: ../net/core/dev.c
      LINE: 6702
      
         6697  {
         6698          might_sleep();
         6699          set_bit(NAPI_STATE_DISABLE, &n->state);
         6700
         6701          while (test_and_set_bit(NAPI_STATE_SCHED, &n->state))
      * 6702                  msleep(1);
         6703          while (test_and_set_bit(NAPI_STATE_NPSVC, &n->state))
         6704                  msleep(1);
         6705
         6706          hrtimer_cancel(&n->timer);
         6707
         6708          clear_bit(NAPI_STATE_DISABLE, &n->state);
         6709  }
      
      EEH calls into bnx2x twice based on the system log above, first through
      bnx2x_io_error_detected() and then bnx2x_io_slot_reset(), and executes
      the following call chains:
      
      bnx2x_io_error_detected()
        +-> bnx2x_eeh_nic_unload()
             +-> bnx2x_del_all_napi()
                  +-> __netif_napi_del()
      
      bnx2x_io_slot_reset()
        +-> bnx2x_netif_stop()
             +-> bnx2x_napi_disable()
                  +->napi_disable()
      
      Fix this by correcting the sequence of NAPI APIs usage,
      that is delete the NAPI after disabling it.
      
      Fixes: 7fa6f340 ("bnx2x: AER revised")
      Reported-by: NDavid Christensen <drc@linux.vnet.ibm.com>
      Tested-by: NDavid Christensen <drc@linux.vnet.ibm.com>
      Signed-off-by: NManish Chopra <manishc@marvell.com>
      Signed-off-by: NAriel Elior <aelior@marvell.com>
      Link: https://lore.kernel.org/r/20220426153913.6966-1-manishc@marvell.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      af68656d
    • M
      tls: Skip tls_append_frag on zero copy size · a0df7194
      Maxim Mikityanskiy 提交于
      Calling tls_append_frag when max_open_record_len == record->len might
      add an empty fragment to the TLS record if the call happens to be on the
      page boundary. Normally tls_append_frag coalesces the zero-sized
      fragment to the previous one, but not if it's on page boundary.
      
      If a resync happens then, the mlx5 driver posts dump WQEs in
      tx_post_resync_dump, and the empty fragment may become a data segment
      with byte_count == 0, which will confuse the NIC and lead to a CQE
      error.
      
      This commit fixes the described issue by skipping tls_append_frag on
      zero size to avoid adding empty fragments. The fix is not in the driver,
      because an empty fragment is hardly the desired behavior.
      
      Fixes: e8f69799 ("net/tls: Add generic NIC offload infrastructure")
      Signed-off-by: NMaxim Mikityanskiy <maximmi@nvidia.com>
      Reviewed-by: NTariq Toukan <tariqt@nvidia.com>
      Link: https://lore.kernel.org/r/20220426154949.159055-1-maximmi@nvidia.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      a0df7194
    • J
      Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 347cb5de
      Jakub Kicinski 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2022-04-27
      
      We've added 5 non-merge commits during the last 20 day(s) which contain
      a total of 6 files changed, 34 insertions(+), 12 deletions(-).
      
      The main changes are:
      
      1) Fix xsk sockets when rx and tx are separately bound to the same umem, also
         fix xsk copy mode combined with busy poll, from Maciej Fijalkowski.
      
      2) Fix BPF tunnel/collect_md helpers with bpf_xmit lwt hook usage which triggered
         a crash due to invalid metadata_dst access, from Eyal Birger.
      
      3) Fix release of page pool in XDP live packet mode, from Toke Høiland-Jørgensen.
      
      4) Fix potential NULL pointer dereference in kretprobes, from Adam Zabrocki.
      
         (Masami & Steven preferred this small fix to be routed via bpf tree given it's
          follow-up fix to Masami's rethook work that went via bpf earlier, too.)
      
      * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        xsk: Fix possible crash when multiple sockets are created
        kprobes: Fix KRETPROBES when CONFIG_KRETPROBE_ON_RETHOOK is set
        bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook
        bpf: Fix release of page_pool in BPF_PROG_RUN in test runner
        xsk: Fix l2fwd for copy mode + busy poll combo
      ====================
      
      Link: https://lore.kernel.org/r/20220427212748.9576-1-daniel@iogearbox.netSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      347cb5de
    • L
      Merge branch 'akpm' (patches from Andrew) · 8f4dd166
      Linus Torvalds 提交于
      Merge fixes from Andrew Morton:
       "Two patches.
      
        Subsystems affected by this patch series: mm/kasan and mm/debug"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        docs: vm/page_owner: use literal blocks for param description
        kasan: prevent cpu_quarantine corruption when CPU offline and cache shrink occur at same time
      8f4dd166
    • A
      docs: vm/page_owner: use literal blocks for param description · 5603f9bd
      Akira Yokosawa 提交于
      Sphinx generates hard-to-read lists of parameters at the bottom of the
      page.  Fix them by putting literal-block markers of "::" in front of
      them.
      
      Link: https://lkml.kernel.org/r/cfd3bcc0-b51d-0c68-c065-ca1c4c202447@gmail.comSigned-off-by: NAkira Yokosawa <akiyks@gmail.com>
      Fixes: 57f2b54a ("Documentation/vm/page_owner.rst: update the documentation")
      Cc: Shenghong Han <hanshenghong2019@email.szu.edu.cn>
      Cc: Haowen Bai <baihaowen@meizu.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Alex Shi <seakeel@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5603f9bd
    • Z
      kasan: prevent cpu_quarantine corruption when CPU offline and cache shrink occur at same time · 31fa985b
      Zqiang 提交于
      kasan_quarantine_remove_cache() is called in kmem_cache_shrink()/
      destroy().  The kasan_quarantine_remove_cache() call is protected by
      cpuslock in kmem_cache_destroy() to ensure serialization with
      kasan_cpu_offline().
      
      However the kasan_quarantine_remove_cache() call is not protected by
      cpuslock in kmem_cache_shrink().  When a CPU is going offline and cache
      shrink occurs at same time, the cpu_quarantine may be corrupted by
      interrupt (per_cpu_remove_cache operation).
      
      So add a cpu_quarantine offline flags check in per_cpu_remove_cache().
      
      [akpm@linux-foundation.org: add comment, per Zqiang]
      
      Link: https://lkml.kernel.org/r/20220414025925.2423818-1-qiang1.zhang@intel.comSigned-off-by: NZqiang <qiang1.zhang@intel.com>
      Reviewed-by: NDmitry Vyukov <dvyukov@google.com>
      Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Konovalov <andreyknvl@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      31fa985b
    • A
      intel_idle: Fix SPR C6 optimization · 7eac3bd3
      Artem Bityutskiy 提交于
      The Sapphire Rapids (SPR) C6 optimization was added to the end of the
      'spr_idle_state_table_update()' function. However, the function has a
      'return' which may happen before the optimization has a chance to run.
      And this may prevent the optimization from happening.
      
      This is an unlikely scenario, but possible if user boots with, say,
      the 'intel_idle.preferred_cstates=6' kernel boot option.
      
      This patch fixes the issue by eliminating the problematic 'return'
      statement.
      
      Fixes: 3a9cf77b ("intel_idle: add core C6 optimization for SPR")
      Suggested-by: NJan Beulich <jbeulich@suse.com>
      Reported-by: NJan Beulich <jbeulich@suse.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      [ rjw: Minor changelog edits ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7eac3bd3