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]
Message-ID: <20070411122652.74d3ecd1@gondolin.boeblingen.de.ibm.com>
Date:	Wed, 11 Apr 2007 12:26:52 +0200
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Tejun Heo <htejun@...il.com>
Cc:	gregkh@...e.de, maneesh@...ibm.com, dmitry.torokhov@...il.com,
	oneukum@...e.de, rpurdie@...ys.net, James.Bottomley@...elEye.com,
	stern@...land.harvard.edu, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH 12/14 UPDATED] sysfs: implement sysfs_dirent active
 reference and immediate disconnect

On Wed, 11 Apr 2007 19:13:59 +0900,
Tejun Heo <htejun@...il.com> wrote:

> Does this patch fix the problem?
> 
> Index: work/fs/sysfs/dir.c
> ===================================================================
> --- work.orig/fs/sysfs/dir.c	2007-04-11 19:12:02.000000000 +0900
> +++ work/fs/sysfs/dir.c	2007-04-11 19:12:12.000000000 +0900
> @@ -26,7 +26,8 @@ void release_sysfs_dirent(struct sysfs_d
>  	 * locked.  If @sd is cursor for directory walk or being
>  	 * released prematurely, s_active has no reader or writer.
>  	 */
> -	down_write_trylock(&sd->s_active);
> +	if (!down_write_trylock(&sd->s_active))
> +		rwsem_acquire(&sd->s_active.dep_map, 0, 0, _RET_IP_);
>  	up_write(&sd->s_active);
> 
>  	if (sd->s_type & SYSFS_KOBJ_LINK)
> Index: work/fs/sysfs/sysfs.h
> ===================================================================
> --- work.orig/fs/sysfs/sysfs.h	2007-04-11 19:12:02.000000000 +0900
> +++ work/fs/sysfs/sysfs.h	2007-04-11 19:12:03.000000000 +0900
> @@ -171,6 +171,7 @@ static inline void sysfs_put_active_two(
>  static inline void sysfs_deactivate(struct sysfs_dirent *sd)
>  {
>  	down_write(&sd->s_active);
> +	rwsem_release(&sd->s_active.dep_map, 1, _RET_IP_);
>  }
> 
>  static inline int sysfs_is_shadowed_inode(struct inode *inode)

This seems to work fine now, thanks.
-
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