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
nexedi
linux
Commits
c0eeedbb
Commit
c0eeedbb
authored
Jun 23, 2003
by
Bartlomiej Zolnierkiewicz
Committed by
Linus Torvalds
Jun 23, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] do not take ide_setting_sem under ide_lock
From -mm tree, fixes oops when removing ide drivers.
parent
69320950
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
drivers/ide/ide.c
drivers/ide/ide.c
+4
-3
No files found.
drivers/ide/ide.c
View file @
c0eeedbb
...
@@ -1134,13 +1134,12 @@ ide_settings_t *ide_find_setting_by_name (ide_drive_t *drive, char *name)
...
@@ -1134,13 +1134,12 @@ ide_settings_t *ide_find_setting_by_name (ide_drive_t *drive, char *name)
*
*
* Automatically remove all the driver specific settings for this
* Automatically remove all the driver specific settings for this
* drive. This function may sleep and must not be called from IRQ
* drive. This function may sleep and must not be called from IRQ
* context. T
akes the settings_lock
* context. T
he caller must hold ide_setting_sem.
*/
*/
static
void
auto_remove_settings
(
ide_drive_t
*
drive
)
static
void
auto_remove_settings
(
ide_drive_t
*
drive
)
{
{
ide_settings_t
*
setting
;
ide_settings_t
*
setting
;
down
(
&
ide_setting_sem
);
repeat:
repeat:
setting
=
drive
->
settings
;
setting
=
drive
->
settings
;
while
(
setting
)
{
while
(
setting
)
{
...
@@ -1150,7 +1149,6 @@ static void auto_remove_settings (ide_drive_t *drive)
...
@@ -1150,7 +1149,6 @@ static void auto_remove_settings (ide_drive_t *drive)
}
}
setting
=
setting
->
next
;
setting
=
setting
->
next
;
}
}
up
(
&
ide_setting_sem
);
}
}
/**
/**
...
@@ -2408,9 +2406,11 @@ int ide_unregister_subdriver (ide_drive_t *drive)
...
@@ -2408,9 +2406,11 @@ int ide_unregister_subdriver (ide_drive_t *drive)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
down
(
&
ide_setting_sem
);
spin_lock_irqsave
(
&
ide_lock
,
flags
);
spin_lock_irqsave
(
&
ide_lock
,
flags
);
if
(
drive
->
usage
||
drive
->
driver
==
&
idedefault_driver
||
DRIVER
(
drive
)
->
busy
)
{
if
(
drive
->
usage
||
drive
->
driver
==
&
idedefault_driver
||
DRIVER
(
drive
)
->
busy
)
{
spin_unlock_irqrestore
(
&
ide_lock
,
flags
);
spin_unlock_irqrestore
(
&
ide_lock
,
flags
);
up
(
&
ide_setting_sem
);
return
1
;
return
1
;
}
}
#if defined(CONFIG_BLK_DEV_IDEPNP) && defined(CONFIG_PNP) && defined(MODULE)
#if defined(CONFIG_BLK_DEV_IDEPNP) && defined(CONFIG_PNP) && defined(MODULE)
...
@@ -2424,6 +2424,7 @@ int ide_unregister_subdriver (ide_drive_t *drive)
...
@@ -2424,6 +2424,7 @@ int ide_unregister_subdriver (ide_drive_t *drive)
drive
->
driver
=
&
idedefault_driver
;
drive
->
driver
=
&
idedefault_driver
;
setup_driver_defaults
(
drive
);
setup_driver_defaults
(
drive
);
spin_unlock_irqrestore
(
&
ide_lock
,
flags
);
spin_unlock_irqrestore
(
&
ide_lock
,
flags
);
up
(
&
ide_setting_sem
);
spin_lock
(
&
drives_lock
);
spin_lock
(
&
drives_lock
);
list_del_init
(
&
drive
->
list
);
list_del_init
(
&
drive
->
list
);
spin_unlock
(
&
drives_lock
);
spin_unlock
(
&
drives_lock
);
...
...
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