[lkml]   [2019]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Btrfs: add a extent ref verify tool (static analysis bug report)
On Wed, Oct 02, 2019 at 02:50:51PM +0100, Colin Ian King wrote:
> Hi,
> Static analysis on linux-next with Coverity has picked up a potential
> issue in file fs/btrfs/ref-verify.c, function process_leaf() in the
> following commit:
> commit fd708b81d972a0714b02a60eb4792fdbf15868c4
> Author: Josef Bacik <>
> Date: Fri Sep 29 15:43:50 2017 -0400
> Btrfs: add a extent ref verify tool
> The potential issue is when on the unlikely event when all the items
> contain unknown key.types and so ret is not assigned a value. Since ret
> is not initialized then a garbage value is returned by this function in
> this unlikely scenario.
> In the previous function process_extent_item any unknown key types are
> flagged up as an error and -EINVAL is returned. I'm unsure if this kind
> of error handling should also be applied to function process_leaf with
> invalid key types too.

Thanks I'll fix this up. You can run into block group item key types and we
don't care about those, so we just need ret = 0; Thanks,


 \ /
  Last update: 2019-10-02 16:03    [W:0.032 / U:9.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site