lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 8 May 2007 20:45:54 +0100
From:	Alasdair G Kergon <agk@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	dm-devel@...hat.com, linux-kernel@...r.kernel.org,
	Edward Goggin <egoggin@....com>
Subject: [2.6.22 PATCH 09/26] dm mpath: log device name

From: Edward Goggin <egoggin@....com>

Make the mapped device structure accessible to hardware
handlers so error messages can include the device name.

Signed-off-by: Edward Goggin <egoggin@....com>
Signed-off-by: Alasdair G Kergon <agk@...hat.com>
---

 drivers/md/dm-hw-handler.h |    1 +
 drivers/md/dm-mpath.c      |    3 +++
 drivers/md/dm.c            |    1 +
 3 files changed, 5 insertions(+)

Index: linux-2.6.21/drivers/md/dm-hw-handler.h
===================================================================
--- linux-2.6.21.orig/drivers/md/dm-hw-handler.h	2007-05-01 17:38:32.000000000 +0100
+++ linux-2.6.21/drivers/md/dm-hw-handler.h	2007-05-01 17:40:50.000000000 +0100
@@ -16,6 +16,7 @@
 struct hw_handler_type;
 struct hw_handler {
 	struct hw_handler_type *type;
+	struct mapped_device *md;
 	void *context;
 };
 
Index: linux-2.6.21/drivers/md/dm-mpath.c
===================================================================
--- linux-2.6.21.orig/drivers/md/dm-mpath.c	2007-05-01 17:38:32.000000000 +0100
+++ linux-2.6.21/drivers/md/dm-mpath.c	2007-05-01 17:40:50.000000000 +0100
@@ -668,6 +668,9 @@ static int parse_hw_handler(struct arg_s
 		return -EINVAL;
 	}
 
+	m->hw_handler.md = dm_table_get_md(ti->table);
+	dm_put(m->hw_handler.md);
+
 	r = hwht->create(&m->hw_handler, hw_argc - 1, as->argv);
 	if (r) {
 		dm_put_hw_handler(hwht);
Index: linux-2.6.21/drivers/md/dm.c
===================================================================
--- linux-2.6.21.orig/drivers/md/dm.c	2007-05-01 17:38:32.000000000 +0100
+++ linux-2.6.21/drivers/md/dm.c	2007-05-01 17:40:50.000000000 +0100
@@ -1236,6 +1236,7 @@ void dm_put(struct mapped_device *md)
 		free_dev(md);
 	}
 }
+EXPORT_SYMBOL_GPL(dm_put);
 
 /*
  * Process the deferred bios
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ