Re: [PATCH v2 1/6] drm/i915: use mock device info for creating mock device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jani,

On Tue, Jun 27, 2023 at 06:13:58PM +0300, Jani Nikula wrote:
> Instead of modifying the device info on the fly, use static const mock
> device info.
> 
> It's not okay to modify device info at runtime; we've added separate
> runtime info for info that needs to be modified at runtime. We've added
> safeguards to device info to prevent it from being modified, but commit
> 5e352e32aec2 ("drm/i915: preparation for using PAT index") just cast the
> const away and modified it anyway. This prevents device info from being
> moved to rodata.
> 
> Fixes: 5e352e32aec2 ("drm/i915: preparation for using PAT index")
> Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>
> Cc: Fei Yang <fei.yang@xxxxxxxxx>
> Cc: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>
> Cc: Andrzej Hajda <andrzej.hajda@xxxxxxxxx>
> Cc: Matt Roper <matthew.d.roper@xxxxxxxxx>
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

thanks for fixing this!

Reviewed-by: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx> 

Andi



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux