summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChandra Seetharaman <sekharan@us.ibm.com>2008-11-13 23:39:00 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-12 09:31:13 -0800
commitea291b00259ee488a6056d1f9ae1dcdd73d634fb (patch)
tree6903322d3e3fb597480be3b8f34a109a3a2c2fd1 /drivers
parent07d1f490932233348ff4a15d82f9d294df4c1b65 (diff)
dm mpath: avoid attempting to activate null path
commit b81aa1c79201cb424114fd198607951900babe18 upstream. Path activation code is called even when the pgpath is NULL. This could lead to a panic in activate_path(). Such a panic is seen in -rt kernel. This problem has been there before the pg_init() was moved to a workqueue. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-mpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index c2fcf28b4c70..61f57531de9d 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -427,13 +427,13 @@ static void process_queued_ios(struct work_struct *work)
__choose_pgpath(m);
pgpath = m->current_pgpath;
- m->pgpath_to_activate = m->current_pgpath;
if ((pgpath && !m->queue_io) ||
(!pgpath && !m->queue_if_no_path))
must_queue = 0;
- if (m->pg_init_required && !m->pg_init_in_progress) {
+ if (m->pg_init_required && !m->pg_init_in_progress && pgpath) {
+ m->pgpath_to_activate = pgpath;
m->pg_init_count++;
m->pg_init_required = 0;
m->pg_init_in_progress = 1;