Skip to content

Commit

Permalink
dm mpath: avoid attempting to activate null path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chandra Seetharaman authored and Alasdair G Kergon committed Nov 13, 2008
1 parent 6edebde commit b81aa1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,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;
Expand Down

0 comments on commit b81aa1c

Please sign in to comment.