On Mon, Dec 10, 2018 at 11:35:34AM +0200, Leon Romanovsky wrote: > + if (resp_len < attrs->ucore.outlen) > + /* > + * Zero fill any extra memory that user > + * space might have provided. > + */ > + ret = clear_user(attrs->ucore.outbuf + resp_len, > + attrs->ucore.outlen - resp_len); > > - return 0; > + return (ret) ? -EFAULT : 0; This would be nicer to stay as return 0 so we don't have to have extra branches on the fast path. Code is clearer that way too.. Jason