From: Meng Xu
Date: Sun, 24 Sep 2017 11:14:41 -0400
> + /* do the integrity check early */
> + if(((diva_xdi_um_cfg_cmd_t *)data)->adapter != a->controller){
> + DBG_ERR(("A: A(%d) write, invalid controller=%d != %d",
> +
In my understanding, the reason to have the check on
if (cmd->adapter != a->controller) {report error} is to prevent the case
where after xdi_copy_from_user() in diva_xdi_write(), data->adapter
is changed from what is previously fetched in diva_xdi_open_adapter(),
and hence, leading to using a wron