Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2

2007-06-10 Thread Greg KH
On Sat, Jun 09, 2007 at 03:49:46PM +0900, Tejun Heo wrote: > Tejun Heo wrote: > > Tejun Heo wrote: > >> Greg KH wrote: > >>> On Mon, May 21, 2007 at 10:31:01AM +0530, Maneesh Soni wrote: > On Thu, May 17, 2007 at 08:16:10PM +0200, Tejun Heo wrote: > > Allowing attribute and symlink dentrie

Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2

2007-06-08 Thread Tejun Heo
Tejun Heo wrote: > Tejun Heo wrote: >> Greg KH wrote: >>> On Mon, May 21, 2007 at 10:31:01AM +0530, Maneesh Soni wrote: On Thu, May 17, 2007 at 08:16:10PM +0200, Tejun Heo wrote: > Allowing attribute and symlink dentries to be reclaimed means > sd->s_dentry can change dynamically. How

Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2

2007-06-08 Thread Tejun Heo
Tejun Heo wrote: > Greg KH wrote: >> On Mon, May 21, 2007 at 10:31:01AM +0530, Maneesh Soni wrote: >>> On Thu, May 17, 2007 at 08:16:10PM +0200, Tejun Heo wrote: Allowing attribute and symlink dentries to be reclaimed means sd->s_dentry can change dynamically. However, updates to the fie

Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2

2007-05-23 Thread Tejun Heo
Greg KH wrote: > On Mon, May 21, 2007 at 10:31:01AM +0530, Maneesh Soni wrote: >> On Thu, May 17, 2007 at 08:16:10PM +0200, Tejun Heo wrote: >>> Allowing attribute and symlink dentries to be reclaimed means >>> sd->s_dentry can change dynamically. However, updates to the field >>> are unsynchroniz

Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2

2007-05-22 Thread Greg KH
On Mon, May 21, 2007 at 10:31:01AM +0530, Maneesh Soni wrote: > On Thu, May 17, 2007 at 08:16:10PM +0200, Tejun Heo wrote: > > Allowing attribute and symlink dentries to be reclaimed means > > sd->s_dentry can change dynamically. However, updates to the field > > are unsynchronized leading to race

Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2

2007-05-21 Thread Tejun Heo
Eric Sandeen wrote: > Maneesh Soni wrote: > >> Looks ok to me.. I have tested it it but unfortunately I couldn't >> recreate the race without the patch also. It would be helpful if >> people actually seeing the race, provide the test results. >> >> Greg, please merge this one once we have some tes

Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2

2007-05-21 Thread Eric Sandeen
Maneesh Soni wrote: > Looks ok to me.. I have tested it it but unfortunately I couldn't > recreate the race without the patch also. It would be helpful if > people actually seeing the race, provide the test results. > > Greg, please merge this one once we have some test results. I merged this ba

Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2

2007-05-20 Thread Maneesh Soni
On Thu, May 17, 2007 at 08:16:10PM +0200, Tejun Heo wrote: > Allowing attribute and symlink dentries to be reclaimed means > sd->s_dentry can change dynamically. However, updates to the field > are unsynchronized leading to race conditions. This patch adds > sysfs_lock and use it to synchronize u

[PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2

2007-05-17 Thread Tejun Heo
Allowing attribute and symlink dentries to be reclaimed means sd->s_dentry can change dynamically. However, updates to the field are unsynchronized leading to race conditions. This patch adds sysfs_lock and use it to synchronize updates to sd->s_dentry. Due to the locking around ->d_iput, the ch