Commit b81aa1c7 authored by Chandra Seetharaman's avatar Chandra Seetharaman Committed by Alasdair G Kergon

dm mpath: avoid attempting to activate null path

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: default avatarChandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 6edebdee
...@@ -441,13 +441,13 @@ static void process_queued_ios(struct work_struct *work) ...@@ -441,13 +441,13 @@ static void process_queued_ios(struct work_struct *work)
__choose_pgpath(m); __choose_pgpath(m);
pgpath = m->current_pgpath; pgpath = m->current_pgpath;
m->pgpath_to_activate = m->current_pgpath;
if ((pgpath && !m->queue_io) || if ((pgpath && !m->queue_io) ||
(!pgpath && !m->queue_if_no_path)) (!pgpath && !m->queue_if_no_path))
must_queue = 0; 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_count++;
m->pg_init_required = 0; m->pg_init_required = 0;
m->pg_init_in_progress = 1; m->pg_init_in_progress = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment