RE: [PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds

2021-09-10 Thread Chen, Guchun
From: Koenig, Christian Sent: Friday, September 10, 2021 2:37 PM To: Pan, Xinhui ; amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Deucher, Alexander ; Chen, Guchun Cc: Shi, Leslie Subject: Re: [PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds Yeah

Re: [PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds

2021-09-09 Thread Christian König
*To:* amd-...@lists.freedesktop.org ; dri-devel@lists.freedesktop.org ; Koenig, Christian ; Pan, Xinhui ; Deucher, Alexander *Cc:* Chen, Guchun ; Shi, Leslie *Subject:* [PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds Vendor will define their own memory types

Re: [PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds

2021-09-09 Thread Pan, Xinhui
; Koenig, Christian ; Pan, Xinhui ; Deucher, Alexander Cc: Chen, Guchun ; Shi, Leslie Subject: [PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds Vendor will define their own memory types on top of TTM_PL_PRIV, but call ttm_set_driver_manager directly without checking mem_type

[PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds

2021-09-09 Thread Guchun Chen
Vendor will define their own memory types on top of TTM_PL_PRIV, but call ttm_set_driver_manager directly without checking mem_type value when setting up memory manager. So add such check to aware the case when array bounds. Signed-off-by: Leslie Shi Signed-off-by: Guchun Chen --- include/drm/t