Commit 58fa0d9
drm/vmwgfx: Fix possible usage of an uninitialized variable
vmw_user_bo_lookup can fail to lookup user buffers, especially because
the buffer handles come from the userspace. The return value has
to be checked before the buffers are put back.
This was spotted by Dan's Smatch statick checker:
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:574 vmw_user_bo_synccpu_release()
error: uninitialized symbol 'vmw_bo'.
Signed-off-by: Zack Rusin <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Fixes: 8afa13a ("drm/vmwgfx: Implement DRIVER_GEM")
Reviewed-by: Martin Krastev <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 60c9ecd)
Signed-off-by: Thomas Zimmermann <[email protected]>1 parent 50ca8cc commit 58fa0d9
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
572 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
573 | 576 | | |
574 | | - | |
575 | 577 | | |
576 | 578 | | |
577 | 579 | | |
| |||
0 commit comments