Sage Weil 45f2e081f5 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 <dan.carpenter@oracle.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
2012-08-21 15:55:28 -07:00
..
2012-08-02 09:11:19 -07:00
2012-05-29 23:28:33 -04:00
2012-08-02 09:11:19 -07:00
2012-05-16 14:28:27 -05:00
2012-08-02 09:11:19 -07:00
2012-07-30 18:15:35 -07:00