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]
Message-ID: <F69DB5CD5C544C428676CFA36F31FF26@nsl.ad.nec.co.jp>
Date:	Tue, 28 Oct 2008 21:33:59 +0900
From:	"Takashi Sato" <t-sato@...jp.nec.com>
To:	"Andrew Morton" <akpm@...ux-foundation.org>
Cc:	"Christoph Hellwig" <hch@...radead.org>,
	<linux-fsdevel@...r.kernel.org>, <dm-devel@...hat.com>,
	<viro@...IV.linux.org.uk>, <linux-ext4@...r.kernel.org>,
	<xfs@....sgi.com>, <mtk.manpages@...glemail.com>,
	<axboe@...nel.dk>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] Implement generic freeze feature

Hi,

>> -void thaw_bdev(struct block_device *bdev, struct super_block *sb)
>> +int thaw_bdev(struct block_device *bdev, struct super_block *sb)
>>  {
>> + int error = 0;
>> +
>> + mutex_lock(&bdev->bd_fsfreeze_mutex);
>> + if (!bdev->bd_fsfreeze_count) {
>> + mutex_unlock(&bdev->bd_fsfreeze_mutex);
>> + return -EINVAL;
> 
> This would be a programming error, yes?

This is not a kernel programming error but a user's.
thaw_bdev() is called via the unfreeze ioctl.  If a user calls the unfreeze
ioctl for an unfrozen filesystem, this error will be returned.
So a WARN_ON isn't needed.

> If so, a WARN_ON is more appropriate than a silent runtime error.
> 
>> + }

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