Skip to content

Commit e39701e

Browse files
committed
drm/nouveau: remove incorrect __user annotations
Fix copy-paste error causing EXEC and VM_BIND syscalls data pointers to carry incorrect __user annotations. Fixes: b88baab ("drm/nouveau: implement new VM_BIND uAPI") Reported-by: kernel test robot <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 85b7d20 commit e39701e

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

drivers/gpu/drm/nouveau/nouveau_exec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ nouveau_exec(struct nouveau_exec_job_args *args)
293293

294294
static int
295295
nouveau_exec_ucopy(struct nouveau_exec_job_args *args,
296-
struct drm_nouveau_exec __user *req)
296+
struct drm_nouveau_exec *req)
297297
{
298298
struct drm_nouveau_sync **s;
299299
u32 inc = req->wait_count;
@@ -352,15 +352,15 @@ nouveau_exec_ufree(struct nouveau_exec_job_args *args)
352352

353353
int
354354
nouveau_exec_ioctl_exec(struct drm_device *dev,
355-
void __user *data,
355+
void *data,
356356
struct drm_file *file_priv)
357357
{
358358
struct nouveau_abi16 *abi16 = nouveau_abi16_get(file_priv);
359359
struct nouveau_cli *cli = nouveau_cli(file_priv);
360360
struct nouveau_abi16_chan *chan16;
361361
struct nouveau_channel *chan = NULL;
362362
struct nouveau_exec_job_args args = {};
363-
struct drm_nouveau_exec __user *req = data;
363+
struct drm_nouveau_exec *req = data;
364364
int ret = 0;
365365

366366
if (unlikely(!abi16))

drivers/gpu/drm/nouveau/nouveau_exec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct nouveau_exec_job {
4848
int nouveau_exec_job_init(struct nouveau_exec_job **job,
4949
struct nouveau_exec_job_args *args);
5050

51-
int nouveau_exec_ioctl_exec(struct drm_device *dev, void __user *data,
51+
int nouveau_exec_ioctl_exec(struct drm_device *dev, void *data,
5252
struct drm_file *file_priv);
5353

5454
#endif

drivers/gpu/drm/nouveau/nouveau_uvmm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,7 @@ nouveau_uvmm_vm_bind(struct nouveau_uvmm_bind_job_args *args)
16871687

16881688
static int
16891689
nouveau_uvmm_vm_bind_ucopy(struct nouveau_uvmm_bind_job_args *args,
1690-
struct drm_nouveau_vm_bind __user *req)
1690+
struct drm_nouveau_vm_bind *req)
16911691
{
16921692
struct drm_nouveau_sync **s;
16931693
u32 inc = req->wait_count;
@@ -1749,12 +1749,12 @@ nouveau_uvmm_vm_bind_ufree(struct nouveau_uvmm_bind_job_args *args)
17491749

17501750
int
17511751
nouveau_uvmm_ioctl_vm_bind(struct drm_device *dev,
1752-
void __user *data,
1752+
void *data,
17531753
struct drm_file *file_priv)
17541754
{
17551755
struct nouveau_cli *cli = nouveau_cli(file_priv);
17561756
struct nouveau_uvmm_bind_job_args args = {};
1757-
struct drm_nouveau_vm_bind __user *req = data;
1757+
struct drm_nouveau_vm_bind *req = data;
17581758
int ret = 0;
17591759

17601760
if (unlikely(!nouveau_cli_uvmm_locked(cli)))

drivers/gpu/drm/nouveau/nouveau_uvmm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ void nouveau_uvmm_fini(struct nouveau_uvmm *uvmm);
8989
void nouveau_uvmm_bo_map_all(struct nouveau_bo *nvbov, struct nouveau_mem *mem);
9090
void nouveau_uvmm_bo_unmap_all(struct nouveau_bo *nvbo);
9191

92-
int nouveau_uvmm_ioctl_vm_init(struct drm_device *dev, void __user *data,
92+
int nouveau_uvmm_ioctl_vm_init(struct drm_device *dev, void *data,
9393
struct drm_file *file_priv);
9494

95-
int nouveau_uvmm_ioctl_vm_bind(struct drm_device *dev, void __user *data,
95+
int nouveau_uvmm_ioctl_vm_bind(struct drm_device *dev, void *data,
9696
struct drm_file *file_priv);
9797

9898
static inline void nouveau_uvmm_lock(struct nouveau_uvmm *uvmm)

0 commit comments

Comments
 (0)