From: Alexander Usyskin <[email protected]>

commit b398d53cd421454d64850f8b1f6d609ede9042d9 upstream.

Block data send with vtag if either transport layer or
FW client are not supporting vtags.

Cc: <[email protected]> # v5.10+
Signed-off-by: Alexander Usyskin <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/misc/mei/bus.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -60,6 +60,13 @@ ssize_t __mei_cl_send(struct mei_cl *cl,
                goto out;
        }
 
+       if (vtag) {
+               /* Check if vtag is supported by client */
+               rets = mei_cl_vt_support_check(cl);
+               if (rets)
+                       goto out;
+       }
+
        if (length > mei_cl_mtu(cl)) {
                rets = -EFBIG;
                goto out;


Reply via email to