Skip to content
  • Andre Noll's avatar
    md: Fix check for overlapping devices. · d07bd3bc
    Andre Noll authored
    
    
    The checks in overlaps() expect all parameters either in block-based
    or sector-based quantities. However, its single caller passes two
    rdev->data_offset arguments as well as two rdev->size arguments, the
    former being sector counts while the latter are measured in 1K blocks.
    
    This could cause rdev_size_store() to accept an invalid size from user
    space. Fix it by passing only sector-based quantities to overlaps().
    
    Signed-off-by: default avatarAndre Noll <maan@systemlinux.org>
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    d07bd3bc