mei: protect mei_cl_mtu from null dereference
authorAlexander Usyskin <alexander.usyskin@intel.com>
Thu, 29 Oct 2020 09:54:42 +0000 (11:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Nov 2020 09:13:48 +0000 (10:13 +0100)
commitbcbc0b2e275f0a797de11a10eff495b4571863fc
tree4b5c88280d4194ac1ce38394bd943ccf623ac0b8
parent3cea11cd5e3b00d91caf0b4730194039b45c5891
mei: protect mei_cl_mtu from null dereference

A receive callback is queued while the client is still connected
but can still be called after the client was disconnected. Upon
disconnect cl->me_cl is set to NULL, hence we need to check
that ME client is not-NULL in mei_cl_mtu to avoid
null dereference.

Cc: <stable@vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20201029095444.957924-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/client.h