Commit be7c5dc
drm/amdgpu: Use vmemdup_array_user in amdgpu_bo_create_list_entry_array
[ Upstream commit c4ac100 ]
Replace kvmalloc_array() + copy_from_user() with vmemdup_array_user() on
the fast path.
This shrinks the source code and improves separation between the kernel
and userspace slabs.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Fang Wang <32840572@qq.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent c7f4dad commit be7c5dc
1 file changed
Lines changed: 17 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
200 | 202 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | 203 | | |
207 | 204 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
216 | 209 | | |
217 | | - | |
| 210 | + | |
218 | 211 | | |
219 | 212 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
224 | 216 | | |
225 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
226 | 223 | | |
227 | 224 | | |
228 | 225 | | |
229 | 226 | | |
230 | 227 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | 228 | | |
236 | 229 | | |
237 | 230 | | |
| |||
0 commit comments