Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ceph: avoid divide by zero in __validate_layout()
If "l->stripe_unit" is zero the the mod on the next line will cause a divide by zero bug. This comes from the copy_from_user() in ceph_ioctl_set_layout_policy(). Passing 0 is valid, though (it means "do not change") so avoid the % check in that case. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Sage Weil <[email protected]> Reviewed-by: Alex Elder <[email protected]>
- Loading branch information