Skip to contentSkip to conversation

drm/amdgpu: Fix potential uninitialized use of 'idle' in amdgpu_ids.c

PATCH In review Harry Wentland 3 participants 3 messages Feb 9, 2018 – Feb 11, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/amdgpu: Fix potential uninitialized use of 'idle' in amdgpu_ids.c

v2: Use NULL and reverse christmas tree ordering

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +2 -1
index 7d2805729c20..563e74755aab 100644
@@ -406,7 +406,8 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
 	struct amdgpu_device *adev = ring->adev;
 	unsigned vmhub = ring->funcs->vmhub;
 	struct amdgpu_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
-	struct amdgpu_vmid *id, *idle;
+	struct amdgpu_vmid *idle = NULL;
+	struct amdgpu_vmid *id = NULL;
 	int r = 0;
 
 	mutex_lock(&id_mgr->lock);
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180209184910.21679-1-harry.wentland-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 3 lines · Harry Wentland

v2: Use NULL and reverse christmas tree ordering

Quoted 21 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +2 -2
index 7d2805729c20..563e74755aab 100644
@@ -406,7 +406,8 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
        struct amdgpu_device *adev = ring->adev;
        unsigned vmhub = ring->funcs->vmhub;
        struct amdgpu_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
-       struct amdgpu_vmid *id, *idle;
+       struct amdgpu_vmid *idle = NULL;
+       struct amdgpu_vmid *id = NULL;
        int r = 0;
 
        mutex_lock(&id_mgr->lock);
--

2.14.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CADnq5_NERkHKMaZ+nhHzDq33J4=Em_4uUGXs7rj5A=bJmZpepA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

Reviewed-by
#4 lore raw

Am 09.02.2018 um 21:31 schrieb Alex Deucher:

Quoted 5 lines · Harry Wentland
Quoted 3 lines

v2: Use NULL and reverse christmas tree ordering

Quoted 22 lines
Quoted 22 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +2 -2
index 7d2805729c20..563e74755aab 100644
@@ -406,7 +406,8 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
         struct amdgpu_device *adev = ring->adev;
         unsigned vmhub = ring->funcs->vmhub;
         struct amdgpu_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
-       struct amdgpu_vmid *id, *idle;
+       struct amdgpu_vmid *idle = NULL;
+       struct amdgpu_vmid *id = NULL;
         int r = 0;
 
         mutex_lock(&id_mgr->lock);
--

2.14.1

Quoted 8 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx