android_kernel_xiaomi_sm7250/drivers/char
Eric W. Biederman 04a2e6a5cb [PATCH] pid: make session_of_pgrp use struct pid instead of pid_t
To properly implement a pid namespace I need to deal exclusively in terms of
struct pid, because pid_t values become ambiguous.

To this end session_of_pgrp is transformed to take and return a struct pid
pointer.  To avoid the need to worry about reference counting I now require my
caller to hold the appropriate locks.  Leaving callers repsonsible for
increasing the reference count if they need access to the result outside of
the locks.

Since session_of_pgrp currently only has one caller and that caller simply
uses only test the result for equality with another process group, the locking
change means I don't actually have to acquire the tasklist_lock at all.

tiocspgrp is also modified to take and release the lock.  The logic there is a
little more complicated but nothing I won't need when I convert pgrp of a tty
to a struct pid pointer.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:31 -08:00
..
agp
drm [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
hw_random [PATCH] Char: use more PCI_DEVICE macro 2007-02-12 09:48:27 -08:00
ip2 [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
ipmi [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
mwave
pcmcia [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
rio [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
tpm [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
watchdog [PATCH] Char: use more PCI_DEVICE macro 2007-02-12 09:48:27 -08:00
.gitignore
amiserial.c [PATCH] CHAR-Amiserial: turn local_save_flags() + local_irq_disable() into local_irq_save() 2007-02-11 11:18:07 -08:00
apm-emulation.c
applicom.c
applicom.h
briq_panel.c
cd1865.h
ChangeLog
consolemap.c
cp437.uni
cs5535_gpio.c
cyclades.c [PATCH] Char: cyclades, use pci_device_id 2007-02-12 09:48:28 -08:00
decserial.c
defkeymap.c_shipped
defkeymap.map
digi1.h
digi.h
digiFep1.h
digiPCI.h
ds1286.c
ds1302.c [PATCH] DS1302: local_irq_disable() is redundant after local_irq_save() 2007-02-12 09:48:30 -08:00
ds1620.c
dsp56k.c
dtlk.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
ec3104_keyb.c
efirtc.c
epca.c
epca.h
epcaconfig.h
esp.c
generic_nvram.c
generic_serial.c
genrtc.c
hangcheck-timer.c
hpet.c
hvc_beat.c
hvc_console.c
hvc_console.h
hvc_iseries.c
hvc_rtas.c
hvc_vio.c
hvcs.c
hvsi.c
i8k.c
ip27-rtc.c
isicom.c
istallion.c
Kconfig
keyboard.c
lcd.c
lcd.h
lp.c
Makefile
mbcs.c
mbcs.h
mem.c
misc.c
mmtimer.c
moxa.c [PATCH] Char: moxa, pci probing 2007-02-11 10:51:30 -08:00
mspec.c
mxser_new.c
mxser_new.h
mxser.c [PATCH] mxser: remove useless fields 2007-02-11 11:18:06 -08:00
mxser.h
n_hdlc.c
n_r3964.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
n_tty.c
nsc_gpio.c
nvram.c
nwbutton.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
pty.c
random.c
raw.c [PATCH] raw: don't allow the creation of a raw device with minor number 0 2007-02-11 10:51:34 -08:00
riscom8_reg.h
riscom8.c
riscom8.h
rocket_int.h
rocket.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
rocket.h
rtc.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
scc.h
scx200_gpio.c
selection.c
ser_a2232.c
ser_a2232.h
ser_a2232fw.ax
ser_a2232fw.h
serial167.c
snsc_event.c
snsc.c
snsc.h
sonypi.c
specialix_io8.h
specialix.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
stallion.c
sx.c
sx.h
sxboards.h
sxwindow.h
synclink_gt.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
synclink.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
synclinkmp.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00
sysrq.c
tb0219.c
tipar.c
tlclk.c
toshiba.c [PATCH] seq_file conversion: toshiba.c 2007-02-11 10:51:34 -08:00
tty_io.c [PATCH] pid: make session_of_pgrp use struct pid instead of pid_t 2007-02-12 09:48:31 -08:00
tty_ioctl.c [PATCH] tty: improve encode_baud_rate logic 2007-02-11 10:51:32 -08:00
vc_screen.c
viocons.c
viotape.c
vme_scc.c
vr41xx_giu.c
vt_ioctl.c
vt.c [PATCH] Char: timers cleanup 2007-02-12 09:48:30 -08:00