From nobody Fri Apr 24 17:56:24 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHY1P27z6ZxfG for ; Fri, 24 Apr 2026 17:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHX3Z43z3qb7 for ; Fri, 24 Apr 2026 17:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=elODdkXCSqPK11GwegWHS0HLXg04547Lshf1w1u3QzM=; b=L/xBxZS8fNChQ10kNRkpZs5zejfeXvDXE7GcD5dC/KgM5O+/O3LouuLwcEh0R4R3EEK/yd w7pinsssBdLtmsHYdos7RiH3aqiOzM8IuDqfaqtEW9gg6aXM6rpnmL/DgwKcyvkGd6uYrn 3q02izVp9u0IhCxI+FJV/Lgly3wJ3bJpbHL5dzpawNd1mEs1j/rHEjcaEod4FlzM1abzCT sXgepl1SdsMaEo75zrXqwjezUID1NtZMnGdzRACajKUUID9UJc2yoZCD6byRdiE9wI9mps y2t8QWMvvCeRYbscamXGAXJsZVsIo7UbPI/s53bAS/tvWihNYHvSQIHyRBmN6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053384; a=rsa-sha256; cv=none; b=RiKJ5efNOIr4IShm06TygfcLnUa1OPrto3idZ6VK8GimVFwy/qMyXDjUrkVOssDSu77oRc ctKgor8T5hwzqsr+v1FyJORbbqDRJ+PoCnpMWAPrc6sSLD4X4ClqSKLfUAc5tGJbvfRpoS llC6Wmjwx9/DjPPBhEshYbuztTyqFMkUIk/tRikn4qgQoHohf7vlcm2OwAe38UrxtRRn6p 6wLqiZkSn+MPzHdoYIGr5za4w0DJc2C46wQKWMwn1Wc6+/WqegvI84Yekr9zuuNWQAR9ML tlxYGdHW3zT3gI5rnsuVjyIXsaxMuYovaqQETFkf2XInz0Akmmd5Vg+PiwQKXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=elODdkXCSqPK11GwegWHS0HLXg04547Lshf1w1u3QzM=; b=QAHs+D3ZBNrsRe4O8prx/T53OPA0f01ET5YcZ7O7eegtamkhWJD8VRt+PrtmofbRAGo6Tc E2+4H/VQmqRwZ9QXwaBpJo35fe5HrS9BusEfLihPCHUVTu1hw1v22n1NRkGiponx+alN27 ynY/Y6IQbAWm0jXdikiwOPqF8RNSbcmQYDPuuwpYnrhPCzGS7SSMUMuxzuQZBfPFKYf4Kw Aeo2m81Yj/hfEMNEaj8nhqhn4ogg4GyyuVZG9KnElKD/nw9l9zqpmnyBnQgfIfXCxV/W7n tFEivo3VAN1LiSyaqLg25ZJjUFYo6IqXPsy531BtbGfkgqACDoSXqYTLp88R4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHX2sN3z1CZC for ; Fri, 24 Apr 2026 17:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1de21 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: cd1180d273a8 - stable/15 - LinuxKPI: Clear the sbuf at the start of each call to seq_read List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cd1180d273a88afb43dda9f27cca389e5d68d905 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:24 +0000 Message-Id: <69ebaec8.1de21.30b1e38e@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cd1180d273a88afb43dda9f27cca389e5d68d905 commit cd1180d273a88afb43dda9f27cca389e5d68d905 Author: John Baldwin AuthorDate: 2026-03-17 16:05:17 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:49:14 +0000 LinuxKPI: Clear the sbuf at the start of each call to seq_read Each invocation of seq_read invokes the seq_file.show callback which writes into the sbuf. Then it invokes sbuf_finish before copying the data into the caller's buffer. Without this, a second call to seq_read on the same file would try to append data to a finished sbuf. Reviewed by: bz Sponsored by: AFRL, DARPA (cherry picked from commit c181c8f5ca707962359e636ca5aa536e60147eee) --- sys/compat/linuxkpi/common/src/linux_seq_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/src/linux_seq_file.c b/sys/compat/linuxkpi/common/src/linux_seq_file.c index 9c06fe27bebe..6fe6ccd1e68e 100644 --- a/sys/compat/linuxkpi/common/src/linux_seq_file.c +++ b/sys/compat/linuxkpi/common/src/linux_seq_file.c @@ -49,6 +49,7 @@ seq_read(struct linux_file *f, char *ubuf, size_t size, off_t *ppos) m = f->private_data; sbuf = m->buf; + sbuf_clear(sbuf); p = m->op->start(m, ppos); rc = m->op->show(m, p);