kernel_optimize_test/drivers/char
Thomas Gleixner 3c80fe4ac9 audit: Call tty_audit_push_task() outside preempt disabled
While auditing all tasklist_lock read_lock sites I stumbled over the
following call chain:

audit_prepare_user_tty()
  read_lock(&tasklist_lock);
  tty_audit_push_task();
     mutex_lock(&buf->mutex);

     --> buf->mutex is locked with preemption disabled.

Solve this by acquiring a reference to the task struct under
rcu_read_lock and call tty_audit_push_task outside of the preempt
disabled region.

Move all code which needs to be protected by sighand lock into
tty_audit_push_task() and use lock/unlock_sighand as we do not hold
tasklist_lock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-10-30 08:45:25 -04:00
..
agp
hw_random
ip2
ipmi
mwave
pcmcia
rio
tpm
xilinx_hwicap
.gitignore
amiserial.c
apm-emulation.c
applicom.c
applicom.h
bfin_jtag_comm.c
bfin-otp.c
briq_panel.c
bsr.c
cd1865.h
consolemap.c
cp437.uni
cs5535_gpio.c
cyclades.c
defkeymap.c_shipped
defkeymap.map
digi1.h
digiFep1.h
digiPCI.h
ds1302.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
epca.c
epca.h
epcaconfig.h
generic_nvram.c
generic_serial.c
genrtc.c
hangcheck-timer.c
hpet.c
hvc_beat.c
hvc_console.c
hvc_console.h
hvc_irq.c
hvc_iseries.c
hvc_iucv.c
hvc_rtas.c
hvc_tile.c
hvc_udbg.c
hvc_vio.c
hvc_xen.c
hvcs.c
hvsi.c
i8k.c
isicom.c
istallion.c
Kconfig
keyboard.c
lp.c
Makefile
mbcs.c
mbcs.h
mem.c
misc.c
mmtimer.c
moxa.c
moxa.h
mspec.c
mxser.c
mxser.h
n_gsm.c
n_hdlc.c
n_r3964.c
n_tty.c
nozomi.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
ps3flash.c
pty.c
ramoops.c
random.c
raw.c
riscom8_reg.h
riscom8.c
riscom8.h
rocket_int.h
rocket.c
rocket.h
rtc.c
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
stallion.c
sx.c
sx.h
sxboards.h
sxwindow.h
synclink_gt.c
synclink.c
synclinkmp.c
sysrq.c
tb0219.c
tlclk.c
toshiba.c
tty_audit.c audit: Call tty_audit_push_task() outside preempt disabled 2010-10-30 08:45:25 -04:00
tty_buffer.c
tty_io.c
tty_ioctl.c
tty_ldisc.c
tty_mutex.c
tty_port.c
ttyprintk.c
uv_mmtimer.c
vc_screen.c
viotape.c
virtio_console.c
vme_scc.c
vt_ioctl.c
vt.c