Alexander Usyskin 702c890452 mei: hbm: fix client dma reply status
commit 6b0b80ac103b2a40c72a47c301745fd1f4ef4697 upstream.

Don't blindly copy status value received from the firmware
into internal client status field,
It may be positive and ERR_PTR(ret) will translate it
into an invalid address and the caller will crash.

Put the error code into the client status on failure.

Fixes: 369aea845951 ("mei: implement client dma setup.")
Cc: <stable@vger.kernel.org> # v5.11+
Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Tested-by: : Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20211228082047.378115-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 11:02:56 +01:00
..
2021-06-22 12:40:31 +02:00
2021-09-01 08:44:42 -07:00
2022-01-27 11:02:56 +01:00
2021-02-06 15:48:11 +01:00
2021-06-22 12:40:31 +02:00
2020-07-29 16:21:13 +02:00
2021-06-22 12:40:31 +02:00
2021-10-05 16:20:35 +02:00
2021-06-22 12:40:31 +02:00