diff options
author | Jan Kara <jack@suse.cz> | 2014-06-04 16:11:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 16:54:17 -0700 |
commit | 939f04bec1a4ef6ba4370b0f34b01decc844b1b1 (patch) | |
tree | 1da1d9914daa6d19813589502f458c7a24e737e0 /crypto/michael_mic.c | |
parent | bd8d7cf5b8410fe98eba06a9aaa90efe88815d8a (diff) | |
download | linux-stable-939f04bec1a4ef6ba4370b0f34b01decc844b1b1.tar.gz linux-stable-939f04bec1a4ef6ba4370b0f34b01decc844b1b1.tar.bz2 linux-stable-939f04bec1a4ef6ba4370b0f34b01decc844b1b1.zip |
printk: enable interrupts before calling console_trylock_for_printk()
We need interrupts disabled when calling console_trylock_for_printk()
only so that cpu id we pass to can_use_console() remains valid (for
other things console_sem provides all the exclusion we need and
deadlocks on console_sem due to interrupts are impossible because we use
down_trylock()). However if we are rescheduled, we are guaranteed to
run on an online cpu so we can easily just get the cpu id in
can_use_console().
We can lose a bit of performance when we enable interrupts in
vprintk_emit() and then disable them again in console_unlock() but OTOH
it can somewhat reduce interrupt latency caused by console_unlock()
especially since later in the patch series we will want to spin on
console_sem in console_trylock_for_printk().
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'crypto/michael_mic.c')
0 files changed, 0 insertions, 0 deletions