Re: [RFC][PATCHES] reducing d_add() use, part 3 (procfs)

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

 



On Sat, May 26, 2018 at 04:56:40PM +0300, Alexey Dobriyan wrote:
> On Sat, May 26, 2018 at 04:07:26PM +0300, Alexey Dobriyan wrote:
> > On Sat, May 26, 2018 at 01:03:02AM +0100, Al Viro wrote:
> > > On Sat, May 26, 2018 at 12:53:26AM +0100, Al Viro wrote:
> > 
> > > ... and a lot more convoluted ones - procfs side.
> > > I would really like an ACK/NAK from Alexey on that part...
> > 
> > Is /proc part self contained? This happens with 5 patches against mainline:
> > 
> > Welcome to Debian GNU/Linux 8 (jessie)!
> > 
> > [    0.764706] systemd[1]: Failed to insert module 'autofs4'
> > [    0.765357] systemd[1]: Failed to insert module 'ipv6'
> > [    0.766047] systemd[1]: Set hostname to <debian88>.
> > [    0.778266] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read)
> > [    0.785611] random: systemd: uninitialized urandom read (16 bytes read)
> > [    0.790655] ------------[ cut here ]------------
> 
> Regardless, the broken patch is
> "[PATCH 3/5] don't bother with tid_fd_revalidate() in lookups".

D'oh...  Incremental would be

diff --git a/fs/proc/fd.c b/fs/proc/fd.c
index 694faeacf42f..f5de22a9e9e0 100644
--- a/fs/proc/fd.c
+++ b/fs/proc/fd.c
@@ -247,15 +247,15 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx,
 	for (fd = ctx->pos - 2;
 	     fd < files_fdtable(files)->max_fds;
 	     fd++, ctx->pos++) {
-		struct file *file;
+		struct file *f;
 		struct fd_data data;
 		char name[10 + 1];
 		int len;
 
-		file = fcheck_files(files, fd);
-		if (!file)
+		f = fcheck_files(files, fd);
+		if (!f)
 			continue;
-		data.mode = file->f_mode;
+		data.mode = f->f_mode;
 		rcu_read_unlock();
 		data.fd = fd;
 



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

  Powered by Linux