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: <2E042A67F72447F6AAA0CC0605DBFA84@nsl.ad.nec.co.jp>
Date:	Mon, 28 Apr 2008 21:59:55 +0900
From:	"Takashi Sato" <t-sato@...jp.nec.com>
To:	"Christoph Hellwig" <hch@...radead.org>
Cc:	<linux-ext4@...r.kernel.org>, <xfs@....sgi.com>,
	<dm-devel@...hat.com>, <linux-fsdevel@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 1/3] Implement generic freeze feature

Hi,

> On Mon, Apr 28, 2008 at 07:31:23PM +0900, Takashi Sato wrote:
>> + /* Initialize semaphore for freeze. */
>> + sema_init(&bdev->bd_freeze_sem, 1);
>
> The freezing process is already protected by bd_mount_sem, so I don't
> think there's need for another one.
>
[...]
>>  down(&bdev->bd_mount_sem);
>>  sb = get_super(bdev);
>
> I think the protection against double freezes would be better done by
> using a trylock on bd_mount_sem.

bd_mount_sem can protect against only freezes and cannot protect against
unfreezes.  If multiple unfreezes run in parallel,  the multiple up() for
bd_mount_sem might occur incorrectly.

> In fact after that it could be changed
> from a semaphore to a simple test_and_set_bit.

I will consider using test_and_set_bit.

>>  error = -ENOTTY;
>>  break;
>> +
>> + case FIFREEZE: {
>
> This would be better to split intot a small helper ala ioctl_fibmap()
>
>> + case FITHAW: {
>
> Same here.

OK.  I will split small helper functions.

Cheers, Takashi 
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ