Re: [PATCH] isdn/eicon: do integrity check on cmd->adapter == a->controller early

2017-09-28 Thread David Miller
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", > +

[PATCH] isdn/eicon: do integrity check on cmd->adapter == a->controller early

2017-09-24 Thread Meng Xu
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