git: 09fcb3900f1b - releng/13.1 - lindebugfs: Zero the linux_file structure before use.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Thu, 17 Mar 2022 12:28:14 UTC
The branch releng/13.1 has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=09fcb3900f1b86efc250b62ee913b57a064d7d8f

commit 09fcb3900f1b86efc250b62ee913b57a064d7d8f
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-03-11 16:29:54 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-03-17 12:26:19 +0000

    lindebugfs: Zero the linux_file structure before use.
    
    This avoids clients using garbage values on the stack and makes
    debugging easier.
    
    Sponsored by:   NVIDIA Networking
    Approved by:    re (gjb)
    
    (cherry picked from commit 88a29d89ebab1ed60607c3dab73143c3b59a0f83)
    (cherry picked from commit b5cc52c21d7d34eae93c996cee09e7d2896afa6e)
---
 sys/compat/lindebugfs/lindebugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c
index 8eaa41412fd2..9507cded9ebd 100644
--- a/sys/compat/lindebugfs/lindebugfs.c
+++ b/sys/compat/lindebugfs/lindebugfs.c
@@ -117,7 +117,7 @@ static int
 debugfs_fill(PFS_FILL_ARGS)
 {
 	struct dentry_meta *d;
-	struct linux_file lf;
+	struct linux_file lf = {};
 	struct seq_file *sf;
 	struct vnode vn;
 	void *buf;
@@ -139,7 +139,6 @@ debugfs_fill(PFS_FILL_ARGS)
 		len = sbuf_len(sb);
 	}
 	off = 0;
-	lf.private_data = NULL;
 	rc = d->dm_fops->open(&vn, &lf);
 	if (rc < 0) {
 #ifdef INVARIANTS