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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Sep 2007 15:54:48 +0200
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Tejun Heo <htejun@...il.com>
Cc:	ebiederm@...ssion.com, greg@...ah.com, stern@...land.harvard.edu,
	kay.sievers@...y.org, linux-kernel@...r.kernel.org,
	rusty@...tcorp.com.au
Subject: Re: [PATCH 4/4] sysfs: make suicidal nodes just do it directly

On Thu, 20 Sep 2007 16:26:15 +0900,
Tejun Heo <htejun@...il.com> wrote:

> Sysfs now allows direct suicide.  Make suicidial sysfs nodes to use
> it and remove now unncessary callback mechanism.
> 
> Signed-off-by: Tejun Heo <htejun@...il.com>
> ---
>  drivers/base/core.c         |   33 ----------------------
>  drivers/s390/cio/ccwgroup.c |   25 +++-------------
>  drivers/scsi/scsi_sysfs.c   |   13 +--------
>  fs/sysfs/file.c             |   63 -------------------------------------------
>  include/linux/device.h      |    6 ----
>  include/linux/sysfs.h       |    9 ------
>  6 files changed, 6 insertions(+), 143 deletions(-)

ccwgroup was implicitly relying on a held reference, fix that.

Signed-off-by: Cornelia Huck <cornelia.huck@...ibm.com>

---
 drivers/s390/cio/ccwgroup.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.orig/drivers/s390/cio/ccwgroup.c
+++ linux-2.6/drivers/s390/cio/ccwgroup.c
@@ -72,7 +72,7 @@ ccwgroup_ungroup_store(struct device *de
 	struct ccwgroup_device *gdev;
 	int rc;
 
-	gdev = to_ccwgroupdev(dev);
+	gdev = to_ccwgroupdev(get_device(dev));
 
 	if (gdev->state != CCWGROUP_OFFLINE)
 		return -EINVAL;
@@ -81,6 +81,7 @@ ccwgroup_ungroup_store(struct device *de
 	__ccwgroup_remove_symlinks(gdev);
 	device_unregister(dev);
 	mutex_unlock(&gdev->reg_mutex);
+	put_device(dev);
 
 	return count;
 }
-
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