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
fe96cc43
Commit
fe96cc43
authored
Oct 08, 2004
by
Len Brown
Committed by
Len Brown
Oct 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ACPI] thermal module race condition/memory leak (David Shaohua Li)
http://bugzilla.kernel.org/show_bug.cgi?id=3231
parent
c02f9733
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+14
-3
No files found.
drivers/acpi/thermal.c
View file @
fe96cc43
...
@@ -161,6 +161,7 @@ struct acpi_thermal {
...
@@ -161,6 +161,7 @@ struct acpi_thermal {
unsigned
long
last_temperature
;
unsigned
long
last_temperature
;
unsigned
long
polling_frequency
;
unsigned
long
polling_frequency
;
u8
cooling_mode
;
u8
cooling_mode
;
volatile
u8
zombie
;
struct
acpi_thermal_flags
flags
;
struct
acpi_thermal_flags
flags
;
struct
acpi_thermal_state
state
;
struct
acpi_thermal_state
state
;
struct
acpi_thermal_trips
trips
;
struct
acpi_thermal_trips
trips
;
...
@@ -647,7 +648,10 @@ static void
...
@@ -647,7 +648,10 @@ static void
acpi_thermal_run
(
acpi_thermal_run
(
unsigned
long
data
)
unsigned
long
data
)
{
{
acpi_os_queue_for_execution
(
OSD_PRIORITY_GPE
,
acpi_thermal_check
,
(
void
*
)
data
);
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
data
;
if
(
!
tz
->
zombie
)
acpi_os_queue_for_execution
(
OSD_PRIORITY_GPE
,
acpi_thermal_check
,
(
void
*
)
data
);
}
}
...
@@ -1349,8 +1353,14 @@ acpi_thermal_remove (
...
@@ -1349,8 +1353,14 @@ acpi_thermal_remove (
tz
=
(
struct
acpi_thermal
*
)
acpi_driver_data
(
device
);
tz
=
(
struct
acpi_thermal
*
)
acpi_driver_data
(
device
);
if
(
timer_pending
(
&
(
tz
->
timer
)))
/* avoid timer adding new defer task */
del_timer
(
&
(
tz
->
timer
));
tz
->
zombie
=
1
;
/* wait for running timer (on other CPUs) finish */
del_timer_sync
(
&
(
tz
->
timer
));
/* synchronize deferred task */
acpi_os_wait_events_complete
(
NULL
);
/* deferred task may reinsert timer */
del_timer_sync
(
&
(
tz
->
timer
));
status
=
acpi_remove_notify_handler
(
tz
->
handle
,
status
=
acpi_remove_notify_handler
(
tz
->
handle
,
ACPI_DEVICE_NOTIFY
,
acpi_thermal_notify
);
ACPI_DEVICE_NOTIFY
,
acpi_thermal_notify
);
...
@@ -1372,6 +1382,7 @@ acpi_thermal_remove (
...
@@ -1372,6 +1382,7 @@ acpi_thermal_remove (
acpi_thermal_remove_fs
(
device
);
acpi_thermal_remove_fs
(
device
);
kfree
(
tz
);
return_VALUE
(
0
);
return_VALUE
(
0
);
}
}
...
...
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