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: <1159538597.28131.97.camel@taijtu>
Date:	Fri, 29 Sep 2006 16:03:17 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Neil Brown <neilb@...e.de>
Cc:	Michal Piotrowski <michal.k.k.piotrowski@...il.com>,
	Andrew Morton <akpm@...l.org>, Ingo Molnar <mingo@...e.hu>,
	linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: md deadlock (was Re: 2.6.18-mm2)

On Fri, 2006-09-29 at 22:52 +1000, Neil Brown wrote:
> On Friday September 29, a.p.zijlstra@...llo.nl wrote:
> > On Thu, 2006-09-28 at 13:54 +0200, Michal Piotrowski wrote:
> > 
> > Looks like a real deadlock here. It seems to me #2 is the easiest to
> > break.
> 
> I guess it could deadlock if you tried to add /dev/md0 as a component
> of /dev/md0.  I should probably check for that somewhere.
> In other cases the array->member ordering ensures there is no
> deadlock.
> 


	1					2

 open(/dev/md0)

					open(/dev/md0)
					- do_open() -> bdev->bd_mutex
 ioctl(/dev/md0, hotadd) 
 - md_ioctl() -> mddev->reconfig_mutex
 -- hot_add_disk()
 --- bind_rdev_to_array()
 ---- bd_claim_by_disk()
 ----- bd_claim_by_kobject()
					-- md_open()
					--- mddev_lock()
					---- mutex_lock(mddev->reconfig_mutex)
 ------ mutex_lock(bdev->bd_mutex)


looks like an AB-BA deadlock to me


-
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