From: Neil Brown Date: Fri, 27 Jun 2008 22:31:26 +0000 (+1000) Subject: Close race in md_probe X-Git-Tag: v2.6.27-rc1~957^2~50 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f48ed538386cb41559282d989354e8f5d442d71c;p=pandora-kernel.git Close race in md_probe There is a possible race in md_probe. If two threads call md_probe for the same device, then one could exit (having checked that ->gendisk exists) before the other has called kobject_init_and_add, thus returning an incomplete kobj which will cause problems when we try to add children to it. So extend the range of protection of disks_mutex slightly to avoid this possibility. Signed-off-by: Neil Brown --- Reading git-diff-tree failed