From be84d813a5dd43048bb54321d8ada6e6c881f15e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 11 Jul 2014 16:55:20 +0000 Subject: [PATCH] [rt] random: Restore interrupt randomness dropped in 3.14.10-rt6 svn path=/dists/sid/linux/; revision=21527 --- debian/changelog | 2 +- .../all/rt/random-make-it-work-on-rt.patch | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d29dd8d07..601fea60d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -79,10 +79,10 @@ linux (3.14.12-1) UNRELEASED; urgency=medium [ Ben Hutchings ] * [rt] Update to 3.14.10-rt7: - - random: Do not add randomness from threaded interrupts - rtmutex: Resolve conflicts with changes in 3.14.10 - sched: Do not clear PF_NO_SETAFFINITY flag in select_fallback_rq() - workqueue: Prevent deadlock/stall on RT + * [rt] random: Restore interrupt randomness dropped in 3.14.10-rt6 * [s390,s390x] Ignore ABI change in lowcore structure (fixes FTBFS) * [m68k] block: Change IOSCHED_CFQ to built-in and make it the default I/O scheduler, consistent with other architectures diff --git a/debian/patches/features/all/rt/random-make-it-work-on-rt.patch b/debian/patches/features/all/rt/random-make-it-work-on-rt.patch index b839e8717..950dfc7ae 100644 --- a/debian/patches/features/all/rt/random-make-it-work-on-rt.patch +++ b/debian/patches/features/all/rt/random-make-it-work-on-rt.patch @@ -10,7 +10,9 @@ entropy. Signed-off-by: Thomas Gleixner Cc: stable-rt@vger.kernel.org -[bwh: Adjust context to apply on top of Debian ABI-maintaining patches] +[bwh: + - Adjust context to apply on top of Debian ABI-maintaining patches + - Restore interrupt randomness dropped in 3.14.10-rt6] --- drivers/char/random.c | 11 +++++++---- include/linux/irqdesc.h | 1 + @@ -102,3 +104,18 @@ Cc: stable-rt@vger.kernel.org if (!noirqdebug) note_interrupt(irq, desc, retval); +--- a/kernel/irq/manage.c ++++ b/kernel/irq/manage.c +@@ -942,6 +942,12 @@ static int irq_thread(void *data) + if (action_ret == IRQ_HANDLED) + atomic_inc(&desc->threads_handled); + ++#ifdef CONFIG_PREEMPT_RT_FULL ++ migrate_disable(); ++ add_interrupt_randomness(action->irq, 0, ++ desc->random_ip ^ (unsigned long) action); ++ migrate_enable(); ++#endif + wake_threads_waitq(desc); + } +