Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jan.koester
Linux
Commits
40e6815b
Commit
40e6815b
authored
8 years ago
by
Rob Clark
Browse files
Options
Downloads
Patches
Plain Diff
drm/msm: fix leak in failed submit path
Signed-off-by:
Rob Clark
<
robdclark@gmail.com
>
parent
6860b56c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
drivers/gpu/drm/msm/msm_drv.h
+1
-0
1 addition, 0 deletions
drivers/gpu/drm/msm/msm_drv.h
drivers/gpu/drm/msm/msm_gem_submit.c
+11
-2
11 additions, 2 deletions
drivers/gpu/drm/msm/msm_gem_submit.c
drivers/gpu/drm/msm/msm_gpu.c
+1
-3
1 addition, 3 deletions
drivers/gpu/drm/msm/msm_gpu.c
with
13 additions
and
5 deletions
drivers/gpu/drm/msm/msm_drv.h
+
1
−
0
View file @
40e6815b
...
...
@@ -161,6 +161,7 @@ int msm_atomic_commit(struct drm_device *dev,
int
msm_register_mmu
(
struct
drm_device
*
dev
,
struct
msm_mmu
*
mmu
);
void
msm_gem_submit_free
(
struct
msm_gem_submit
*
submit
);
int
msm_ioctl_gem_submit
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file
);
...
...
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/msm/msm_gem_submit.c
+
11
−
2
View file @
40e6815b
...
...
@@ -56,6 +56,13 @@ static struct msm_gem_submit *submit_create(struct drm_device *dev,
return
submit
;
}
void
msm_gem_submit_free
(
struct
msm_gem_submit
*
submit
)
{
fence_put
(
submit
->
fence
);
list_del
(
&
submit
->
node
);
kfree
(
submit
);
}
static
int
submit_lookup_objects
(
struct
msm_gem_submit
*
submit
,
struct
drm_msm_gem_submit
*
args
,
struct
drm_file
*
file
)
{
...
...
@@ -324,7 +331,7 @@ static int submit_reloc(struct msm_gem_submit *submit, struct msm_gem_object *ob
return
0
;
}
static
void
submit_cleanup
(
struct
msm_gem_submit
*
submit
,
bool
fail
)
static
void
submit_cleanup
(
struct
msm_gem_submit
*
submit
)
{
unsigned
i
;
...
...
@@ -448,7 +455,9 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
args
->
fence
=
submit
->
fence
->
seqno
;
out:
submit_cleanup
(
submit
,
!!
ret
);
submit_cleanup
(
submit
);
if
(
ret
)
msm_gem_submit_free
(
submit
);
mutex_unlock
(
&
dev
->
struct_mutex
);
return
ret
;
}
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/msm/msm_gpu.c
+
1
−
3
View file @
40e6815b
...
...
@@ -446,9 +446,7 @@ static void retire_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
drm_gem_object_unreference
(
&
msm_obj
->
base
);
}
fence_put
(
submit
->
fence
);
list_del
(
&
submit
->
node
);
kfree
(
submit
);
msm_gem_submit_free
(
submit
);
}
static
void
retire_submits
(
struct
msm_gpu
*
gpu
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment