Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1500111
| From | Eric Engestrom <eric.engestrom@imgtec.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch] drm/i915: fix a read size argument |
| Date | 2016-10-13 11:10 +0200 |
| Message-ID | <srKbv-1uX-7@gated-at.bofh.it> (permalink) |
| References | <srK1Q-1cz-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Oct 13, 2016 at 11:55:08AM +0300, Dan Carpenter wrote:
> We want to read 3 bytes here, but because the parenthesis are in the
> wrong place we instead read:
>
> sizeof(intel_dp->edp_dpcd) == sizeof(intel_dp->edp_dpcd)
>
> which is one byte.
>
> Fixes: fe5a66f91c88 ("drm/i915: Read PSR caps/intermediate freqs/etc. only once on eDP")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Good catch! What tool did you use to find it, or did you find it by
inspection?
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
(btw, there's a missing `---` here, between the commit msg and the diff)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 14a3cf0..ee8aa95 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3551,8 +3551,8 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
> /* Read the eDP Display control capabilities registers */
> if ((intel_dp->dpcd[DP_EDP_CONFIGURATION_CAP] & DP_DPCD_DISPLAY_CONTROL_CAPABLE) &&
> drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
> - intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd) ==
> - sizeof(intel_dp->edp_dpcd)))
> + intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
> + sizeof(intel_dp->edp_dpcd))
> DRM_DEBUG_KMS("EDP DPCD : %*ph\n", (int) sizeof(intel_dp->edp_dpcd),
> intel_dp->edp_dpcd);
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[patch] drm/i915: fix a read size argument Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-13 11:00 +0200
Re: [patch] drm/i915: fix a read size argument Eric Engestrom <eric.engestrom@imgtec.com> - 2016-10-13 11:10 +0200
Re: [Intel-gfx] [patch] drm/i915: fix a read size argument Chris Wilson <chris@chris-wilson.co.uk> - 2016-10-13 11:10 +0200
Re: [Intel-gfx] [patch] drm/i915: fix a read size argument Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-13 12:00 +0200
Re: [patch] drm/i915: fix a read size argument walter harms <wharms@bfs.de> - 2016-10-13 11:50 +0200
Re: [patch] drm/i915: fix a read size argument Jani Nikula <jani.nikula@linux.intel.com> - 2016-10-13 14:20 +0200
csiph-web