public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PATCH] driver core patches for 2.6.31-rc4-git
@ 2009-07-28 21:38 Greg KH
  2009-07-28 21:44 ` [PATCH 1/5] sysfs: fix hardlink count on device_move Greg Kroah-Hartman
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Greg KH @ 2009-07-28 21:38 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here are some driver core patches for your tree.

Just some tiny bugfixes and a documentation fix.

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-core-2.6.git/

All of these patches have been in the linux-next and mm trees for a
while.

The patches will be sent as a follow-on to this message to lkml for people
to see.

thanks,

greg k-h

------------

 Documentation/filesystems/sysfs.txt |    3 ++-
 drivers/base/firmware_class.c       |    1 -
 drivers/base/sys.c                  |    2 +-
 fs/sysfs/dir.c                      |    2 ++
 lib/dynamic_debug.c                 |    2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

---------------

Lucian Adrian Grijincu (1):
      driver core: documentation: make it clear that sysfs is optional

Ming Lei (1):
      driver core: firmware_class:fix memory leak of page pointers array

Peter Oberparleiter (1):
      sysfs: fix hardlink count on device_move

Roel Kluin (1):
      Dynamic debug: fix typo: -/->

Xiaotian Feng (1):
      driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/5] sysfs: fix hardlink count on device_move
  2009-07-28 21:38 [GIT PATCH] driver core patches for 2.6.31-rc4-git Greg KH
@ 2009-07-28 21:44 ` Greg Kroah-Hartman
  2009-07-28 21:44 ` [PATCH 2/5] driver core: firmware_class:fix memory leak of page pointers array Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-28 21:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Peter Oberparleiter, stable, Greg Kroah-Hartman

From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>

Update directory hardlink count when moving kobjects to a new parent.
Fixes the following problem which occurs when several devices are
moved to the same parent and then unregistered:

> ls -laF /sys/devices/css0/defunct/
> total 0
> drwxr-xr-x 4294967295 root root    0 2009-07-14 17:02 ./
> drwxr-xr-x        114 root root    0 2009-07-14 17:02 ../
> drwxr-xr-x          2 root root    0 2009-07-14 17:01 power/
> -rw-r--r--          1 root root 4096 2009-07-14 17:01 uevent

Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 fs/sysfs/dir.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index d88d0fa..14f2d71 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -939,8 +939,10 @@ again:
 	/* Remove from old parent's list and insert into new parent's list. */
 	sysfs_unlink_sibling(sd);
 	sysfs_get(new_parent_sd);
+	drop_nlink(old_parent->d_inode);
 	sysfs_put(sd->s_parent);
 	sd->s_parent = new_parent_sd;
+	inc_nlink(new_parent->d_inode);
 	sysfs_link_sibling(sd);
 
  out_unlock:
-- 
1.6.3.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/5] driver core: firmware_class:fix memory leak of page pointers array
  2009-07-28 21:38 [GIT PATCH] driver core patches for 2.6.31-rc4-git Greg KH
  2009-07-28 21:44 ` [PATCH 1/5] sysfs: fix hardlink count on device_move Greg Kroah-Hartman
@ 2009-07-28 21:44 ` Greg Kroah-Hartman
  2009-07-28 21:44 ` [PATCH 3/5] Dynamic debug: fix typo: -/-> Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-28 21:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ming Lei, Greg Kroah-Hartman

From: Ming Lei <tom.leiming@gmail.com>

The page pointers array is allocated in fw_realloc_buffer() called by
firmware_data_write(), and should be freed in release function of firmware
device.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/base/firmware_class.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index f285f44..7376367 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -180,7 +180,6 @@ static ssize_t firmware_loading_store(struct device *dev,
 				goto err;
 			}
 			/* Pages will be freed by vfree() */
-			fw_priv->pages = NULL;
 			fw_priv->page_array_size = 0;
 			fw_priv->nr_pages = 0;
 			complete(&fw_priv->completion);
-- 
1.6.3.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/5] Dynamic debug: fix typo: -/->
  2009-07-28 21:38 [GIT PATCH] driver core patches for 2.6.31-rc4-git Greg KH
  2009-07-28 21:44 ` [PATCH 1/5] sysfs: fix hardlink count on device_move Greg Kroah-Hartman
  2009-07-28 21:44 ` [PATCH 2/5] driver core: firmware_class:fix memory leak of page pointers array Greg Kroah-Hartman
@ 2009-07-28 21:44 ` Greg Kroah-Hartman
  2009-07-28 21:44 ` [PATCH 4/5] driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails Greg Kroah-Hartman
  2009-07-28 21:44 ` [PATCH 5/5] driver core: documentation: make it clear that sysfs is optional Greg Kroah-Hartman
  4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-28 21:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Roel Kluin, Jason Baron, Greg Banks, Andrew Morton,
	Greg Kroah-Hartman

From: Roel Kluin <roel.kluin@gmail.com>

The member was intended, not the local variable.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Greg Banks <gnb@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 lib/dynamic_debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 833139c..e22c148 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -164,7 +164,7 @@ static void ddebug_change(const struct ddebug_query *query,
 
 			if (!newflags)
 				dt->num_enabled--;
-			else if (!dp-flags)
+			else if (!dp->flags)
 				dt->num_enabled++;
 			dp->flags = newflags;
 			if (newflags) {
-- 
1.6.3.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/5] driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails
  2009-07-28 21:38 [GIT PATCH] driver core patches for 2.6.31-rc4-git Greg KH
                   ` (2 preceding siblings ...)
  2009-07-28 21:44 ` [PATCH 3/5] Dynamic debug: fix typo: -/-> Greg Kroah-Hartman
@ 2009-07-28 21:44 ` Greg Kroah-Hartman
  2009-07-28 21:44 ` [PATCH 5/5] driver core: documentation: make it clear that sysfs is optional Greg Kroah-Hartman
  4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-28 21:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Xiaotian Feng, Greg Kroah-Hartman

From: Xiaotian Feng <dfeng@redhat.com>

If kobject_init_and_add fails, sysdev_register should not send KOBJ_ADD
uevent to userspace.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/base/sys.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 79a9ae5..0d90390 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -275,9 +275,9 @@ int sysdev_register(struct sys_device *sysdev)
 				drv->add(sysdev);
 		}
 		mutex_unlock(&sysdev_drivers_lock);
+		kobject_uevent(&sysdev->kobj, KOBJ_ADD);
 	}
 
-	kobject_uevent(&sysdev->kobj, KOBJ_ADD);
 	return error;
 }
 
-- 
1.6.3.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/5] driver core: documentation: make it clear that sysfs is optional
  2009-07-28 21:38 [GIT PATCH] driver core patches for 2.6.31-rc4-git Greg KH
                   ` (3 preceding siblings ...)
  2009-07-28 21:44 ` [PATCH 4/5] driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails Greg Kroah-Hartman
@ 2009-07-28 21:44 ` Greg Kroah-Hartman
  4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-28 21:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Lucian Adrian Grijincu, Randy Dunlap, Greg Kroah-Hartman

From: Lucian Adrian Grijincu <lgrijincu@ixiacom.com>

The original text suggested that sysfs is mandatory and always
compiled in the kernel.

Signed-off-by: Lucian Adrian Grijincu <lgrijincu@ixiacom.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 Documentation/filesystems/sysfs.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index 7e81e37..b245d52 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -23,7 +23,8 @@ interface.
 Using sysfs
 ~~~~~~~~~~~
 
-sysfs is always compiled in. You can access it by doing:
+sysfs is always compiled in if CONFIG_SYSFS is defined. You can access
+it by doing:
 
     mount -t sysfs sysfs /sys 
 
-- 
1.6.3.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-28 21:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-28 21:38 [GIT PATCH] driver core patches for 2.6.31-rc4-git Greg KH
2009-07-28 21:44 ` [PATCH 1/5] sysfs: fix hardlink count on device_move Greg Kroah-Hartman
2009-07-28 21:44 ` [PATCH 2/5] driver core: firmware_class:fix memory leak of page pointers array Greg Kroah-Hartman
2009-07-28 21:44 ` [PATCH 3/5] Dynamic debug: fix typo: -/-> Greg Kroah-Hartman
2009-07-28 21:44 ` [PATCH 4/5] driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails Greg Kroah-Hartman
2009-07-28 21:44 ` [PATCH 5/5] driver core: documentation: make it clear that sysfs is optional Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox