Date: Thu, 17 Mar 2022 10:00:17 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b5cc52c21d7d - stable/13 - lindebugfs: Zero the linux_file structure before use. Message-ID: <202203171000.22HA0HJk088247@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=b5cc52c21d7d34eae93c996cee09e7d2896afa6e commit b5cc52c21d7d34eae93c996cee09e7d2896afa6e 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 09:55:02 +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 (cherry picked from commit 88a29d89ebab1ed60607c3dab73143c3b59a0f83) --- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203171000.22HA0HJk088247>