All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20171124155816.pxp345ch4gevjqjm@pathway.suse.cz>

diff --git a/a/1.txt b/N1/1.txt
index 962db2e..03996fb 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -97,93 +97,4 @@ On Fri 2017-11-24 16:54:16, Petr Mladek wrote:
 > for it).
 
 See my first attempt below. I do not get any lockdep
-warning but it is possible that I just did it wrong.
-
-
->From 0345785d4767f853ff2d733b565084c3339f9fe0 Mon Sep 17 00:00:00 2001
-From: Petr Mladek <pmladek@suse.com>
-Date: Fri, 24 Nov 2017 16:50:25 +0100
-Subject: [PATCH] printk: Try to describe real console_sem dependecies using
- the crosslock feature
-
-console_sem might be newly taken and released by different
-processes. This is an attempt to check the crossrelease
-dependencies.
----
- kernel/printk/printk.c | 25 +++++++++----------------
- 1 file changed, 9 insertions(+), 16 deletions(-)
-
-diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
-index 040fb948924e..bda25feae0d5 100644
---- a/kernel/printk/printk.c
-+++ b/kernel/printk/printk.c
-@@ -83,9 +83,9 @@ struct console *console_drivers;
- EXPORT_SYMBOL_GPL(console_drivers);
- 
- #ifdef CONFIG_LOCKDEP
--static struct lockdep_map console_lock_dep_map = {
--	.name = "console_lock"
--};
-+static struct lockdep_map_cross console_lock_dep_map =
-+	STATIC_CROSS_LOCKDEP_MAP_INIT("console_lock", &console_sem);
-+
- static struct lockdep_map console_owner_dep_map = {
- 	.name = "console_owner"
- };
-@@ -218,7 +218,7 @@ static int nr_ext_console_drivers;
-  */
- #define down_console_sem() do { \
- 	down(&console_sem);\
--	mutex_acquire(&console_lock_dep_map, 0, 0, _RET_IP_);\
-+	mutex_acquire((struct lockdep_map *)&console_lock_dep_map, 0, 0, _RET_IP_);\
- } while (0)
- 
- static int __down_trylock_console_sem(unsigned long ip)
-@@ -237,7 +237,7 @@ static int __down_trylock_console_sem(unsigned long ip)
- 
- 	if (lock_failed)
- 		return 1;
--	mutex_acquire(&console_lock_dep_map, 0, 1, ip);
-+	mutex_acquire((struct lockdep_map *)&console_lock_dep_map, 0, 1, ip);
- 	return 0;
- }
- #define down_trylock_console_sem() __down_trylock_console_sem(_RET_IP_)
-@@ -246,7 +246,7 @@ static void __up_console_sem(unsigned long ip)
- {
- 	unsigned long flags;
- 
--	mutex_release(&console_lock_dep_map, 1, ip);
-+	mutex_release((struct lockdep_map *)&console_lock_dep_map, 1, ip);
- 
- 	printk_safe_enter_irqsave(flags);
- 	up(&console_sem);
-@@ -1797,13 +1797,6 @@ asmlinkage int vprintk_emit(int facility, int level,
- 				spin_release(&console_owner_dep_map, 1, _THIS_IP_);
- 				printk_safe_exit_irqrestore(flags);
- 
--				/*
--				 * The owner passed the console lock to us.
--				 * Since we did not spin on console lock, annotate
--				 * this as a trylock. Otherwise lockdep will
--				 * complain.
--				 */
--				mutex_acquire(&console_lock_dep_map, 0, 1, _THIS_IP_);
- 				console_unlock();
- 				printk_safe_enter_irqsave(flags);
- 			}
-@@ -2334,10 +2327,10 @@ void console_unlock(void)
- 		/* The waiter is now free to continue */
- 		spin_release(&console_owner_dep_map, 1, _THIS_IP_);
- 		/*
--		 * Hand off console_lock to waiter. The waiter will perform
--		 * the up(). After this, the waiter is the console_lock owner.
-+		 * Hand off console_lock to waiter. After this, the waiter
-+		 * is the console_lock owner.
- 		 */
--		mutex_release(&console_lock_dep_map, 1, _THIS_IP_);
-+		lock_commit_crosslock((struct lockdep_map *)&console_lock_dep_map);
- 		printk_safe_exit_irqrestore(flags);
- 		/* Note, if waiter is set, logbuf_lock is not held */
- 		return;
--- 
-2.13.6
\ No newline at end of file
+warning but it is possible that I just did it wrong.
\ No newline at end of file
diff --git a/a/content_digest b/N1/content_digest
index 48b760c..fade6fb 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -32,7 +32,7 @@
   " Jan Kara <jack\@suse.cz>",
   " Mathieu Desnoyers <mathieu.desnoyers\@efficios.com>",
   " Tetsuo Handa <penguin-kernel\@i-love.sakura.ne.jp>",
-  " rostedt\@rostedt.homelinux.com",
+  " rostedt\@home.goodmis.org",
   " Byungchul Park <byungchul.park\@lge.com>\0"
 ]
 [
@@ -141,96 +141,7 @@
   "> for it).\n",
   "\n",
   "See my first attempt below. I do not get any lockdep\n",
-  "warning but it is possible that I just did it wrong.\n",
-  "\n",
-  "\n",
-  ">From 0345785d4767f853ff2d733b565084c3339f9fe0 Mon Sep 17 00:00:00 2001\n",
-  "From: Petr Mladek <pmladek\@suse.com>\n",
-  "Date: Fri, 24 Nov 2017 16:50:25 +0100\n",
-  "Subject: [PATCH] printk: Try to describe real console_sem dependecies using\n",
-  " the crosslock feature\n",
-  "\n",
-  "console_sem might be newly taken and released by different\n",
-  "processes. This is an attempt to check the crossrelease\n",
-  "dependencies.\n",
-  "---\n",
-  " kernel/printk/printk.c | 25 +++++++++----------------\n",
-  " 1 file changed, 9 insertions(+), 16 deletions(-)\n",
-  "\n",
-  "diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c\n",
-  "index 040fb948924e..bda25feae0d5 100644\n",
-  "--- a/kernel/printk/printk.c\n",
-  "+++ b/kernel/printk/printk.c\n",
-  "\@\@ -83,9 +83,9 \@\@ struct console *console_drivers;\n",
-  " EXPORT_SYMBOL_GPL(console_drivers);\n",
-  " \n",
-  " #ifdef CONFIG_LOCKDEP\n",
-  "-static struct lockdep_map console_lock_dep_map = {\n",
-  "-\t.name = \"console_lock\"\n",
-  "-};\n",
-  "+static struct lockdep_map_cross console_lock_dep_map =\n",
-  "+\tSTATIC_CROSS_LOCKDEP_MAP_INIT(\"console_lock\", &console_sem);\n",
-  "+\n",
-  " static struct lockdep_map console_owner_dep_map = {\n",
-  " \t.name = \"console_owner\"\n",
-  " };\n",
-  "\@\@ -218,7 +218,7 \@\@ static int nr_ext_console_drivers;\n",
-  "  */\n",
-  " #define down_console_sem() do { \\\n",
-  " \tdown(&console_sem);\\\n",
-  "-\tmutex_acquire(&console_lock_dep_map, 0, 0, _RET_IP_);\\\n",
-  "+\tmutex_acquire((struct lockdep_map *)&console_lock_dep_map, 0, 0, _RET_IP_);\\\n",
-  " } while (0)\n",
-  " \n",
-  " static int __down_trylock_console_sem(unsigned long ip)\n",
-  "\@\@ -237,7 +237,7 \@\@ static int __down_trylock_console_sem(unsigned long ip)\n",
-  " \n",
-  " \tif (lock_failed)\n",
-  " \t\treturn 1;\n",
-  "-\tmutex_acquire(&console_lock_dep_map, 0, 1, ip);\n",
-  "+\tmutex_acquire((struct lockdep_map *)&console_lock_dep_map, 0, 1, ip);\n",
-  " \treturn 0;\n",
-  " }\n",
-  " #define down_trylock_console_sem() __down_trylock_console_sem(_RET_IP_)\n",
-  "\@\@ -246,7 +246,7 \@\@ static void __up_console_sem(unsigned long ip)\n",
-  " {\n",
-  " \tunsigned long flags;\n",
-  " \n",
-  "-\tmutex_release(&console_lock_dep_map, 1, ip);\n",
-  "+\tmutex_release((struct lockdep_map *)&console_lock_dep_map, 1, ip);\n",
-  " \n",
-  " \tprintk_safe_enter_irqsave(flags);\n",
-  " \tup(&console_sem);\n",
-  "\@\@ -1797,13 +1797,6 \@\@ asmlinkage int vprintk_emit(int facility, int level,\n",
-  " \t\t\t\tspin_release(&console_owner_dep_map, 1, _THIS_IP_);\n",
-  " \t\t\t\tprintk_safe_exit_irqrestore(flags);\n",
-  " \n",
-  "-\t\t\t\t/*\n",
-  "-\t\t\t\t * The owner passed the console lock to us.\n",
-  "-\t\t\t\t * Since we did not spin on console lock, annotate\n",
-  "-\t\t\t\t * this as a trylock. Otherwise lockdep will\n",
-  "-\t\t\t\t * complain.\n",
-  "-\t\t\t\t */\n",
-  "-\t\t\t\tmutex_acquire(&console_lock_dep_map, 0, 1, _THIS_IP_);\n",
-  " \t\t\t\tconsole_unlock();\n",
-  " \t\t\t\tprintk_safe_enter_irqsave(flags);\n",
-  " \t\t\t}\n",
-  "\@\@ -2334,10 +2327,10 \@\@ void console_unlock(void)\n",
-  " \t\t/* The waiter is now free to continue */\n",
-  " \t\tspin_release(&console_owner_dep_map, 1, _THIS_IP_);\n",
-  " \t\t/*\n",
-  "-\t\t * Hand off console_lock to waiter. The waiter will perform\n",
-  "-\t\t * the up(). After this, the waiter is the console_lock owner.\n",
-  "+\t\t * Hand off console_lock to waiter. After this, the waiter\n",
-  "+\t\t * is the console_lock owner.\n",
-  " \t\t */\n",
-  "-\t\tmutex_release(&console_lock_dep_map, 1, _THIS_IP_);\n",
-  "+\t\tlock_commit_crosslock((struct lockdep_map *)&console_lock_dep_map);\n",
-  " \t\tprintk_safe_exit_irqrestore(flags);\n",
-  " \t\t/* Note, if waiter is set, logbuf_lock is not held */\n",
-  " \t\treturn;\n",
-  "-- \n",
-  "2.13.6"
+  "warning but it is possible that I just did it wrong."
 ]
 
-0cca9d513ff9032aef4df78ffe6a4ae83402563d21b68964c9559215a292fc74
+cb06e7192a74ce88160fe66c4ed6bbda419a44e514ff04e98644beb1cc0db020

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.