Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9c89bd10
Commit
9c89bd10
authored
Aug 07, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge with DRI CVS tree: fix use-after-free bug in DRM(takedown)
parent
113dafa7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
39 deletions
+37
-39
drivers/char/drm/drm_drv.h
drivers/char/drm/drm_drv.h
+37
-39
No files found.
drivers/char/drm/drm_drv.h
View file @
9c89bd10
...
@@ -452,15 +452,10 @@ static int DRM(takedown)( drm_device_t *dev )
...
@@ -452,15 +452,10 @@ static int DRM(takedown)( drm_device_t *dev )
}
}
if
(
dev
->
maplist
)
{
if
(
dev
->
maplist
)
{
for
(
list
=
dev
->
maplist
->
head
.
next
;
list_for_each_safe
(
list
,
list_next
,
&
dev
->
maplist
->
head
)
{
list
!=
&
dev
->
maplist
->
head
;
list
=
list_next
)
{
list_next
=
list
->
next
;
r_list
=
(
drm_map_list_t
*
)
list
;
r_list
=
(
drm_map_list_t
*
)
list
;
map
=
r_list
->
map
;
DRM
(
free
)(
r_list
,
sizeof
(
*
r_list
),
DRM_MEM_MAPS
);
if
(
!
map
)
continue
;
if
(
(
map
=
r_list
->
map
)
)
{
switch
(
map
->
type
)
{
switch
(
map
->
type
)
{
case
_DRM_REGISTERS
:
case
_DRM_REGISTERS
:
case
_DRM_FRAME_BUFFER
:
case
_DRM_FRAME_BUFFER
:
...
@@ -498,6 +493,9 @@ static int DRM(takedown)( drm_device_t *dev )
...
@@ -498,6 +493,9 @@ static int DRM(takedown)( drm_device_t *dev )
}
}
DRM
(
free
)(
map
,
sizeof
(
*
map
),
DRM_MEM_MAPS
);
DRM
(
free
)(
map
,
sizeof
(
*
map
),
DRM_MEM_MAPS
);
}
}
list_del
(
list
);
DRM
(
free
)(
r_list
,
sizeof
(
*
r_list
),
DRM_MEM_MAPS
);
}
DRM
(
free
)(
dev
->
maplist
,
sizeof
(
*
dev
->
maplist
),
DRM_MEM_MAPS
);
DRM
(
free
)(
dev
->
maplist
,
sizeof
(
*
dev
->
maplist
),
DRM_MEM_MAPS
);
dev
->
maplist
=
NULL
;
dev
->
maplist
=
NULL
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment