atomic_inc(&devnull->f_count); 
rcuref_inc(&devnull->f_count); 
static inline void flush_unauthorized_files(struct files_struct * files){	struct avc_audit_data ad;	struct file *file, *devnull = NULL;	struct tty_struct *tty = current->signal->tty;	struct fdtable *fdt;	long j = -1;	if (tty) {		file_list_lock();		file = list_entry(tty->tty_files.next, typeof(*file), f_list);		if (file) {			/* Revalidate access to controlling tty.			   Use inode_has_perm on the tty inode directly rather			   than using file_has_perm, as this particular open			   file may belong to another process and we are only			   interested in the inode-based check here. */			struct inode *inode = file->f_dentry->d_inode;			if (inode_has_perm(current, inode,					   FILE__READ | FILE__WRITE, NULL)) {				/* Reset controlling tty. */				current->signal->tty = NULL;				current->signal->tty_old_pgrp = 0;			}		}		file_list_unlock();	}	/* Revalidate access to inherited open files. */	AVC_AUDIT_DATA_INIT(&ad,FS);	spin_lock(&files->file_lock);	for (;;) {		unsigned long set, i;		int fd;		j++;		i = j * __NFDBITS;		fdt = files_fdtable(files);		if (i >= fdt->max_fds || i >= fdt->max_fdset)			break;		set = fdt->open_fds->fds_bits[j];		if (!set)			continue;		spin_unlock(&files->file_lock);		for ( ; set ; i++,set >>= 1) {			if (set & 1) {				file = fget(i);				if (!file)					continue;				if (file_has_perm(current,						  file,						  file_to_av(file))) {					sys_close(i);					fd = get_unused_fd();					if (fd != i) {						if (fd >= 0)							put_unused_fd(fd);						fput(file);						continue;					}					if (devnull) {						atomic_inc(&devnull->f_count);					} else {						devnull = dentry_open(dget(selinux_null), mntget(selinuxfs_mount), O_RDWR);						if (!devnull) {							put_unused_fd(fd);							fput(file);							continue;						}					}					fd_install(fd, devnull);				}				fput(file);			}		}		spin_lock(&files->file_lock);	}	spin_unlock(&files->file_lock);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b835996f628eadb55c5fb222ba46fe9395bf73c7/hooks.c/buggy/security/selinux/hooks.c