[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080114135618.GQ27894@ZenIV.linux.org.uk>
Date: Mon, 14 Jan 2008 13:56:18 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: Neil Brown <neilb@...e.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 002 of 6] md: Fix use-after-free bug when dropping an rdev from an md array.
On Mon, Jan 14, 2008 at 12:59:39PM +0000, Al Viro wrote:
> I really don't like the entire scheme, to be honest. BTW, what happens
> if you try to add the same device to the same array after having it kicked
> out? If that comes before your delayed kobject_del(), the things will
> get nasty since sysfs will (rightfully) refuse to add another entry with
> the same name and parent while the old one is still there and for all
> sysfs knows is going to stay there...
More fun questions: what are the locking requirements for ->resize()?
You are calling it with no exclusion whatsoever... What about
bind_rdev_to_array()? At the very least, you want to protect
mddev->disks, and AFAICS new_dev_store() has no exclusion at all.
And I suspect that you have other things in there in need of protection
(finding free desc_nr, for one); can all of those be handled by simple
spinlocks?
--
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