4774fd23261c5ae5a9e838f8c008c8c6281df807
[openwrt/staging/hauke.git] /
1 From 38e906c77467bf83ec130bea6859b46ea1e0d4b8 Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Thu, 30 Jan 2020 12:35:44 +0000
4 Subject: [PATCH] staging: vc04_services: Fix vcsm overflow bug when
5 counting transactions
6
7 The response block and local state were using u16 and u32 respectively
8 to represent transaction id. When the former would wrap, there is a
9 mismatch and subsequent transactions will be marked as failures.
10
11 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
12 ---
13 drivers/staging/vc04_services/vc-sm-cma/vc_sm_cma_vchi.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm_cma_vchi.c
17 +++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm_cma_vchi.c
18 @@ -34,7 +34,7 @@ struct sm_cmd_rsp_blk {
19 /* To be signaled when the response is there */
20 struct completion cmplt;
21
22 - u16 id;
23 + u32 id;
24 u16 length;
25
26 u8 msg[VC_SM_MAX_MSG_LEN];