[bootlin/training-materials updates] master: kernel-locking: Enable CONFIG_DEBUG_ATOMIC_SLEEP (7ee8d2fd)
Miquel Raynal
miquel.raynal at bootlin.com
Tue Oct 18 11:43:12 CEST 2022
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/7ee8d2fd1a027a3c8901a8f8bf35b20936f97549
>---------------------------------------------------------------
commit 7ee8d2fd1a027a3c8901a8f8bf35b20936f97549
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date: Tue Oct 18 11:01:45 2022 +0200
kernel-locking: Enable CONFIG_DEBUG_ATOMIC_SLEEP
This will warn the trainees if they use a function that _may_ sleep (but
does not) in atomic context.
Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
>---------------------------------------------------------------
7ee8d2fd1a027a3c8901a8f8bf35b20936f97549
labs/kernel-locking/kernel-locking.tex | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/labs/kernel-locking/kernel-locking.tex b/labs/kernel-locking/kernel-locking.tex
index d5e817f5..97d16ad9 100644
--- a/labs/kernel-locking/kernel-locking.tex
+++ b/labs/kernel-locking/kernel-locking.tex
@@ -13,6 +13,15 @@ Continue to work with the \code{serial} driver.
You need to have completed the previous two labs to perform this one.
+On the kernel side, recompile it with the following option:
+
+\begin{itemize}
+\item \kconfig{CONFIG_DEBUG_ATOMIC_SLEEP}: this will allow you to be
+ (loudly) warned if a function which may sleep is called from atomic
+ context, while sleeping is not allowed. Otherwise, in practice, if the
+ function that may sleep does not need to, you might not notice it!
+\end{itemize}
+
\section{Adding appropriate locking}
We have two shared resources in our driver:
More information about the training-materials-updates
mailing list