diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-01-27 22:50:25 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-01-27 22:50:25 +0000 |
commit | 5ebab2c187145152f821507ef0ee4503aaa63fe9 (patch) | |
tree | ccb43fb6160d4cdd70ef9913a9e44c0f54fcff8e /sys/dev/pci | |
parent | 557066017d7d7c67696e8e62e0614eddb255c3f7 (diff) |
drm/amd/display: Fix out of bounds access on DNC31 stream encoder regs
From Nicholas Kazlauskas
89166801f80dc64083212eef1308bfc62f6844f1 in linux 5.15.y/5.15.17
d374d3b493215d637b9e7be12a93f22caf4c1f97 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_resource.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_resource.c b/sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_resource.c index 0fe570717ba..d4fe5352421 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_resource.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_resource.c @@ -470,7 +470,8 @@ static const struct dcn30_afmt_mask afmt_mask = { SE_DCN3_REG_LIST(id)\ } -static const struct dcn10_stream_enc_registers stream_enc_regs[] = { +/* Some encoders won't be initialized here - but they're logical, not physical. */ +static const struct dcn10_stream_enc_registers stream_enc_regs[ENGINE_ID_COUNT] = { stream_enc_regs(0), stream_enc_regs(1), stream_enc_regs(2), |