A field in files_struct has been used without initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Linux community,

I have came acrose the following code in dup_fd()

1	newf = kmem_cache_alloc(files_cachep, GFP_KERNEL);
2	if (!newf)
3		goto out;
4
5	atomic_set(&newf->count, 1);
6
7	spin_lock_init(&newf->file_lock);
8	newf->resize_in_progress = false;
9	init_waitqueue_head(&newf->resize_wait);
10	newf->next_fd = 0;
11	new_fdt = &newf->fdtab;
12	new_fdt->max_fds = NR_OPEN_DEFAULT;
13	new_fdt->close_on_exec = newf->close_on_exec_init;

On line 13 new_fdt->close_on_exec has given the value of
newf->close_on_exec_init, but new_fdt->close_on_exec itself has not
been initialized, is it intended to be like this.

Thanky you very much!



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux