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:	Sat, 09 Jun 2007 15:49:46 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Greg KH <greg@...ah.com>
CC:	Maneesh Soni <maneesh@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Clemens Schwaighofer <cs@...uila.co.jp>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Dipankar Sarma <dipankar@...ibm.com>,
	Chuck Ebbert <cebbert@...hat.com>
Subject: Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry,	take#2

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.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ