On 7/12/13, walter harms <wharms@xxxxxx> wrote: > i am struggling to understand what is actually checked here. > Perhaps this improves the readability a bit > if ( nchunks < 0 || > sizeof(struct rpcrdma_write_chunk) * nchunks > (SIZE_MAX - start) || That doesn't work. This is one of the few times I get to use algebra in real life. Yay! The problem is you have to have the nchunks by itself and the trusted bits on the other side. So the multiply becomes a divide. There are lots of these checks in the kernel. It's idiomatic. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html