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  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:	Thu, 26 Mar 2009 14:24:27 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Alex Chiang <achiang@...com>
CC:	greg@...ah.com, cornelia.huck@...ibm.com,
	stern@...land.harvard.edu, kay.sievers@...y.org,
	rusty@...tcorp.com.au, ebiederm@...ssion.com,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/3] sysfs: care-free suicide for sysfs files

Hello,

Alex Chiang wrote:
> diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
> index 39320a5..993edd1 100644
> --- a/fs/sysfs/dir.c
> +++ b/fs/sysfs/dir.c
> @@ -583,6 +583,8 @@ void sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt)
>  		sd->s_sibling = NULL;
>  
>  		sysfs_drop_dentry(sd);
> +		if (sysfs_type(sd) == SYSFS_KOBJ_ATTR)
> +			sysfs_file_check_suicide(sd);
>  		sysfs_deactivate(sd);
>  		sysfs_put(sd);
>  	}

I think there's a hole here.  sysfs_file_check_suicide() should be
done inside sysfs_deactivate() such that commiting suicide atomically
deactivates the sd.  This will solve the multiple writes to suicide
node problem nicely.

Thanks.

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