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: <1156351737.3382.40.camel@twins>
Date:	Wed, 23 Aug 2006 18:48:57 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Jason Baron <jbaron@...hat.com>
Cc:	neilb@...e.de, akpm@...l.org, arjan@...radead.org,
	mingo@...hat.com, axboe@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block_dev.c mutex_lock_nested() fix

On Wed, 2006-08-23 at 11:09 -0400, Jason Baron wrote:
> Hi,
> 
> In the case below we are locking the whole disk not a partition. This 
> change simply brings the code in line with the piece above where when we 
> are the 'first' opener, and we are a partition.

Makes sense in that only whole devices have a partition count.

> Signed-off-by: Jason Baron <jbaron@...hat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>

> --- linux-2.6/fs/block_dev.c.bak
> +++ linux-2.6/fs/block_dev.c
> @@ -966,7 +966,7 @@ do_open(struct block_device *bdev, struc
>  				rescan_partitions(bdev->bd_disk, bdev);
>  		} else {
>  			mutex_lock_nested(&bdev->bd_contains->bd_mutex,
> -					  BD_MUTEX_PARTITION);
> +					  BD_MUTEX_WHOLE);
>  			bdev->bd_contains->bd_part_count++;
>  			mutex_unlock(&bdev->bd_contains->bd_mutex);
>  		}

-
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