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]
Message-ID: <20071213144326.GW24157@agk.fab.redhat.com>
Date:	Thu, 13 Dec 2007 14:43:26 +0000
From:	Alasdair G Kergon <agk@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	dm-devel@...hat.com, linux-kernel@...r.kernel.org,
	Scott James Remnant <scott@...ntu.com>
Subject: [2.6.24 PATCH 04/06] dm: trigger change uevent on rename

From: Alasdair G Kergon <agk@...hat.com>

Insert a missing KOBJ_CHANGE notification when a device is renamed.

Cc: Scott James Remnant <scott@...ntu.com> 
Signed-off-by: Alasdair G Kergon <agk@...hat.com>
---
 drivers/md/dm-ioctl.c |    2 ++
 drivers/md/dm.c       |    7 ++++++-
 drivers/md/dm.h       |    2 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

Index: linux-2.6.24-rc5/drivers/md/dm-ioctl.c
===================================================================
--- linux-2.6.24-rc5.orig/drivers/md/dm-ioctl.c	2007-12-12 15:43:06.000000000 +0000
+++ linux-2.6.24-rc5/drivers/md/dm-ioctl.c	2007-12-12 15:43:13.000000000 +0000
@@ -332,6 +332,8 @@ static int dm_hash_rename(const char *ol
 		dm_table_put(table);
 	}
 
+	dm_kobject_uevent(hc->md);
+
 	dm_put(hc->md);
 	up_write(&_hash_lock);
 	kfree(old_name);
Index: linux-2.6.24-rc5/drivers/md/dm.c
===================================================================
--- linux-2.6.24-rc5.orig/drivers/md/dm.c	2007-12-12 15:43:06.000000000 +0000
+++ linux-2.6.24-rc5/drivers/md/dm.c	2007-12-12 15:43:13.000000000 +0000
@@ -1514,7 +1514,7 @@ int dm_resume(struct mapped_device *md)
 
 	dm_table_unplug_all(map);
 
-	kobject_uevent(&md->disk->kobj, KOBJ_CHANGE);
+	dm_kobject_uevent(md);
 
 	r = 0;
 
@@ -1528,6 +1528,11 @@ out:
 /*-----------------------------------------------------------------
  * Event notification.
  *---------------------------------------------------------------*/
+void dm_kobject_uevent(struct mapped_device *md)
+{
+	kobject_uevent(&md->disk->kobj, KOBJ_CHANGE);
+}
+
 uint32_t dm_next_uevent_seq(struct mapped_device *md)
 {
 	return atomic_add_return(1, &md->uevent_seq);
Index: linux-2.6.24-rc5/drivers/md/dm.h
===================================================================
--- linux-2.6.24-rc5.orig/drivers/md/dm.h	2007-12-12 15:43:06.000000000 +0000
+++ linux-2.6.24-rc5/drivers/md/dm.h	2007-12-12 15:43:13.000000000 +0000
@@ -187,4 +187,6 @@ union map_info *dm_get_mapinfo(struct bi
 int dm_open_count(struct mapped_device *md);
 int dm_lock_for_deletion(struct mapped_device *md);
 
+void dm_kobject_uevent(struct mapped_device *md);
+
 #endif
--
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