diff options
author | 2012-08-21 12:11:51 -0700 | |
---|---|---|
committer | 2012-08-21 15:55:28 -0700 | |
commit | 45f2e081f573526977abfa781a12728f83e9641f (patch) | |
tree | 0335f7ad27ed8506504201a5e558126b2ede058f /lib/mpi/mpi-bit.c | |
parent | libceph: avoid truncation due to racing banners (diff) | |
download | linux-dev-45f2e081f573526977abfa781a12728f83e9641f.tar.xz linux-dev-45f2e081f573526977abfa781a12728f83e9641f.zip |
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>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions