Linux-Next Archive on
 help / color / Atom feed
From: coverity-bot <>
To: Thierry Reding <>
Cc: Lyude Paul <>,
	Philipp Zabel <>,
	"Gustavo A. R. Silva" <>,
Subject: Coverity: drm_dp_get_adjust_request_post_cursor(): Memory - corruptions
Date: Mon, 28 Oct 2019 16:05:14 -0700
Message-ID: <201910281605.3B5CC6A661@keescook> (raw)


This is an experimental automated report about issues detected by Coverity
from a scan of next-20191025 as part of the linux-next weekly scan project:

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by recent commits:

79465e0ffeb9 ("drm/dp: Add helper to get post-cursor adjustments")

Coverity reported the following:

*** CID 1487366:  Memory - corruptions  (OVERRUN)
/drivers/gpu/drm/drm_dp_helper.c: 127 in drm_dp_get_adjust_request_post_cursor()
121     EXPORT_SYMBOL(drm_dp_get_adjust_request_pre_emphasis);
123     u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZE],
124     					 unsigned int lane)
125     {
126     	unsigned int offset = DP_ADJUST_REQUEST_POST_CURSOR2;
vvv     CID 1487366:  Memory - corruptions  (OVERRUN)
vvv     Overrunning buffer pointed to by "link_status" of 6 bytes by passing it to a function which accesses it at byte offset 10 using argument "offset" (which evaluates to 524).
127     	u8 value = dp_link_status(link_status, offset);
129     	return (value >> (lane << 1)) & 0x3;
130     }
131     EXPORT_SYMBOL(drm_dp_get_adjust_request_post_cursor);

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please

Reported-by: coverity-bot <>
Addresses-Coverity-ID: 1487366 ("Memory - corruptions")
Fixes: 79465e0ffeb9 ("drm/dp: Add helper to get post-cursor adjustments")

Thanks for your attention!


                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910281605.3B5CC6A661@keescook \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Next Archive on

Archives are clonable:
	git clone --mirror linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ \
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone