[PATCH 2/3] Always check marker consitency

Jan Kiszka <[email protected]>
Newsgroups gmane.linux.kernel.tracing
Message-ID <[email protected]>
Test for consistent marker format strings even if the caller of
_marker_set_probe_range doesn't pass one.

Signed-off-by: Jan Kiszka <[email protected]>

---
 kernel/module.c |   22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

Index: linux-2.6.21.1/kernel/module.c
===================================================================
--- linux-2.6.21.1.orig/kernel/module.c
+++ linux-2.6.21.1/kernel/module.c
@@ -342,15 +342,19 @@ static int _marker_set_probe_range(int f
 		if (strcmp(name, iter->mdata->name) != 0)
 			continue;

-		if (format && strcmp(format, iter->mdata->format) != 0) {
-			printk(KERN_NOTICE
-				"Format mismatch for probe %s "
-				"(%s), marker (%s)\n",
-				name,
-				format,
-				iter->mdata->format);
-			continue;
-		}
+		if (format) {
+			if (strcmp(format, iter->mdata->format) != 0) {
+				printk(KERN_NOTICE
+					"Format mismatch for probe %s "
+					"(%s), marker (%s)\n",
+					name,
+					format,
+					iter->mdata->format);
+				continue;
+			}
+		} else
+			format = iter->mdata->format;
+
 		if (flags & MF_LOCKDEP
 			&& !(iter->mdata->flags & MF_LOCKDEP)) {
 			printk(KERN_NOTICE

_______________________________________________
Ltt-dev mailing list
[email protected]
http://listserv.shafik.org/mailman/listinfo/ltt-dev
signature.asc (application/pgp-signature, 249 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGRO8VniDOoMHTA+kRAvkeAJ44DBBlOD/apfgsIxuhqyPtT+4NLwCfTiIe
Nq7SxOIo5L9icbzr1X8wvjA=
=bPZQ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.