1. 23 Mar, 2021 5 commits
    • Hans Petter Selasky's avatar
      MFC dfb33cb0: · af3a80bc
      Hans Petter Selasky authored
      Allocating the LinuxKPI current structure from a software interrupt thread
      must be done using the M_NOWAIT flag after 1ae20f7c .
      
      Sponsored by:	Mellanox Technologies // NVIDIA Networking
      
      (cherry picked from commit dfb33cb0)
      af3a80bc
    • Hans Petter Selasky's avatar
      MFC d1cbe790: · eab581fa
      Hans Petter Selasky authored
      Allocating the LinuxKPI current structure from an interrupt thread must be
      done using the M_NOWAIT flag after 1ae20f7c .
      
      Sponsored by:	Mellanox Technologies // NVIDIA Networking
      
      (cherry picked from commit d1cbe790)
      eab581fa
    • Hans Petter Selasky's avatar
      MFC 6eb60f5b: · b880902e
      Hans Petter Selasky authored
      Use the word "LinuxKPI" instead of "Linux compatibility", to not confuse with
      user-space Linux compatibility support. No functional change.
      
      Sponsored by:	Mellanox Technologies // NVIDIA Networking
      
      (cherry picked from commit 6eb60f5b)
      b880902e
    • Hans Petter Selasky's avatar
      MFC ebe5cf35: · 1a12a42a
      Hans Petter Selasky authored
      Implement basic support for allocating memory from a specific numa node
      in the LinuxKPI.
      
      Differential Revision:	https://reviews.freebsd.org/D29077
      Reviewed by:	markj@ and kib@
      Sponsored by:	Mellanox Technologies // NVIDIA Networking
      
      (cherry picked from commit ebe5cf35)
      1a12a42a
    • Hans Petter Selasky's avatar
      MFC c743a6bd: · 856415c3
      Hans Petter Selasky authored
      Implement mallocarray_domainset(9) variant of mallocarray(9).
      
      Reviewed by:	kib @
      Sponsored by:	Mellanox Technologies // NVIDIA Networking
      
      (cherry picked from commit c743a6bd)
      856415c3
  2. 22 Mar, 2021 1 commit
  3. 21 Mar, 2021 12 commits
  4. 20 Mar, 2021 8 commits
  5. 19 Mar, 2021 6 commits
  6. 18 Mar, 2021 1 commit
    • Vincenzo Maffione's avatar
      netmap: fix memory leak in NETMAP_REQ_PORT_INFO_GET · 09b2bde7
      Vincenzo Maffione authored
      The netmap_ioctl() function has a reference counting bug in case of
      NETMAP_REQ_PORT_INFO_GET command. When `hdr->nr_name[0] == '\0'`,
      the function does not decrease the refcount of "nmd", which is
      increased by netmap_mem_find(), causing a refcount leak.
      
      Reported by:	Xiyu Yang <sherllyyang00@gmail.com>
      Submitted by:	Carl Smith <carl.smith@alliedtelesis.co.nz>
      MFC after: 3 days
      PR:	254311
      
      (cherry picked from commit 0ab5902e)
      09b2bde7
  7. 16 Mar, 2021 2 commits
    • Mitchell Horne's avatar
      ns8250: don't drop IER_TXRDY on bus_grab/ungrab · a54c346f
      Mitchell Horne authored
      It has been observed that some systems are often unable to resume from
      ddb after entering with debug.kdb.enter=1. Checking the status further
      shows the terminal is blocked waiting in tty_drain(), but it never makes
      progress in clearing the output queue, because sc->sc_txbusy is high.
      
      I noticed that when entering polling mode for the debugger, IER_TXRDY is
      set in the failure case. Since this bit is never tracked by the softc,
      it will not be restored by ns8250_bus_ungrab(). This creates a race in
      which a TX interrupt can be lost, creating the hang described above.
      Ensuring that this bit is restored is enough to prevent this, and resume
      from ddb as expected.
      
      The solution is to track this bit in the sc->ier field, for the same
      lifetime that TX interrupts are enabled.
      
      PR:		223917, 240122
      Sponsored by:	The FreeBSD Foundation
      
      (cherry picked from commit 7e7f7bee)
      a54c346f
    • Kirk McKusick's avatar
      Fix bug 253158 - Panic: snapacct_ufs2: bad block - mksnap_ffs(8) crash · cf0310df
      Kirk McKusick authored
      PR:           253158
      
      (cherry picked from commit 8563de2f)
      (cherry picked from commit c31480a1)
      cf0310df
  8. 15 Mar, 2021 5 commits
    • Juraj Lutter's avatar
      newsyslog(8): Implement a new 'E' flag to not rotate empty log files · ffdcad75
      Juraj Lutter authored
      Based on an idea from dvl's coworker, László DANIELISZ, implement
      a new flag, 'E', that prevents newsyslog(8) from rotating the empty
      log files. This 'E' flag ist mostly usable in conjunction with 'B'
      flag that instructs newsyslog(8) to not insert an informational
      message into the log file after rotation, keeping it still empty.
      
      Reviewed by:	markj, ian, manpages (rpokala)
      Approved by:	markj, ian, manpages (rpokala)
      MFC after:	2 weeks
      Differential Revision:	https://reviews.freebsd.org/D28940
      
      (cherry picked from commit c7d27b22)
      ffdcad75
    • Rick Macklem's avatar
      nfsclient: Fix ReadDS/WriteDS/CommitDS nfsstats RPC counts for a NFSv3 DS · 960f07a4
      Rick Macklem authored
      During a recent virtual NFSv4 testing event, a bug in the FreeBSD client
      was detected when doing I/O DS operations on a Flexible File Layout pNFS
      server.  For an NFSv3 DS, the Read/Write/Commit nfsstats were incremented
      instead of the ReadDS/WriteDS/CommitDS counts.
      This patch fixes this.
      
      Only the RPC counts reported by nfsstat(1) were affected by this bug,
      the I/O operations were performed correctly.
      
      MFC after:	2 weeks
      
      (cherry picked from commit c04199af)
      960f07a4
    • Rick Macklem's avatar
      nfsclient: Fix the stripe unit size for a File Layout pNFS layout · f419fd9a
      Rick Macklem authored
      During a recent virtual NFSv4 testing event, a bug in the FreeBSD client
      was detected when doing a File Layout pNFS DS I/O operation.
      The size of the I/O operation was smaller than expected.
      The I/O size is specified as a stripe unit size in bits 6->31 of nflh_util
      in the layout.  I had misinterpreted RFC5661 and had shifted the value
      right by 6 bits. The correct interpretation is to use the value as
      presented (it is always an exact multiple of 64), clearing bits 0->5.
      This patch fixes this.
      
      Without the patch, I/O through the DSs work, but the I/O size is 1/64th
      of what is optimal.
      
      (cherry picked from commit 94f2e42f)
      f419fd9a
    • Rick Macklem's avatar
      nfsclient: add nfs node locking around uses of n_direofoffset · a1224bee
      Rick Macklem authored
      During code inspection I noticed that the n_direofoffset field
      of the NFS node was being manipulated without any lock being
      held to make it SMP safe.
      This patch adds locking of the NFS node's mutex around
      handling of n_direofoffset to make it SMP safe.
      
      I have not seen any failure that could be attributed to n_direofoffset
      being manipulated concurrently by multiple processors, but I think this
      is possible, since directories are read with shared vnode
      locking, plus locks only on individual buffer cache blocks.
      However, there have been as yet unexplained issues w.r.t reading
      large directories over NFS that could have conceivably been caused
      by concurrent manipulation of n_direofoffset.
      
      (cherry picked from commit 15bed8c4)
      a1224bee
    • Rick Macklem's avatar
      nfsclient: add checks for a server returning the current directory · b6b901f8
      Rick Macklem authored
      Commit 3fe2c68b dealt with a panic in cache_enter_time() where
      the vnode referred to the directory argument.
      It would also be possible to get these panics if a broken
      NFS server were to return the directory as an new object being
      created within the directory or in a Lookup reply.
      
      This patch adds checks to avoid the panics and logs
      messages to indicate that the server is broken for the
      file object creation cases.
      
      (cherry picked from commit 3e04ab36)
      b6b901f8