On Thu, Sep 11, 2014 at 10:02:16AM -0400, Chris Mason wrote:
> On 09/09/2014 05:19 AM, rongqing...@windriver.com wrote:
> > From: Li RongQing
> >
> > It is impossible that csum_size is larger than sizeof(long), but the codes
> > still add the handler for this condition, like allocate new memory,
Do you means we can handle it like below? I think it is not better,
if that, csum size can not the expand, and the code in csum_tree_block
seems redundancy;
If you do not want to truncate in first patch, I think we can try to avoid it
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 22a367
On 09/09/2014 05:19 AM, rongqing...@windriver.com wrote:
> From: Li RongQing
>
> It is impossible that csum_size is larger than sizeof(long), but the codes
> still add the handler for this condition, like allocate new memory, for
> extension. If it becomes true someday, copying csum_size size mem
From: Li RongQing
It is impossible that csum_size is larger than sizeof(long), but the codes
still add the handler for this condition, like allocate new memory, for
extension. If it becomes true someday, copying csum_size size memory to local
32bit variable found and val will overflow these two v