1. Feb 04, 2022
  2. Feb 03, 2022
    • Waiman Long's avatar
      cgroup/cpuset: Fix "suspicious RCU usage" lockdep warning · 2bdfd282
      Waiman Long authored
      It was found that a "suspicious RCU usage" lockdep warning was issued
      with the rcu_read_lock() call in update_sibling_cpumasks().  It is
      because the update_cpumasks_hier() function may sleep. So we have
      to release the RCU lock, call update_cpumasks_hier() and reacquire
      it afterward.
      
      Also add a percpu_rwsem_assert_held() in update_sibling_cpumasks()
      instead of stating that in the comment.
      
      Fixes: 4716909c
      
       ("cpuset: Track cpusets that use parent's effective_cpus")
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Tested-by: default avatarPhil Auld <pauld@redhat.com>
      Reviewed-by: default avatarPhil Auld <pauld@redhat.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      2bdfd282
    • Nathan Chancellor's avatar
      tools/resolve_btfids: Do not print any commands when building silently · 7f3bdbc3
      Nathan Chancellor authored
      When building with 'make -s', there is some output from resolve_btfids:
      
      $ make -sj"$(nproc)" oldconfig prepare
        MKDIR     .../tools/bpf/resolve_btfids/libbpf/
        MKDIR     .../tools/bpf/resolve_btfids//libsubcmd
        LINK     resolve_btfids
      
      Silent mode means that no information should be emitted about what is
      currently being done. Use the $(silent) variable from Makefile.include
      to avoid defining the msg macro so that there is no information printed.
      
      Fixes: fbbb68de
      
       ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/bpf/20220201212503.731732-1-nathan@kernel.org
      7f3bdbc3
    • John Hubbard's avatar
      Revert "mm/gup: small refactoring: simplify try_grab_page()" · c36c04c2
      John Hubbard authored
      This reverts commit 54d516b1
      
      That commit did a refactoring that effectively combined fast and slow
      gup paths (again).  And that was again incorrect, for two reasons:
      
       a) Fast gup and slow gup get reference counts on pages in different
          ways and with different goals: see Linus' writeup in commit
          cd1adf1b ("Revert "mm/gup: remove try_get_page(), call
          try_get_compound_head() directly""), and
      
       b) try_grab_compound_head() also has a specific check for
          "FOLL_LONGTERM && !is_pinned(page)", that assumes that the caller
          can fall back to slow gup. This resulted in new failures, as
          recently report by Will McVicker [1].
      
      But (a) has problems too, even though they may not have been reported
      yet.  So just revert this.
      
      Link: https://lore.kernel.org/r/20220131203504.3458775-1-willmcvicker@google.com [1]
      Fixes: 54d516b1
      
       ("mm/gup: small refactoring: simplify try_grab_page()")
      Reported-and-tested-by: default avatarWill McVicker <willmcvicker@google.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Minchan Kim <minchan@google.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: stable@vger.kernel.org # 5.15
      Signed-off-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c36c04c2
    • Linus Torvalds's avatar
      Merge tag 'mips-fixes-5.17_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · d394bb77
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - fix missed change for PTR->PTR_WD conversion
      
       - kernel-doc fixes
      
      * tag 'mips-fixes-5.17_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: KVM: fix vz.c kernel-doc notation
        MIPS: octeon: Fix missed PTR->PTR_WD conversion
      d394bb77
    • David S. Miller's avatar
      Merge branch 'dsa-mv88e6xxx-phylink_generic_validate' · 9c309189
      David S. Miller authored
      
      
      Russell King says:
      
      ====================
      net: dsa: mv88e6xxx: convert to phylink_generic_validate()
      
      The overall objective of this series is to convert the mv88e6xxx DSA
      driver to use phylink_generic_validate().
      
      Patch 1 adds a new helper mv88e6352_g2_scratch_port_has_serdes() which
      indicates whether an 88e6352 port has a serdes associated with it. This
      is necessary as ports 4 and 5 will normally be in automedia mode, where
      the CMODE field in the port status register will change e.g. between 15
      (internal PHY) and 9 (1000base-X) depending on whether the serdes has
      link.
      
      The existing code caches the cmode field, and depending whether the
      serdes has link at probe time, determines whether we allow things such
      as the serdes statistics to be accessed. This means if the link isn't
      up at probe time, the serdes is essentially unavailable.
      
      Patch 1 addresses this by reading the pin configuration to find out
      whether the serdes is attached to port 4 or port 5.
      
      Patch 2 is a joint effort between myself and Marek Behún, adding the
      supported interfaces and MAC capabilities to all mv88e6xxx supported
      switch devices. This is slightly more restrictive than the original
      code as we didn't used to care too much about the interface mode, but
      with this we do - which is why we must know if there's a serdes
      associated now.
      
      Patch 3 switches mv88e6xxx to use the generic validation by removing
      the initialisation of the phylink_validate pointer in the dsa_ops
      struct.
      
      Patch 4 updates the statistics code to use the new helper in patch 1,
      so the serdes statistics are available even if the link was down at
      driver probe time.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c309189
    • Russell King (Oracle)'s avatar
      net: dsa: mv88e6xxx: improve 88e6352 serdes statistics detection · 7f7d32bc
      Russell King (Oracle) authored
      
      
      The decision whether to report serdes statistics currently depends on
      the cached C_Mode value for the port, read at probe time or updated by
      configuration. However, port 4 can be in "automedia" mode when it is
      used as a serdes port, meaning it switches between the internal PHY and
      the serdes, changing the read-only C_Mode value depending on which
      first gains link. Consequently, the C_Mode value read at probe does not
      accurately reflect whether the port has the serdes associated with it.
      
      In "net: dsa: mv88e6xxx: add mv88e6352_g2_scratch_port_has_serdes()",
      we added a way to read the hardware configuration to determine which
      port has the serdes associated with it. Use this to determine which
      port reports the serdes statistics.
      
      Reviewed-by: default avatarMarek Behún <kabel@kernel.org>
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7f7d32bc