linux/drivers
Eric W. Biederman bde0d2c98b [PATCH] vt: Make vt_pid a struct pid (making it pid wrap around safe).
I took a good hard look at the locking and it appears the locking on vt_pid
is the console semaphore.  Every modified path is called under the console
semaphore except reset_vc when it is called from fn_SAK or do_SAK both of
which appear to be in interrupt context.  In addition I need to be careful
because in the presence of an oops the console_sem may be arbitrarily
dropped.

Which leads me to conclude the current locking is inadequate for my needs.

Given the weird cases we could hit because of oops printing instead of
introducing an extra spin lock to protect the data and keep the pid to
signal and the signal to send in sync, I have opted to use xchg on just the
struct pid * pointer instead.

Due to console_sem we will stay in sync between vt_pid and vt_mode except
for a small window during a SAK, or oops handling.  SAK handling should
kill any user space process that care, and oops handling we are broken
anyway.  Besides the worst that can happen is that I try to send the wrong
signal.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:14 -07:00
..
acorn i2c-algo-bit: Discard the mdelay data struct member 2006-09-26 15:38:51 -07:00
acpi [PATCH] maximum latency tracking infrastructure 2006-10-01 00:39:19 -07:00
amba
ata [libata] Don't use old-EH ->eng_timeout() hook when not needed 2006-09-27 05:41:13 -04:00
atm [ATM] he: Fix __init/__devinit conflict 2006-09-24 20:09:33 -07:00
base [PATCH] hot-add-mem x86_64: use CONFIG_MEMORY_HOTPLUG_SPARSE 2006-10-01 00:39:18 -07:00
block [PATCH] completions: lockdep annotate on stack completions 2006-10-01 00:39:24 -07:00
bluetooth [Bluetooth] Code cleanup for the HCI UART driver 2006-09-28 18:01:30 -07:00
cdrom [PATCH] BLOCK: Make it possible to disable the block layer [try #6] 2006-09-30 20:52:31 +02:00
char [PATCH] vt: Make vt_pid a struct pid (making it pid wrap around safe). 2006-10-02 07:57:14 -07:00
clocksource
connector
cpufreq [CPUFREQ] Fix cut-n-paste bug in suspend printk 2006-09-26 23:02:34 -04:00
crypto [CRYPTO] padlock: Convert padlock-sha to use crypto_hash 2006-09-21 11:46:22 +10:00
dio
dma
edac
eisa [PATCH] EISA bus MODALIAS attributes support 2006-09-27 08:26:19 -07:00
fc4 [PATCH] Remove ->rq_status from struct request 2006-09-30 20:29:23 +02:00
firmware [PATCH] DMI: Decode and save OEM String information 2006-09-29 09:18:09 -07:00
hwmon [PATCH] hdaps: support Lenovo ThinkPad T60 2006-10-01 00:39:24 -07:00
i2c [PATCH] proper flags type of spin_lock_irqsave() 2006-10-01 00:39:21 -07:00
ide [PATCH] completions: lockdep annotate on stack completions 2006-10-01 00:39:24 -07:00
ieee1394 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2006-09-30 09:38:19 -07:00
infiniband [PATCH] r/o bind mount prepwork: inc_nlink() helper 2006-10-01 00:39:30 -07:00
input [PATCH] update legacy io handling for pmac 2006-10-01 00:39:23 -07:00
isdn [PATCH] EICON ISDN: Removed unused definitions for OS_SEEK_* 2006-10-01 00:39:21 -07:00
leds [PATCH] leds: turn LED off when changing triggers 2006-10-01 00:39:21 -07:00
macintosh [PATCH] completions: lockdep annotate on stack completions 2006-10-01 00:39:24 -07:00
mca
md [PATCH] BLOCK: Make it possible to disable the block layer [try #6] 2006-09-30 20:52:31 +02:00
media [PATCH] Generic boolean 2006-10-01 00:39:18 -07:00
message [PATCH] i2o: Switch to pci_get API 2006-10-01 00:39:23 -07:00
mfd [PATCH] ucb1x00-ts: handle errors from input_register_device() 2006-09-29 09:18:10 -07:00
misc [PATCH] inode-diet: Eliminate i_blksize from the inode structure 2006-09-27 08:26:18 -07:00
mmc [PATCH] mmc (mainly): add "or later" clause to licence statement. 2006-10-01 00:39:23 -07:00
mtd [PATCH] BLOCK: Make it possible to disable the block layer [try #6] 2006-09-30 20:52:31 +02:00
net [PATCH] Remove readv/writev methods and use aio_read/aio_write instead 2006-10-01 00:39:28 -07:00
nubus
oprofile [PATCH] inode-diet: Eliminate i_blksize from the inode structure 2006-09-27 08:26:18 -07:00
parisc
parport [PATCH] update legacy io handling for pmac 2006-10-01 00:39:23 -07:00
pci [PATCH] PCI quirks update 2006-10-01 00:39:17 -07:00
pcmcia pccard_store_cis: fix wrong error handling 2006-10-01 13:17:44 -07:00
pnp [PATCH] update legacy io handling for pmac 2006-10-01 00:39:23 -07:00
rapidio
rtc [PATCH] rtc-sysfs fix 2006-10-01 10:39:01 -07:00
s390 [PATCH] completions: lockdep annotate on stack completions 2006-10-01 00:39:24 -07:00
sbus [OPENPROMIO]: Handle current_node being NULL correctly. 2006-09-18 01:47:13 -07:00
scsi [PATCH] completions: lockdep annotate on stack completions 2006-10-01 00:39:24 -07:00
serial [PATCH] ioremap balanced with iounmap for drivers/serial/sunsu.c 2006-10-01 00:39:32 -07:00
sh
sn
spi
tc
telephony
usb [PATCH] r/o bind mount prepwork: inc_nlink() helper 2006-10-01 00:39:30 -07:00
video Merge branch 'intelfb-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/intelfb-2.6 2006-09-30 09:36:56 -07:00
w1
zorro
Kconfig
Makefile