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] [day] [month] [year] [list]
Date:	Fri, 8 Dec 2006 13:35:54 +0100 (CET)
From:	Jiri Kosina <jikos@...os.cz>
To:	Neil Brown <neilb@...e.de>
cc:	Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org
Subject: Re: 2.6.19-rc6-mm2

On Fri, 8 Dec 2006, Neil Brown wrote:

> > OK, so more details follow (I am not sure how valuable they are, though). 
> They do help a bit..
> I've found a possible race that could possibly be related to this BUG.  
> Can you try this patch and see if it helps?
> Signed-off-by: Neil Brown <neilb@...e.de>
> 
> ### Diffstat output
>  ./drivers/md/md.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff .prev/drivers/md/md.c ./drivers/md/md.c
> --- .prev/drivers/md/md.c	2006-12-06 14:49:20.000000000 +1100
> +++ ./drivers/md/md.c	2006-12-07 10:29:40.000000000 +1100
> @@ -222,10 +222,14 @@ static inline mddev_t *mddev_get(mddev_t
>  	return mddev;
>  }
>  
> +static DEFINE_MUTEX(disks_mutex);
>  static void mddev_put(mddev_t *mddev)
>  {
> -	if (!atomic_dec_and_lock(&mddev->active, &all_mddevs_lock))
> +	mutex_lock(&disks_mutex);
> +	if (!atomic_dec_and_lock(&mddev->active, &all_mddevs_lock)) {
> +		mutex_unlock(&disks_mutex);
>  		return;
> +	}
>  	list_del(&mddev->all_mddevs);
>  	spin_unlock(&all_mddevs_lock);
>  
> @@ -234,6 +238,7 @@ static void mddev_put(mddev_t *mddev)
>  	blk_cleanup_queue(mddev->queue);
>  	mddev->queue = NULL;
>  	kobject_unregister(&mddev->kobj);
> +	mutex_unlock(&disks_mutex);
>  }
>  
>  static mddev_t * mddev_find(dev_t unit)
> @@ -2948,7 +2953,6 @@ int mdp_major = 0;
>  
>  static struct kobject *md_probe(dev_t dev, int *part, void *data)
>  {
> -	static DEFINE_MUTEX(disks_mutex);
>  	mddev_t *mddev = mddev_find(dev);
>  	struct gendisk *disk;
>  	int partitioned = (MAJOR(dev) != MD_MAJOR);

Hi Neil,

sorry, but the BUG is still there after applying this patch.

-- 
Jiri Kosina
-
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