kernel-ark/drivers/char
Mathieu Desnoyers 44e4360fa3 drivers/char/random.c: fix boot id uniqueness race
/proc/sys/kernel/random/boot_id can be read concurrently by userspace
processes.  If two (or more) user-space processes concurrently read
boot_id when sysctl_bootid is not yet assigned, a race can occur making
boot_id differ between the reads.  Because the whole point of the boot id
is to be unique across a kernel execution, fix this by protecting this
operation with a spinlock.

Given that this operation is not frequently used, hitting the spinlock
on each call should not be an issue.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12 13:12:12 -07:00
..
agp drm/i915: disable ppgtt on snb when dmar is enabled 2012-04-02 15:59:07 +02:00
hw_random ARM: global cleanups 2012-03-27 16:03:32 -07:00
ipmi Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-28 17:19:28 -07:00
mwave Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
pcmcia Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
tpm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2012-03-21 13:25:04 -07:00
xilinx_hwicap Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
apm-emulation.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm 2012-04-05 17:34:30 -07:00
applicom.c
applicom.h
bfin-otp.c
bsr.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ds1302.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ds1620.c
dsp56k.c
dtlk.c
efirtc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
generic_nvram.c drivers: fix up various ->llseek() implementations 2011-07-20 20:47:58 -04:00
genrtc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hangcheck-timer.c
hpet.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
i8k.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
Kconfig tty: delete briq_panel.c driver 2012-03-08 10:45:55 -08:00
lp.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
Makefile tty: delete briq_panel.c driver 2012-03-08 10:45:55 -08:00
mbcs.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mbcs.h
mem.c switch device_get_devnode() and ->devnode() to umode_t * 2012-01-03 22:54:55 -05:00
misc.c switch device_get_devnode() and ->devnode() to umode_t * 2012-01-03 22:54:55 -05:00
mmtimer.c
msm_smd_pkt.c drivers/char/msm_smd_pkt.c: don't use IS_ERR() 2011-08-25 16:25:33 -07:00
mspec.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
nsc_gpio.c
nvram.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
nwbutton.c
nwbutton.h
nwflash.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
pc8736x_gpio.c
ppdev.c drivers/char/ppdev.c: put gotten port value 2011-05-26 17:12:37 -07:00
ps3flash.c drivers/char: Add module.h to those who were using it implicitly 2011-10-31 19:31:40 -04:00
ramoops.c char/ramoops: included linux/err.h twice 2012-02-24 14:16:43 -08:00
random.c drivers/char/random.c: fix boot id uniqueness race 2012-04-12 13:12:12 -07:00
raw.c switch device_get_devnode() and ->devnode() to umode_t * 2012-01-03 22:54:55 -05:00
rtc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
scx200_gpio.c
snsc_event.c
snsc.c
snsc.h
sonypi.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
tb0219.c
tile-srom.c tile-srom.c driver: minor code cleanup 2012-04-02 12:14:10 -04:00
tlclk.c char: Fix typo in tlclk.c 2012-02-09 23:09:37 +01:00
toshiba.c
ttyprintk.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
uv_mmtimer.c
virtio_console.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00