On Mon, 5 Mar 2018, Alexey Dobriyan wrote: > ->remote_node_defrag_ratio is in range 0..1000. This also adds a check and modifies the behavior to return an error code. Before this patch invalid values were ignored. Acked-by: Christoph Lameter <cl@xxxxxxxxx> > - err = kstrtoul(buf, 10, &ratio); > + err = kstrtouint(buf, 10, &ratio); > if (err) > return err; > + if (ratio > 100) > + return -ERANGE; > > - if (ratio <= 100) > - s->remote_node_defrag_ratio = ratio * 10; > + s->remote_node_defrag_ratio = ratio * 10; > > return length; > } > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>