On Tue, Sep 19, 2017 at 12:15:57PM -0400, Meng Xu wrote: > Hi Christoph, > > By saying not copying the byte twice, did you mean > copy_from_user(req->cmd, sic->data + sizeof(opcode), cmdlen - > sizeof(opcode)) ? > > Does it affect the how req->cmd will be used later? > If no, I'll submit another patch as instructed. No, do something like: req->cmd[0] = opcode; if (copy_from_user(req->cmd + 1, sic->data, cmdlen - 1)) goto error;