cxl/mbox: Construct a users cxl_mbox_cmd in the validation path
authorAlison Schofield <alison.schofield@intel.com>
Thu, 31 Mar 2022 01:27:14 +0000 (18:27 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 12 Apr 2022 23:07:00 +0000 (16:07 -0700)
commit9ae016aeb722504703c67e6e59c673719868f467
treef90abe5b6bc1060868e0e8fa3f2c479a749e76aa
parent63cf60b7e0a556b3542e6e915dfe9c93eaa559fd
cxl/mbox: Construct a users cxl_mbox_cmd in the validation path

This is a step in refactoring the handling of user space mailbox
commands. The intent is to have all the validation work originate
in cxl_validate_cmd_from_user().

Move the construction and validation of a mailbox command to the
validation path. Continue to pass both the out_cmd and the mbox_cmd
until handle_mbox_cmd_from_user() learns how to use a mbox_cmd param.

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/c9fbdad968a2b619f9108bb6c37cef1a853cdf5a.1648687552.git.alison.schofield@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/mbox.c