X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fofd%2Flproc_ofd.c;h=38093a50e8dce1c21ab94806ce082a40dd3e62b6;hp=c130194290ee833cdbf2563bd8a1701c57accf05;hb=13834f5aeef42d3c358574ac59475c0758dce300;hpb=f756979d9730333394037f127e75f43910174622 diff --git a/lustre/ofd/lproc_ofd.c b/lustre/ofd/lproc_ofd.c index c130194..38093a5 100644 --- a/lustre/ofd/lproc_ofd.c +++ b/lustre/ofd/lproc_ofd.c @@ -533,7 +533,8 @@ ofd_brw_size_seq_write(struct file *file, const char __user *buffer, return -EINVAL; val = val * ONE_MB_BRW_SIZE; - if (val <= 0 || val > DT_MAX_BRW_SIZE) + if (val <= 0 || val > DT_MAX_BRW_SIZE || + val < (1 << ofd->ofd_blockbits)) return -ERANGE; spin_lock(&ofd->ofd_flags_lock);