alistair23-linux/drivers
Masatake YAMATO 93e14b6d77 tun: add device name(iff) field to proc fdinfo entry
A file descriptor opened for /dev/net/tun and a tun device are
connected with ioctl.  Though understanding the connection is
important for trouble shooting, no way is given to a user to know
the connected device for a given file descriptor at userland.

This patch adds a new fdinfo field for the device name connected to
a file descriptor opened for /dev/net/tun.

Here is an example of the field:

    # lsof | grep tun
    qemu-syst 4565         qemu   25u      CHR             10,200       0t138      12921 /dev/net/tun
    ...

    # cat /proc/4565/fdinfo/25
    pos:	138
    flags:	0104002
    iff:	vnet0

    # ip link show dev vnet0
    8: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...

changelog:

    v2: indent iff just like the other fdinfo fields are.
    v3: remove unused variable.
        Both are suggested by David Miller <davem@davemloft.net>.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-28 23:46:56 -08:00
..
accessibility
acpi ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
amba
ata ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
atm
auxdisplay
base regmap: Updates for v3.14 2014-01-25 13:18:00 -08:00
bcma
block drivers/block/Kconfig: update RAM block device module name 2014-01-23 16:36:53 -08:00
bluetooth
bus
cdrom
char Merge branch 'ipmi' (ipmi patches from Corey Minyard) 2014-01-25 15:33:41 -08:00
clk The first half of the clk framework pull request is made up almost 2014-01-23 18:56:08 -08:00
clocksource ARM: SoC DT updates for 3.14 2014-01-23 18:45:38 -08:00
connector
cpufreq Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-01-24 17:13:49 -08:00
cpuidle
crypto ARM: driver updates for 3.14 2014-01-23 18:49:36 -08:00
dca
devfreq ARM: SoC cleanups for 3.14 2014-01-23 18:36:55 -08:00
dio
dma ARM: SoC DT updates for 3.14 2014-01-23 18:45:38 -08:00
edac
eisa
extcon
firewire
firmware ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
fmc
gpio ARM: driver updates for 3.14 2014-01-23 18:49:36 -08:00
gpu ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
hid ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
hsi
hv hyperv: Add support for physically discontinuous receive buffer 2014-01-27 16:40:45 -08:00
hwmon Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-01-24 17:13:49 -08:00
hwspinlock
i2c ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
ide ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
idle ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
iio
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-01-24 17:17:30 -08:00
iommu ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
ipack
irqchip Xtensa patchset for 3.14-rc1 2014-01-25 10:49:30 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
leds
lguest
macintosh
mailbox drivers/mailbox/omap: make mbox->irq signed for error handling 2014-01-23 16:36:53 -08:00
md md updates for 3.14 2014-01-24 17:41:50 -08:00
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
memory
memstick drivers/memstick/host/rtsx_pci_ms.c: fix ms card data transfer bug 2014-01-23 16:37:04 -08:00
message
mfd regulator: Updates for v3.14 2014-01-25 13:19:10 -08:00
misc
mmc MMC highlights for 3.14: 2014-01-26 11:00:41 -08:00
mtd
net tun: add device name(iff) field to proc fdinfo entry 2014-01-28 23:46:56 -08:00
nfc
ntb
nubus
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
oprofile
parisc
parport
pci ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
pcmcia
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
pinctrl ARM: SoC DT updates for 3.14 2014-01-23 18:45:38 -08:00
platform ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
pnp
power Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
powercap
pps
ps3
ptp
pwm
rapidio
regulator regulator: Updates for v3.14 2014-01-25 13:19:10 -08:00
remoteproc
reset
rpmsg
rtc Merge branch 'akpm' (incoming from Andrew) 2014-01-23 19:11:50 -08:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
sbus
scsi Main batch of InfiniBand/RDMA changes for 3.14: 2014-01-24 17:18:32 -08:00
sfi
sh
sn
spi spi: Updates for v3.14 2014-01-25 13:20:36 -08:00
ssb
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
target
tc
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-01-24 17:13:49 -08:00
tty ARM: driver updates for 3.14 2014-01-23 18:49:36 -08:00
uio
usb ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
uwb
vfio - Convert to misc driver to support module auto loading 2014-01-24 17:42:31 -08:00
vhost
video fbdev changes for 3.14 2014-01-24 17:16:31 -08:00
virt
virtio
vlynq drivers/vlynq/vlynq.c: fix another resource size off by 1 error 2014-01-23 16:36:55 -08:00
vme
w1 drivers/w1/masters/w1-gpio.c: add strong pullup emulation 2014-01-23 16:37:04 -08:00
watchdog ARM: driver updates for 3.14 2014-01-23 18:49:36 -08:00
xen ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
zorro
Kconfig
Makefile