login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
June
»
10
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Greg KH <greg@...>
To: Tejun Heo <htejun@...>
Cc: Maneesh Soni <maneesh@...>, Andrew Morton <akpm@...>, Clemens Schwaighofer <cs@...>, linux-kernel <linux-kernel@...>, Dipankar Sarma <dipankar@...>, Chuck Ebbert <cebbert@...>
Subject:
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2
Date: Sunday, June 10, 2007 - 12:18 pm
On Sat, Jun 09, 2007 at 03:49:46PM +0900, Tejun Heo wrote:
quoted text
> 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. 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 check in sysfs_drop_dentry()
> >>>>> is complex. sysfs_lock only protect sd->s_dentry pointer itself. The
> >>>>> validity of the dentry is protected by dcache_lock, so whether dentry
> >>>>> is alive or not can only be tested while holding both locks.
> >>>>>
> >>>>> This is minimal backport of sysfs_drop_dentry() rewrite in devel
> >>>>> branch.
> >>>>>
> >>>>> DONT APPLY JUST YET
> >>>> 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.
> >>> Can someone just resend it after those test results are in, with the
> >>> proper signed-off-by, so I know it's safe to apply?
> >> I'll resend with S-O-B after someone verifies it fixes the problem.
> >
> > Have been trying to reproduce the problem on the latest -rc but haven't
> > succeeded yet. It seems I lost my magic recipe for these races. Did
> > anyone succeed?
>
> Alright, overnight test finally hit the race condition. It takes me
> much longer now but the race condition is definitely still there. I'll
> verify each proposed patch and send it for 2.6.22 inclusion and if
> they're accepted to -stable.
Ok, thanks for doing this.
greg k-h
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Clemens Schwaighofer
, (Tue May 15, 8:24 pm)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Clemens Schwaighofer
, (Thu Jun 28, 10:51 pm)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Satyam Sharma
, (Fri Jun 29, 2:12 am)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Clemens Schwaighofer
, (Fri Jun 29, 2:18 am)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Andrew Morton
, (Tue May 15, 9:53 pm)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Tejun Heo
, (Wed May 16, 7:05 am)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Andrew Morton
, (Wed May 16, 11:29 am)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Tejun Heo
, (Wed May 16, 11:40 am)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Andrew Morton
, (Wed May 16, 12:13 pm)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Eric Sandeen
, (Thu May 17, 2:54 pm)
[PATCH -stable] sysfs: disable reclamation by default
, Tejun Heo
, (Wed May 16, 2:31 pm)
Re: [PATCH -stable] sysfs: disable reclamation by default
, Greg KH
, (Thu May 17, 8:04 am)
Re: [PATCH -stable] sysfs: disable reclamation by default
, Maneesh Soni
, (Thu May 17, 1:39 pm)
Re: [PATCH -stable] sysfs: disable reclamation by default
, Tejun Heo
, (Thu May 17, 1:49 pm)
Re: [PATCH -stable] sysfs: disable reclamation by default
, Maneesh Soni
, (Mon May 21, 12:39 am)
[PATCH 2/2] sysfs: fix race condition around sd->s_dentry
, Tejun Heo
, (Thu May 17, 1:59 pm)
[PATCH 2/2] sysfs: fix race condition around sd->s_dentry...
, Tejun Heo
, (Thu May 17, 2:16 pm)
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_de...
, Maneesh Soni
, (Mon May 21, 1:01 am)
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_de...
, Greg KH
, (Tue May 22, 6:38 pm)
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_de...
, Tejun Heo
, (Wed May 23, 4:21 am)
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_de...
, Tejun Heo
, (Fri Jun 8, 10:35 am)
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_de...
, Tejun Heo
, (Sat Jun 9, 2:49 am)
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_de...
, Greg KH
, (Sun Jun 10, 12:18 pm)
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_de...
, Eric Sandeen
, (Mon May 21, 12:02 pm)
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_de...
, Tejun Heo
, (Mon May 21, 12:15 pm)
[PATCH 1/2] sysfs: fix condition check in sysfs_drop_dentry()
, Tejun Heo
, (Thu May 17, 1:52 pm)
Re: [PATCH 1/2] sysfs: fix condition check in sysfs_drop_den...
, Maneesh Soni
, (Mon May 21, 12:35 am)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Chuck Ebbert
, (Wed May 16, 12:06 pm)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Clemens Schwaighofer
, (Tue May 15, 10:46 pm)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Andrew Morton
, (Tue May 15, 11:18 pm)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Clemens Schwaighofer
, (Tue May 15, 10:02 pm)
Re: Oops and Panics in 2.6.21.1, 2.6.20.6 and 2.6.19.2
, Clemens Schwaighofer
, (Tue May 15, 9:52 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Amit K. Arora
[RFC] Heads up on sys_fallocate()
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
git
:
linux-netdev
:
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
0 users
and
558 guests
online.
Syndicate