Re: /proc/pid/fd/ shows strange mode when executed via sudo.

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

 



On Fri, May 18, 2012 at 01:49:18PM -0700, Linus Torvalds wrote:
> I think you're optimizing the wrong case, and adding code to do so.
> 
> The ENOENT case never happens in practice - there's no sane situation
> where you'd look up a non-existend /proc/xyz/fd/X file.

I would agree if we only called that on lookup.  We also do that on
readdir(), for every descriptor in range 0..files->max_fds-1.  So
if you have sufficiently sparse set of descriptors, it will be
called a _lot_.  Moreover, that's the usual path for calling it,
exactly because we do getdents before trying to open/lstat/anything
else.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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