Thread (3 messages) 3 messages, 2 authors, 2022-08-31

Re: [PATCH modules-next] module: Add debugfs interface to view unloaded tainted modules

From: Petr Pavlu <petr.pavlu@suse.com>
Date: 2022-08-29 07:14:41
Also in: lkml

On 8/23/22 21:32, Aaron Tomlin wrote:
quoted hunk ↗ jump to hunk
[...]
@@ -59,3 +60,68 @@ void print_unloaded_tainted_modules(void)
 		}
 	}
 }
+
+#ifdef CONFIG_DEBUG_FS
+static void *unloaded_tainted_modules_seq_start(struct seq_file *m, loff_t *pos)
+{
+	mutex_lock(&module_mutex);
+	return seq_list_start_rcu(&unloaded_tainted_modules, *pos);
+}
unloaded_tainted_modules looks to be a proper RCU list which makes me think
this reader could use just rcu_read_lock() instead of
mutex_lock(&module_mutex)?

Thanks,
Petr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help