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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 26 Nov 2012 09:35:10 +0100
From:	Andrzej Pietrasiewicz <andrzej.p@...sung.com>
To:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Joel Becker <jlbec@...lplan.org>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Michal Nazarewicz <mina86@...a86.com>
Subject: [RFC][PATCH] fs: configfs: allow other kernel parts to
 programmatically create config groups

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@...sung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@...sung.com>
---
 fs/configfs/dir.c        |    5 +++--
 include/linux/configfs.h |    2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index 7414ae2..42608dc 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -656,7 +656,7 @@ static void detach_groups(struct config_group *group)
  * We could, perhaps, tweak our parent's ->mkdir for a minute and
  * try using vfs_mkdir.  Just a thought.
  */
-static int create_default_group(struct config_group *parent_group,
+int create_group(struct config_group *parent_group,
 				struct config_group *group)
 {
 	int ret;
@@ -690,6 +690,7 @@ static int create_default_group(struct config_group *parent_group,
 
 	return ret;
 }
+EXPORT_SYMBOL(create_group);
 
 static int populate_groups(struct config_group *group)
 {
@@ -701,7 +702,7 @@ static int populate_groups(struct config_group *group)
 		for (i = 0; group->default_groups[i]; i++) {
 			new_group = group->default_groups[i];
 
-			ret = create_default_group(group, new_group);
+			ret = create_group(group, new_group);
 			if (ret) {
 				detach_groups(group);
 				break;
diff --git a/include/linux/configfs.h b/include/linux/configfs.h
index 34025df..8bf295f 100644
--- a/include/linux/configfs.h
+++ b/include/linux/configfs.h
@@ -252,6 +252,8 @@ static inline struct configfs_subsystem *to_configfs_subsystem(struct config_gro
 int configfs_register_subsystem(struct configfs_subsystem *subsys);
 void configfs_unregister_subsystem(struct configfs_subsystem *subsys);
 
+int create_group(struct config_group *parent_group, struct config_group *group);
+
 /* These functions can sleep and can alloc with GFP_KERNEL */
 /* WARNING: These cannot be called underneath configfs callbacks!! */
 int configfs_depend_item(struct configfs_subsystem *subsys, struct config_item *target);
-- 
1.7.0.4

--
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