summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2021-09-10 19:15:20 +0200
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2021-09-10 19:15:20 +0200
commitd7925c126d53207bf36429210c1c8ea36b2c2c97 (patch)
treef6fde5019cc854cc728b5da9180f6f3ef81e7b69
parentc2d5e8af069231258282754cf1ad1cb4a2f49954 (diff)
downloadlinux-rt-d7925c126d53207bf36429210c1c8ea36b2c2c97.tar.gz
[ANNOUNCE] v5.14.1-rt21v5.14.2-rt21-patches
Dear RT folks! I'm pleased to announce the v5.14.1-rt21 patch set. Changes since v5.14.1-rt20: - The irq_work_sync() function sleep-waits instead of busy-poll on PREEMPT_RT on work-items which are not invoked in hardirq context. - Clark Williams reported issues in i915. Both have been addressed and I hope for some feedback :) - In v5.14-rt17 lockdep was taught to recognise read-locks. A last minute change made the patch futile. A new version has been added. - A patch to various drivers (acrn, smack, mt8195) to remove unused variables which cause compile warning. Known issues - netconsole triggers WARN. - The "Memory controller" (CONFIG_MEMCG) has been disabled. - A RCU and ARM64 warning has been fixed by Valentin Schneider. It is still not clear if the RCU related change is correct. - Valentin Schneider reported a few splats on ARM64, see https://https://lkml.kernel.org/r/.kernel.org/lkml/20210810134127.1394269-1-valentin.schneider@arm.com/ The delta patch against v5.14.1-rt20 is appended below and can be found here: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.14/incr/patch-5.14.1-rt20-rt21.patch.xz You can get this release via the git tree at: git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v5.14.1-rt21 The RT patch against v5.14.1 can be found here: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.14/older/patch-5.14.1-rt21.patch.xz The split quilt queue is available at: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.14/older/patches-5.14.1-rt21.tar.xz Sebastian Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-rw-r--r--patches/ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch29
-rw-r--r--patches/Add_localversion_for_-RT_release.patch2
-rw-r--r--patches/drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch40
-rw-r--r--patches/drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch87
-rw-r--r--patches/irq_work-Allow-irq_work_sync-to-sleep-if-irq_work-no.patch73
-rw-r--r--patches/irq_work-Also-rcuwait-for-IRQ_WORK_HARD_IRQ-on-PREEM.patch53
-rw-r--r--patches/lockdep-Let-lock_is_held_type-detect-recursive-read-.patch8
-rw-r--r--patches/series7
-rw-r--r--patches/smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch71
-rw-r--r--patches/virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch25
10 files changed, 391 insertions, 4 deletions
diff --git a/patches/ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch b/patches/ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch
new file mode 100644
index 000000000000..6f0584966418
--- /dev/null
+++ b/patches/ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch
@@ -0,0 +1,29 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 9 Sep 2021 10:15:30 +0200
+Subject: [PATCH] ASoC: mediatek: mt8195: Remove unsued irqs_lock.
+
+irqs_lock is not used, never was.
+
+Remove irqs_lock.
+
+Fixes: 283b612429a27 ("ASoC: mediatek: implement mediatek common structure")
+Cc: Liam Girdwood <lgirdwood@gmail.com>
+Cc: Mark Brown <broonie@kernel.org>
+Cc: Jaroslav Kysela <perex@perex.cz>
+Cc: Takashi Iwai <tiwai@suse.com>
+Cc: Matthias Brugger <matthias.bgg@gmail.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ sound/soc/mediatek/common/mtk-afe-fe-dai.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/sound/soc/mediatek/common/mtk-afe-fe-dai.c
++++ b/sound/soc/mediatek/common/mtk-afe-fe-dai.c
+@@ -288,7 +288,6 @@ const struct snd_soc_dai_ops mtk_afe_fe_
+ };
+ EXPORT_SYMBOL_GPL(mtk_afe_fe_ops);
+
+-static DEFINE_MUTEX(irqs_lock);
+ int mtk_dynamic_irq_acquire(struct mtk_base_afe *afe)
+ {
+ int i;
diff --git a/patches/Add_localversion_for_-RT_release.patch b/patches/Add_localversion_for_-RT_release.patch
index 2ffe0da65d7c..9af2dba5eb42 100644
--- a/patches/Add_localversion_for_-RT_release.patch
+++ b/patches/Add_localversion_for_-RT_release.patch
@@ -15,4 +15,4 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- /dev/null
+++ b/localversion-rt
@@ -0,0 +1 @@
-+-rt20
++-rt21
diff --git a/patches/drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch b/patches/drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch
new file mode 100644
index 000000000000..b62926f051ad
--- /dev/null
+++ b/patches/drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch
@@ -0,0 +1,40 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed, 8 Sep 2021 17:18:00 +0200
+Subject: [PATCH] drm/i915/gt: Queue and wait for the irq_work item.
+
+Disabling interrupts and invoking the irq_work function directly breaks
+on PREEMPT_RT.
+PREEMPT_RT does not invoke all irq_work from hardirq context because
+some of the user have spinlock_t locking in the callback function.
+These locks are then turned into a sleeping locks which can not be
+acquired with disabled interrupts.
+
+Using irq_work_queue() has the benefit that the irqwork will be invoked
+in the regular context. In general there is "no" delay between enqueuing
+the callback and its invocation because the interrupt is raised right
+away on architectures which support it (which includes x86).
+
+Use irq_work_queue() + irq_work_sync() instead invoking the callback
+directly.
+
+Reported-by: Clark Williams <williams@redhat.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
++++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
+@@ -318,10 +318,9 @@ void __intel_breadcrumbs_park(struct int
+ /* Kick the work once more to drain the signalers, and disarm the irq */
+ irq_work_sync(&b->irq_work);
+ while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) {
+- local_irq_disable();
+- signal_irq_work(&b->irq_work);
+- local_irq_enable();
++ irq_work_queue(&b->irq_work);
+ cond_resched();
++ irq_work_sync(&b->irq_work);
+ }
+ }
+
diff --git a/patches/drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch b/patches/drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch
new file mode 100644
index 000000000000..6806f927cc00
--- /dev/null
+++ b/patches/drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch
@@ -0,0 +1,87 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed, 8 Sep 2021 19:03:41 +0200
+Subject: [PATCH] drm/i915/gt: Use spin_lock_irq() instead of
+ local_irq_disable() + spin_lock()
+
+execlists_dequeue() is invoked from a function which uses
+local_irq_disable() to disable interrupts so the spin_lock() behaves
+like spin_lock_irq().
+This breaks PREEMPT_RT because local_irq_disable() + spin_lock() is not
+the same as spin_lock_irq().
+
+execlists_dequeue_irq() and execlists_dequeue() has each one caller
+only. If intel_engine_cs::active::lock is acquired and released with the
+_irq suffix then it behaves almost as if execlists_dequeue() would be
+invoked with disabled interrupts. The difference is the last part of the
+function which is then invoked with enabled interrupts.
+I can't tell if this makes a difference. From looking at it, it might
+work to move the last unlock at the end of the function as I didn't find
+anything that would acquire the lock again.
+
+Reported-by: Clark Williams <williams@redhat.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 17 +++++------------
+ 1 file changed, 5 insertions(+), 12 deletions(-)
+
+--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
++++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+@@ -1265,7 +1265,7 @@ static void execlists_dequeue(struct int
+ * and context switches) submission.
+ */
+
+- spin_lock(&engine->active.lock);
++ spin_lock_irq(&engine->active.lock);
+
+ /*
+ * If the queue is higher priority than the last
+@@ -1365,7 +1365,7 @@ static void execlists_dequeue(struct int
+ * Even if ELSP[1] is occupied and not worthy
+ * of timeslices, our queue might be.
+ */
+- spin_unlock(&engine->active.lock);
++ spin_unlock_irq(&engine->active.lock);
+ return;
+ }
+ }
+@@ -1391,7 +1391,7 @@ static void execlists_dequeue(struct int
+
+ if (last && !can_merge_rq(last, rq)) {
+ spin_unlock(&ve->base.active.lock);
+- spin_unlock(&engine->active.lock);
++ spin_unlock_irq(&engine->active.lock);
+ return; /* leave this for another sibling */
+ }
+
+@@ -1552,7 +1552,7 @@ static void execlists_dequeue(struct int
+ * interrupt for secondary ports).
+ */
+ execlists->queue_priority_hint = queue_prio(execlists);
+- spin_unlock(&engine->active.lock);
++ spin_unlock_irq(&engine->active.lock);
+
+ /*
+ * We can skip poking the HW if we ended up with exactly the same set
+@@ -1578,13 +1578,6 @@ static void execlists_dequeue(struct int
+ }
+ }
+
+-static void execlists_dequeue_irq(struct intel_engine_cs *engine)
+-{
+- local_irq_disable(); /* Suspend interrupts across request submission */
+- execlists_dequeue(engine);
+- local_irq_enable(); /* flush irq_work (e.g. breadcrumb enabling) */
+-}
+-
+ static void clear_ports(struct i915_request **ports, int count)
+ {
+ memset_p((void **)ports, NULL, count);
+@@ -2377,7 +2370,7 @@ static void execlists_submission_tasklet
+ }
+
+ if (!engine->execlists.pending[0]) {
+- execlists_dequeue_irq(engine);
++ execlists_dequeue(engine);
+ start_timeslice(engine);
+ }
+
diff --git a/patches/irq_work-Allow-irq_work_sync-to-sleep-if-irq_work-no.patch b/patches/irq_work-Allow-irq_work_sync-to-sleep-if-irq_work-no.patch
new file mode 100644
index 000000000000..b623f1a680c4
--- /dev/null
+++ b/patches/irq_work-Allow-irq_work_sync-to-sleep-if-irq_work-no.patch
@@ -0,0 +1,73 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed, 8 Sep 2021 13:23:20 +0200
+Subject: [PATCH] irq_work: Allow irq_work_sync() to sleep if irq_work() no
+ IRQ support.
+
+irq_work() triggers instantly an interrupt if supported by the
+architecture. Otherwise the work will be processed on the next timer
+tick. In worst case irq_work_sync() could spin up to a jiffy.
+
+irq_work_sync() is usually used in tear down context which is fully
+preemptible. Based on review irq_work_sync() is invoked from preemptible
+context and there is one waiter at a time. This qualifies it to use
+rcuwait for synchronisation.
+
+Let irq_work_sync() synchornize with rcuwait if the architecture
+processes irqwork via the timer tick.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ include/linux/irq_work.h | 3 +++
+ kernel/irq_work.c | 10 ++++++++++
+ 2 files changed, 13 insertions(+)
+
+--- a/include/linux/irq_work.h
++++ b/include/linux/irq_work.h
+@@ -3,6 +3,7 @@
+ #define _LINUX_IRQ_WORK_H
+
+ #include <linux/smp_types.h>
++#include <linux/rcuwait.h>
+
+ /*
+ * An entry can be in one of four states:
+@@ -16,11 +17,13 @@
+ struct irq_work {
+ struct __call_single_node node;
+ void (*func)(struct irq_work *);
++ struct rcuwait irqwait;
+ };
+
+ #define __IRQ_WORK_INIT(_func, _flags) (struct irq_work){ \
+ .node = { .u_flags = (_flags), }, \
+ .func = (_func), \
++ .irqwait = __RCUWAIT_INITIALIZER(irqwait), \
+ }
+
+ #define IRQ_WORK_INIT(_func) __IRQ_WORK_INIT(_func, 0)
+--- a/kernel/irq_work.c
++++ b/kernel/irq_work.c
+@@ -181,6 +181,9 @@ void irq_work_single(void *arg)
+ * else claimed it meanwhile.
+ */
+ (void)atomic_cmpxchg(&work->node.a_flags, flags, flags & ~IRQ_WORK_BUSY);
++
++ if (!arch_irq_work_has_interrupt())
++ rcuwait_wake_up(&work->irqwait);
+ }
+
+ static void irq_work_run_list(struct llist_head *list)
+@@ -247,6 +250,13 @@ void irq_work_tick_soft(void)
+ void irq_work_sync(struct irq_work *work)
+ {
+ lockdep_assert_irqs_enabled();
++ might_sleep();
++
++ if (!arch_irq_work_has_interrupt()) {
++ rcuwait_wait_event(&work->irqwait, !irq_work_is_busy(work),
++ TASK_UNINTERRUPTIBLE);
++ return;
++ }
+
+ while (irq_work_is_busy(work))
+ cpu_relax();
diff --git a/patches/irq_work-Also-rcuwait-for-IRQ_WORK_HARD_IRQ-on-PREEM.patch b/patches/irq_work-Also-rcuwait-for-IRQ_WORK_HARD_IRQ-on-PREEM.patch
new file mode 100644
index 000000000000..f9250152914a
--- /dev/null
+++ b/patches/irq_work-Also-rcuwait-for-IRQ_WORK_HARD_IRQ-on-PREEM.patch
@@ -0,0 +1,53 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed, 8 Sep 2021 13:26:36 +0200
+Subject: [PATCH] irq_work: Also rcuwait for !IRQ_WORK_HARD_IRQ on
+ PREEMPT_RT
+
+On PREEMPT_RT most items are processed as LAZY via softirq context.
+Avoid to spin-wait for them because irq_work_sync() could have higher
+priority and not allow the irq-work to be completed.
+
+Wait additionally for !IRQ_WORK_HARD_IRQ irq_work items on PREEMPT_RT.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ include/linux/irq_work.h | 5 +++++
+ kernel/irq_work.c | 6 ++++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+--- a/include/linux/irq_work.h
++++ b/include/linux/irq_work.h
+@@ -49,6 +49,11 @@ static inline bool irq_work_is_busy(stru
+ return atomic_read(&work->node.a_flags) & IRQ_WORK_BUSY;
+ }
+
++static inline bool irq_work_is_hard(struct irq_work *work)
++{
++ return atomic_read(&work->node.a_flags) & IRQ_WORK_HARD_IRQ;
++}
++
+ bool irq_work_queue(struct irq_work *work);
+ bool irq_work_queue_on(struct irq_work *work, int cpu);
+
+--- a/kernel/irq_work.c
++++ b/kernel/irq_work.c
+@@ -182,7 +182,8 @@ void irq_work_single(void *arg)
+ */
+ (void)atomic_cmpxchg(&work->node.a_flags, flags, flags & ~IRQ_WORK_BUSY);
+
+- if (!arch_irq_work_has_interrupt())
++ if ((IS_ENABLED(CONFIG_PREEMPT_RT) && !irq_work_is_hard(work)) ||
++ !arch_irq_work_has_interrupt())
+ rcuwait_wake_up(&work->irqwait);
+ }
+
+@@ -252,7 +253,8 @@ void irq_work_sync(struct irq_work *work
+ lockdep_assert_irqs_enabled();
+ might_sleep();
+
+- if (!arch_irq_work_has_interrupt()) {
++ if ((IS_ENABLED(CONFIG_PREEMPT_RT) && !irq_work_is_hard(work)) ||
++ !arch_irq_work_has_interrupt()) {
+ rcuwait_wait_event(&work->irqwait, !irq_work_is_busy(work),
+ TASK_UNINTERRUPTIBLE);
+ return;
diff --git a/patches/lockdep-Let-lock_is_held_type-detect-recursive-read-.patch b/patches/lockdep-Let-lock_is_held_type-detect-recursive-read-.patch
index ddafab198d62..4be135d95018 100644
--- a/patches/lockdep-Let-lock_is_held_type-detect-recursive-read-.patch
+++ b/patches/lockdep-Let-lock_is_held_type-detect-recursive-read-.patch
@@ -1,5 +1,5 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Wed, 1 Sep 2021 17:57:18 +0200
+Date: Fri, 3 Sep 2021 10:40:01 +0200
Subject: [PATCH] lockdep: Let lock_is_held_type() detect recursive read as
read
@@ -12,8 +12,10 @@ Rework the check to additionally recognise lock's read value one and two
as a read held lock.
Fixes: e918188611f07 ("locking: More accurate annotations for read_lock()")
-Link: https://lkml.kernel.org/r/20210903084001.lblecrvz4esl4mrr@linutronix.de
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Waiman Long <longman@redhat.com>
+Acked-by: Boqun Feng <boqun.feng@gmail.com>
+Link: https://lkml.kernel.org/r/20210910135312.4axzdxt74rgct2ur@linutronix.de
---
kernel/locking/lockdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -25,7 +27,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (match_held_lock(hlock, lock)) {
- if (read == -1 || hlock->read == read)
-+ if (read == -1 || hlock->read == !!read)
++ if (read == -1 || !!hlock->read == read)
return LOCK_STATE_HELD;
return LOCK_STATE_NOT_HELD;
diff --git a/patches/series b/patches/series
index 11ea9abed892..68f12f9b82a4 100644
--- a/patches/series
+++ b/patches/series
@@ -81,6 +81,9 @@ sched-Switch-wait_task_inactive-to-HRTIMER_MODE_REL_.patch
sched-Prevent-balance_push-on-remote-runqueues.patch
lockdep-Let-lock_is_held_type-detect-recursive-read-.patch
sched-Make-the-idle-timer-expire-always-in-hardirq-c.patch
+ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch
+smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch
+virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch
#KCOV
0001_documentation_kcov_include_types_h_in_the_example.patch
@@ -267,6 +270,8 @@ softirq__Disable_softirq_stacks_for_RT.patch
# irqwork: Needs upstream consolidation
###########################################################################
irqwork__push_most_work_into_softirq_context.patch
+irq_work-Allow-irq_work_sync-to-sleep-if-irq_work-no.patch
+irq_work-Also-rcuwait-for-IRQ_WORK_HARD_IRQ-on-PREEM.patch
###########################################################################
# mm: Assorted RT bits. Need care
@@ -351,6 +356,8 @@ drm_i915__Dont_disable_interrupts_on_PREEMPT_RT_during_atomic_updates.patch
drm_i915__disable_tracing_on_-RT.patch
drm_i915__skip_DRM_I915_LOW_LEVEL_TRACEPOINTS_with_NOTRACE.patch
drm_i915_gt__Only_disable_interrupts_for_the_timeline_lock_on_force-threaded.patch
+drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch
+drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch
###########################################################################
# tty/serial: ARM drivers
diff --git a/patches/smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch b/patches/smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch
new file mode 100644
index 000000000000..a6636d1f2f7b
--- /dev/null
+++ b/patches/smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch
@@ -0,0 +1,71 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 9 Sep 2021 12:18:29 +0200
+Subject: [PATCH] smack: Guard smack_ipv6_lock definition within a
+ SMACK_IPV6_PORT_LABELING block
+
+The mutex smack_ipv6_lock is only used with the SMACK_IPV6_PORT_LABELING
+block but its definition is outside of the block. This leads to a
+defined-but-not-used warning on PREEMPT_RT.
+
+Moving smack_ipv6_lock down to the block where it is used where it used
+raises the question why is smk_ipv6_port_list read if nothing is added
+to it.
+Turns out, only smk_ipv6_port_check() is using it outside of an ifdef
+SMACK_IPV6_PORT_LABELING block. However two of three caller invoke
+smk_ipv6_port_check() from a ifdef block and only one is using
+__is_defined() macro which requires the function and smk_ipv6_port_list
+to be around.
+
+Put the lock and list inside an ifdef SMACK_IPV6_PORT_LABELING block to
+avoid the warning regarding unused mutex. Extend the ifdef-block to also
+cover smk_ipv6_port_check(). Make smack_socket_connect() use ifdef
+instead of __is_defined() to avoid complains about missing function.
+
+Cc: Casey Schaufler <casey@schaufler-ca.com>
+Cc: James Morris <jmorris@namei.org>
+Cc: "Serge E. Hallyn" <serge@hallyn.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ security/smack/smack_lsm.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/security/smack/smack_lsm.c
++++ b/security/smack/smack_lsm.c
+@@ -51,8 +51,10 @@
+ #define SMK_RECEIVING 1
+ #define SMK_SENDING 2
+
++#ifdef SMACK_IPV6_PORT_LABELING
+ static DEFINE_MUTEX(smack_ipv6_lock);
+ static LIST_HEAD(smk_ipv6_port_list);
++#endif
+ struct kmem_cache *smack_rule_cache;
+ int smack_enabled;
+
+@@ -2603,7 +2605,6 @@ static void smk_ipv6_port_label(struct s
+ mutex_unlock(&smack_ipv6_lock);
+ return;
+ }
+-#endif
+
+ /**
+ * smk_ipv6_port_check - check Smack port access
+@@ -2666,6 +2667,7 @@ static int smk_ipv6_port_check(struct so
+
+ return smk_ipv6_check(skp, object, address, act);
+ }
++#endif
+
+ /**
+ * smack_inode_setsecurity - set smack xattrs
+@@ -2852,8 +2854,9 @@ static int smack_socket_connect(struct s
+ rc = smk_ipv6_check(ssp->smk_out, rsp, sip,
+ SMK_CONNECTING);
+ }
+- if (__is_defined(SMACK_IPV6_PORT_LABELING))
++#ifdef SMACK_IPV6_PORT_LABELING
+ rc = smk_ipv6_port_check(sock->sk, sip, SMK_CONNECTING);
++#endif
+
+ return rc;
+ }
diff --git a/patches/virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch b/patches/virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch
new file mode 100644
index 000000000000..12805701bc21
--- /dev/null
+++ b/patches/virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch
@@ -0,0 +1,25 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 9 Sep 2021 10:15:30 +0200
+Subject: [PATCH] virt: acrn: Remove unsued acrn_irqfds_mutex.
+
+acrn_irqfds_mutex is not used, never was.
+
+Remove acrn_irqfds_mutex.
+
+Fixes: aa3b483ff1d71 ("virt: acrn: Introduce irqfd")
+Cc: Fei Li <fei1.li@intel.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ drivers/virt/acrn/irqfd.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/virt/acrn/irqfd.c
++++ b/drivers/virt/acrn/irqfd.c
+@@ -17,7 +17,6 @@
+ #include "acrn_drv.h"
+
+ static LIST_HEAD(acrn_irqfd_clients);
+-static DEFINE_MUTEX(acrn_irqfds_mutex);
+
+ /**
+ * struct hsm_irqfd - Properties of HSM irqfd