Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: Fix superblock csum type check.
Date: Thu, 30 Apr 2015 08:33:26 +0800	[thread overview]
Message-ID: <55417856.5060207@cn.fujitsu.com> (raw)
In-Reply-To: <20150429172307.GD4996@twin.jikos.cz>



-------- Original Message  --------
Subject: Re: [PATCH] btrfs: Fix superblock csum type check.
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Date: 2015年04月30日 01:23

> On Tue, Apr 28, 2015 at 09:06:03AM +0800, Qu Wenruo wrote:
>> Old csum type check is wrong and can't catch csum_type 1(not supported).
>>
>> Fix it to avoid hostile 0 division.
>>
>> Reported-by: Lukas Lueg <lukas.lueg@gmail.com>
>> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
>
> Reviewed-by: David Sterba <dsterba@suse.cz>
>
>> --- a/fs/btrfs/disk-io.c
>> +++ b/fs/btrfs/disk-io.c
>> @@ -428,7 +428,7 @@ static int btrfs_check_super_csum(char *raw_disk_sb)
>>
>>   	if (csum_type >= ARRAY_SIZE(btrfs_csum_sizes)) {
>>   		printk(KERN_ERR "BTRFS: unsupported checksum algorithm %u\n",
>> -				csum_type);
>> +		       csum_type);
>
> Please avoid unrelated changes.
Thanks for reviewing.

Do I need to send a newer version to discard this format change?

Thanks,
Qu
>
>>   		ret = 1;
>>   	}

  reply	other threads:[~2015-04-30  0:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28  1:06 [PATCH] btrfs: Fix superblock csum type check Qu Wenruo
2015-04-29 17:23 ` David Sterba
2015-04-30  0:33   ` Qu Wenruo [this message]
2015-05-04 16:08     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55417856.5060207@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox