Jason A. Donenfeld
4a072c71f4
random: silence compiler warnings and fix race
...
Odd versions of gcc for the sh4 architecture will actually warn about
flags being used while uninitialized, so we set them to zero. Non crazy
gccs will optimize that out again, so it doesn't make a difference.
Next, over aggressive gccs could inline the expression that defines
use_lock, which could then introduce a race resulting in a lock
imbalance. By using READ_ONCE, we prevent that fate. Finally, we make
that assignment const, so that gcc can still optimize a nice amount.
Finally, we fix a potential deadlock between primary_crng.lock and
batched_entropy_reset_lock, where they could be called in opposite
order. Moving the call to invalidate_batched_entropy to outside the lock
rectifies this issue.
Fixes: b169c13de4
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
2017-06-19 21:42:49 -04:00
..
agp
agp: use set_memory.h header
2017-05-08 17:15:13 -07:00
hw_random
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
2017-05-02 15:53:46 -07:00
ipmi
Annotation of module parameters that specify device settings
2017-05-10 19:13:03 -07:00
mwave
Annotate hardware config module parameters in drivers/char/mwave/
2017-04-20 12:02:32 +01:00
pcmcia
lib/vsprintf.c: remove %Z support
2017-02-27 18:43:47 -08:00
tpm
char/misc patches for 4.12-rc1
2017-05-04 19:15:35 -07:00
xilinx_hwicap
char: xilinx_hwicap: Remove pointless local variables
2017-01-25 11:41:44 +01:00
xillybus
apm-emulation.c
apm-emulation: move APM_MINOR_DEV to include/linux/miscdevice.h
2017-01-10 21:46:41 +01:00
applicom.c
Annotate hardware config module parameters in drivers/char/
2017-04-20 12:02:32 +01:00
applicom.h
bfin-otp.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
bsr.c
ds1302.c
ds1302: remove unneeded linux/miscdevice.h include
2017-01-10 21:46:41 +01:00
ds1620.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
dsp56k.c
format-security: move static strings to const
2017-05-08 17:15:14 -07:00
dtlk.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
efirtc.c
generic_nvram.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
hangcheck-timer.c
hangcheck-timer: Fix typo in comment
2017-04-08 18:08:54 +02:00
hpet.c
hpet: Make cmd parameter of hpet_ioctl_common() unsigned
2017-03-17 15:10:49 +09:00
Kconfig
TTY/Serial driver patches for 4.11-rc1
2017-02-22 12:17:25 -08:00
lp.c
char: lp: fix possible integer overflow in lp_setup()
2017-05-16 23:05:20 +02:00
Makefile
mbcs.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
mbcs.h
mem.c
drivers: char: mem: Check for address space wraparound with mmap()
2017-05-18 16:53:55 +02:00
misc.c
drivers: char: misc: Replace printk with pr_err.
2017-04-08 17:53:06 +02:00
mmtimer.c
time: Change k_clock timer_set() and timer_get() to use timespec64
2017-04-14 21:49:56 +02:00
mspec.c
drivers, char: convert vma_data.refcnt from atomic_t to refcount_t
2017-03-23 13:57:19 +01:00
nsc_gpio.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
nvram.c
nwbutton.c
drivers/char/nwbutton: Fix build breakage caused by include file reshuffling
2017-03-07 08:35:49 +01:00
nwbutton.h
nwflash.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
pc8736x_gpio.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
powernv-op-panel.c
ppdev.c
ppdev: fix registering same device name
2017-03-16 17:32:21 +09:00
ps3flash.c
random.c
random: silence compiler warnings and fix race
2017-06-19 21:42:49 -04:00
raw.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
rtc.c
sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>
2017-03-02 08:42:32 +01:00
scx200_gpio.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
snsc.c
sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>
2017-03-02 08:42:32 +01:00
snsc.h
snsc_event.c
sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h>
2017-03-02 08:42:29 +01:00
sonypi.c
scripts/spelling.txt: add "initialiazation" pattern and fix typo instances
2017-02-27 18:43:47 -08:00
tb0219.c
tile-srom.c
tlclk.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
toshiba.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
ttyprintk.c
uv_mmtimer.c
virtio_console.c
virtio: fixes, cleanups, performance
2017-05-10 11:33:08 -07:00