diff options
Diffstat (limited to 'debian/patches-rt/softirq-preempt-fix-3-re.patch')
-rw-r--r-- | debian/patches-rt/softirq-preempt-fix-3-re.patch | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/debian/patches-rt/softirq-preempt-fix-3-re.patch b/debian/patches-rt/softirq-preempt-fix-3-re.patch index ee179c74b..3ef7588e8 100644 --- a/debian/patches-rt/softirq-preempt-fix-3-re.patch +++ b/debian/patches-rt/softirq-preempt-fix-3-re.patch @@ -1,7 +1,7 @@ Subject: softirq: Check preemption after reenabling interrupts From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 13 Nov 2011 17:17:09 +0100 (CET) -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, @@ -15,23 +15,15 @@ Reported-by: Carsten Emde <cbe@osadl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- - block/blk-softirq.c | 3 +++ + block/blk-softirq.c | 2 ++ include/linux/preempt.h | 3 +++ lib/irq_poll.c | 5 +++++ net/core/dev.c | 7 +++++++ - 4 files changed, 18 insertions(+) + 4 files changed, 17 insertions(+) --- a/block/blk-softirq.c +++ b/block/blk-softirq.c -@@ -53,6 +53,7 @@ static void trigger_softirq(void *data) - raise_softirq_irqoff(BLOCK_SOFTIRQ); - - local_irq_restore(flags); -+ preempt_check_resched_rt(); - } - - /* -@@ -91,6 +92,7 @@ static int blk_softirq_cpu_dead(unsigned +@@ -87,6 +87,7 @@ static int blk_softirq_cpu_dead(unsigned this_cpu_ptr(&blk_cpu_done)); raise_softirq_irqoff(BLOCK_SOFTIRQ); local_irq_enable(); @@ -39,7 +31,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return 0; } -@@ -142,6 +144,7 @@ void __blk_complete_request(struct reque +@@ -138,6 +139,7 @@ void __blk_complete_request(struct reque goto do_local; local_irq_restore(flags); @@ -49,9 +41,9 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static __init int blk_softirq_init(void) --- a/include/linux/preempt.h +++ b/include/linux/preempt.h -@@ -193,8 +193,10 @@ do { \ +@@ -189,8 +189,10 @@ do { \ - #ifdef CONFIG_PREEMPT_RT_BASE + #ifdef CONFIG_PREEMPT_RT # define preempt_enable_no_resched() sched_preempt_enable_no_resched() +# define preempt_check_resched_rt() preempt_check_resched() #else @@ -60,14 +52,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif #define preemptible() (preempt_count() == 0 && !irqs_disabled()) -@@ -281,6 +283,7 @@ do { \ +@@ -261,6 +263,7 @@ do { \ #define preempt_disable_notrace() barrier() #define preempt_enable_no_resched_notrace() barrier() #define preempt_enable_notrace() barrier() +#define preempt_check_resched_rt() barrier() #define preemptible() 0 - #define migrate_disable() barrier() + #endif /* CONFIG_PREEMPT_COUNT */ --- a/lib/irq_poll.c +++ b/lib/irq_poll.c @@ -37,6 +37,7 @@ void irq_poll_sched(struct irq_poll *iop @@ -112,7 +104,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2750,6 +2750,7 @@ static void __netif_reschedule(struct Qd +@@ -2675,6 +2675,7 @@ static void __netif_reschedule(struct Qd sd->output_queue_tailp = &q->next_sched; raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_restore(flags); @@ -120,7 +112,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } void __netif_schedule(struct Qdisc *q) -@@ -2812,6 +2813,7 @@ void __dev_kfree_skb_irq(struct sk_buff +@@ -2737,6 +2738,7 @@ void __dev_kfree_skb_irq(struct sk_buff __this_cpu_write(softnet_data.completion_queue, skb); raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_restore(flags); @@ -128,7 +120,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } EXPORT_SYMBOL(__dev_kfree_skb_irq); -@@ -4298,6 +4300,7 @@ static int enqueue_to_backlog(struct sk_ +@@ -4217,6 +4219,7 @@ static int enqueue_to_backlog(struct sk_ rps_unlock(sd); local_irq_restore(flags); @@ -136,7 +128,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> atomic_long_inc(&skb->dev->rx_dropped); kfree_skb(skb); -@@ -5903,12 +5906,14 @@ static void net_rps_action_and_irq_enabl +@@ -5840,12 +5843,14 @@ static void net_rps_action_and_irq_enabl sd->rps_ipi_list = NULL; local_irq_enable(); @@ -151,7 +143,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static bool sd_has_rps_ipi_waiting(struct softnet_data *sd) -@@ -5986,6 +5991,7 @@ void __napi_schedule(struct napi_struct +@@ -5923,6 +5928,7 @@ void __napi_schedule(struct napi_struct local_irq_save(flags); ____napi_schedule(this_cpu_ptr(&softnet_data), n); local_irq_restore(flags); @@ -159,7 +151,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } EXPORT_SYMBOL(__napi_schedule); -@@ -9517,6 +9523,7 @@ static int dev_cpu_dead(unsigned int old +@@ -9873,6 +9879,7 @@ static int dev_cpu_dead(unsigned int old raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); |