Skip to content

Commit bf3719c

Browse files
Damien Lespiaudanvet
authored andcommitted
drm/dp-mst-helper: Don't use uninitialized fields of the sideband message header
We could be using uninitialized fields of the header in drm_dp_encode_sideband_msg_hdr(), for instance hdr->somt is set to 1 in the first patcket but never set to 0 otherwise. Always clear the header at the start then. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 7389ad4 commit bf3719c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/drm_dp_mst_topology.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,8 @@ static int process_single_tx_qlock(struct drm_dp_mst_topology_mgr *mgr,
12901290
int len, space, idx, tosend;
12911291
int ret;
12921292

1293+
memset(&hdr, 0, sizeof(struct drm_dp_sideband_msg_hdr));
1294+
12931295
if (txmsg->state == DRM_DP_SIDEBAND_TX_QUEUED) {
12941296
txmsg->seqno = -1;
12951297
txmsg->state = DRM_DP_SIDEBAND_TX_START_SEND;

0 commit comments

Comments
 (0)