On Fri, Sep 28, 2018 at 07:59:34AM +0800, Qu Wenruo wrote:
> Although we have tree level check at tree read runtime, it's completely
> based on its parent level.
> We still need to do accurate level check to avoid invalid tree blocks
> sneak into kernel space.
> 
> The check itself is simple, for leaf its level should always be 0.
> For nodes its level should be in range [1, BTRFS_MAX_LEVEL - 1].
> 
> Signed-off-by: Qu Wenruo <[email protected]>

Reviewed-by: David Sterba <[email protected]>

Added to misc-next.

Reply via email to