Re: [PATCH] proc: show locks in /proc/pid/fdinfo/X

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

 



On Thu, Mar 05, 2015 at 06:37:18PM +0300, Andrey Vagin wrote:
> Let's show locks which are associated with a file descriptor in
> its fdinfo file.
> 
> Currently we don't have a reliable way to determine who holds a lock.
> We can find some information in /proc/locks, but PID which is reported
> there can be wrong. For example, a process takes a lock, then forks a
> child and dies. In this case /proc/locks contains the parent pid, which
> can be reused by another process.
> 
> $ cat /proc/locks
> ...
> 6: FLOCK  ADVISORY  WRITE 324 00:13:13431 0 EOF
> ...
> 
> $ ps -C rpcbind
>   PID TTY          TIME CMD
>   332 ?        00:00:00 rpcbind
> 
...

Looks reasonable to me, thanks!
Acked-by: Cyrill Gorcunov <gorcunov@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux