lindebugfs: Zero the linux_file structure before use.

This avoids clients using garbage values on the stack and makes
debugging easier.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
This commit is contained in:
Hans Petter Selasky 2022-03-11 17:29:54 +01:00
parent 4dc815608e
commit 88a29d89eb

View File

@ -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