mei: pxp: recover from recv fail under memory pressure
authorAlexander Usyskin <alexander.usyskin@intel.com>
Wed, 11 Oct 2023 11:01:55 +0000 (14:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Oct 2023 08:01:33 +0000 (10:01 +0200)
commitee5cb39348e69a61a865801970ba8fdc399335de
treee03ca131dcd86a408a826be90a1d8237c2743e25
parentcf439721f66719c6aa73b5ea23320c2f8cba100f
mei: pxp: recover from recv fail under memory pressure

Under memory pressure recv fails due to kmalloc failure,
and if drivers(pxp) retry send/receive, send blocks
indefinitely.
Send without recv leaves the channel in a bad state.

Retry send attempt after small timeout and reset the channel if
the retry failed on kmalloc failure too.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20231011110157.247552-3-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/pxp/mei_pxp.c