summaryrefslogtreecommitdiff
path: root/drivers/parport
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-07-31 00:37:43 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 15:39:37 -0700
commit8daedea656ef48d36d1bda3d1339da484387c710 (patch)
tree3cc3d1048430815042e7336929c8ebfee6cd5a81 /drivers/parport
parentc21b37f6449a3d799c7e75e978391674ee207600 (diff)
downloadlinux-3.10-8daedea656ef48d36d1bda3d1339da484387c710.tar.gz
linux-3.10-8daedea656ef48d36d1bda3d1339da484387c710.tar.bz2
linux-3.10-8daedea656ef48d36d1bda3d1339da484387c710.zip
parport_pc locking fix
http://bugzilla.kernel.org/show_bug.cgi?id=8821 reports a might_sleep() warning due to parport_pc_exit() running platform_device_unregister() while holding ports_lock. Just remove the locking: nobody else can access ports_list during module_exit. Cc: "Mike Sharkey" <mike@pikeaero.com> Cc: Tim Waugh <tim@cyberelk.net> Cc: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/parport')
-rw-r--r--drivers/parport/parport_pc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 5d58ad55d85..e2be8400110 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -3445,7 +3445,6 @@ static void __exit parport_pc_exit(void)
pnp_unregister_driver (&parport_pc_pnp_driver);
platform_driver_unregister(&parport_pc_platform_driver);
- spin_lock(&ports_lock);
while (!list_empty(&ports_list)) {
struct parport_pc_private *priv;
struct parport *port;
@@ -3455,11 +3454,8 @@ static void __exit parport_pc_exit(void)
if (port->dev && port->dev->bus == &platform_bus_type)
platform_device_unregister(
to_platform_device(port->dev));
- spin_unlock(&ports_lock);
parport_pc_unregister_port(port);
- spin_lock(&ports_lock);
}
- spin_unlock(&ports_lock);
}
MODULE_AUTHOR("Phil Blundell, Tim Waugh, others");